D 06 Uservol 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 532

DL06 Micro PLC User Manual

Volume 1 of 2

Manual Number: D0-06USER-M


DL06 Micro PLC User Manual, 3rd Edition, Rev. D
~ 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 Manufacturers 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 2016, 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 davoir achet lquipement dautomatisation de Automationdirect.comMC, en faisant des
affaires comme, AutomationDirect. Nous tenons ce que votre nouvel quipement dautomatisation fonctionne en
toute scurit. Toute personne qui installe ou utilise cet quipement doit lire la prsente publication (et toutes les
autres publications pertinentes) avant de linstaller ou de lutiliser.
Afin de rduire au minimum le risque dventuels problmes de scurit, vous devez respecter tous les codes locaux
et nationaux applicables rgissant linstallation et le fonctionnement de votre quipement. Ces codes diffrent dune
rgion lautre et, habituellement, voluent au fil du temps. Il vous incombe de dterminer les codes respecter et
de vous assurer que lquipement, linstallation et le fonctionnement sont conformes aux exigences de la version la
plus rcente de ces codes.
Vous devez, tout le moins, respecter toutes les sections applicables du Code national de prvention des incendies,
du Code national de llectricit et des codes de la National Electrical Manufacturers Association (NEMA). Des
organismes de rglementation ou des services gouvernementaux locaux peuvent galement vous aider dterminer
les codes ainsi que les normes respecter pour assurer une installation et un fonctionnement srs.
Lomission de respecter la totalit des codes et des normes applicables peut entraner des dommages lquipement
ou causer de graves blessures au personnel. Nous ne garantissons pas que les produits dcrits dans cette publication
conviennent votre application particulire et nous nassumons aucune responsabilit lgard de la conception, de
linstallation ou du fonctionnement de votre produit.
Nos produits ne sont pas insensibles aux dfaillances et ne sont ni conus ni fabriqus pour lutilisation ou la revente
en tant ququipement de commande en ligne dans des environnements dangereux ncessitant une scurit absolue,
par exemple, lexploitation dinstallations nuclaires, les systmes de navigation arienne ou de communication, le
contrle de la circulation arienne, les quipements de survie ou les systmes darmes, pour lesquels la dfaillance du
produit peut provoquer la mort, des blessures corporelles ou de graves dommages matriels ou environnementaux
(activits risque lev). La socit AutomationDirect nie toute garantie expresse ou implicite daptitude
lemploi en ce qui a trait aux activits risque lev.
Pour des renseignements additionnels touchant la garantie et la scurit, veuillez consulter la section Modalits et
conditions de notre documentation. Si vous avez des questions au sujet de linstallation ou du fonctionnement de cet
quipement, ou encore si vous avez besoin de renseignements supplmentaires, nhsitez pas nous tlphoner au
770-844-4200.
Cette publication sappuie sur linformation qui tait disponible au moment de limpression. la socit
AutomationDirect, nous nous efforons constamment damliorer nos produits et services. Cest pourquoi nous
nous rservons le droit dapporter des modifications aux produits ou aux publications en tout temps, sans pravis ni
quelque obligation que ce soit. La prsente publication peut aussi porter sur des caractristiques susceptibles de ne
pas tre offertes dans certaines versions rvises du produit.

Marques de commerce
La prsente publication peut contenir des rfrences des produits fabriqus ou offerts par dautres entreprises. Les
dsignations des produits et des entreprises peuvent tre des marques de commerce et appartiennent exclusivement
leurs propritaires respectifs. AutomationDirect nie tout intrt dans les autres marques et dsignations.
Copyright 2016, Automationdirect.com Incorporated
Tous droits rservs
Nulle partie de ce manuel ne doit tre copie, reproduite ou transmise de quelque faon que ce soit sans le
consentement pralable crit de la socit Automationdirect.com Incorporated. AutomationDirect conserve les
droits exclusifs lgard de tous les renseignements contenus dans le prsent document.
DL06 Micro PLC USER MANUAL

Please include the Manual Number and the Manual Issue, both shown below,
when communicating with Technical Support regarding this publication.

Manual Number: D0-06USER-M


Issue: 3rd Edition, Rev. D
Issue Date: 6/16

Publication History
Issue Date Description of Changes
First Edition 7/02 Original
Rev. A 10/02 Updated drawing images and made minor corrections.
Rev. B 6/03 Added new PLC and made numerous corrections.
2nd Edition 3/04 Added two appendices, removed discrete module data and made numerous
corrections.
Corrected all tables, many corrections to Chapters 2, 3, 4, 5, 6, and 7; Chapter 3
(HSIO) was moved to the Appendices and Chapter 4 was divided into Chapters 3 &
3rd Edition 3/07 4; added DS5 Intelligent Boxes to Chapter 5; added Ramp/Soak example to Chapter
8; Numbering Systems and Serial Communications were added to Appendices; many
minor corrections were made throughout manual.
Rev. A 5/07 Minor corrections and updates.
Updated Chapter 5 with current DirectSOFT dialog views, corrected number of
Rev. B 6/11 registers needed to use the print message instruction, removed fuses and corrected
I/O wiring drawings, and other minor corrections and updates.
Added H0-CTRIO2 references.
Rev. C 2/13 Minor corrections and updates.
Added transient suppression for inductive loads.

Rev. D 6/16 Corrections and updates.


Notes

DL06 Micro PLC User Manual


Table of Contents

Chapter 1: Getting Started


Introduction................................................................................................................ 12
The Purpose of this Manual....................................................................................... 12
Supplemental Manuals.............................................................................................. 12
Technical Support..................................................................................................... 12
Conventions Used....................................................................................................... 13
Key Topics for Each Chapter...................................................................................... 13
DL06 Micro PLC Overview.......................................................................................... 14
The DL06 PLC Features............................................................................................. 14
DirectSOFT Programming for Windows................................................................. 14
Handheld Programmer.............................................................................................. 15
I/O Quick Selection Guide.......................................................................................... 15
Quick Start.................................................................................................................. 16
Steps to Designing a Successful System.................................................................. 110
Questions and Answers about DL06 Micro PLCs..................................................... 112

Chapter 2: Installation, Wiring, and Specifications


Safety Guidelines........................................................................................................ 22
Plan for Safety........................................................................................................... 22
Three Levels of Protection......................................................................................... 23
Emergency Stops....................................................................................................... 23
Emergency Power Disconnect................................................................................... 24
Orderly System Shutdown......................................................................................... 24
Class 1, Division 2 Approval...................................................................................... 24
Orientation to DL06 Front Panel............................................................................... 25
Terminal Block Removal............................................................................................ 26
Mounting Guidelines.................................................................................................. 27
Table of Contents
Unit Dimensions........................................................................................................ 27
Enclosures................................................................................................................. 27
Panel Layout & Clearances........................................................................................ 28
Using Mounting Rails................................................................................................ 29
Environmental Specifications................................................................................... 210
Agency Approvals.................................................................................................... 210
Marine Use.............................................................................................................. 210
Wiring Guidelines..................................................................................................... 211
External Power Source............................................................................................. 212
Planning the Wiring Routes..................................................................................... 212
Fuse Protection for Input and Output Circuits......................................................... 213
I/O Point Numbering.............................................................................................. 213
System Wiring Strategies......................................................................................... 214
PLC Isolation Boundaries......................................................................................... 214
Connecting Operator Interface Devices................................................................... 215
Connecting Programming Devices.......................................................................... 215
Sinking / Sourcing Concepts................................................................................... 216
I/O Common Terminal Concepts......................................................................... 217
Connecting DC I/O to Solid State Field Devices................................................... 218
Solid State Input Sensors......................................................................................... 218
Solid State Output Loads......................................................................................... 218
Relay Output Wiring Methods................................................................................. 220
Relay Outputs-Transient Suppression For Inductive Loads in a Control System........ 221
Prolonging Relay Contact Life................................................................................. 226
DC Input Wiring Methods....................................................................................... 227
DC Output Wiring Methods.................................................................................... 228
High-Speed I/O Wiring Methods............................................................................. 229
Wiring Diagrams and Specifications........................................................................ 230
D006AA I/O Wiring Diagram................................................................................. 230
D006AR I/O Wiring Diagram................................................................................. 232
D006DA I/O Wiring Diagram................................................................................ 234
D006DD1 I/O Wiring Diagram.............................................................................. 236
D006DD2 I/O Wiring Diagram.............................................................................. 238
D006DR I/O Wiring Diagram................................................................................. 240
D006DD1D I/O Wiring Diagram.......................................................................... 242
D006DD2D I/O Wiring Diagram.......................................................................... 244
D006DRD I/O Wiring Diagram............................................................................ 246

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


Table of Contents

Glossary of Specification Terms............................................................................... 248

Chapter 3: CPU Specifications and Operation


Overview.32
DL06 CPU Features................................................................................................... 32
CPU Specifications...................................................................................................... 33
CPU Hardware Setup.................................................................................................. 34
Communication Port Pinout Diagrams...................................................................... 34
Connecting the Programming Devices...................................................................... 35
CPU Setup Information............................................................................................. 35
Status Indicators........................................................................................................ 36
Mode Switch Functions............................................................................................. 36
Changing Modes in the DL06 PLC............................................................................ 37
Mode of Operation at Power-up............................................................................... 37
Using Battery Backup................................................................................................. 38
Battery Backup.......................................................................................................... 38
Auxiliary Functions.................................................................................................... 39
Clearing an Existing Program.................................................................................... 39
Initializing System Memory....................................................................................... 39
Setting Retentive Memory Ranges........................................................................... 310
Using a Password.................................................................................................... 311
CPU Operation.......................................................................................................... 312
CPU Operating System............................................................................................ 312
Program Mode........................................................................................................ 313
Run Mode............................................................................................................... 313
Read Inputs............................................................................................................. 314
Service Peripherals and Force I/O............................................................................ 314
CPU Bus Communication........................................................................................ 315
Update Clock, Special Relays and Special Registers.................................................. 315
Solve Application Program...................................................................................... 316
Solve PID Loop Equations........................................................................................ 316
Write Outputs......................................................................................................... 316
Write Outputs to Specialty I/O................................................................................ 316
Diagnostics.............................................................................................................. 317
I/O Response Time................................................................................................... 317
Is Timing Important for Your Application?............................................................... 317

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


iii
Table of Contents

Normal Minimum I/O Response.............................................................................. 318


Normal Maximum I/O Response............................................................................. 318
Improving Response Time....................................................................................... 319
CPU Scan Time Considerations................................................................................ 320
Reading Inputs........................................................................................................ 320
Writing Outputs...................................................................................................... 320
Service Peripherals................................................................................................... 321
CPU Bus Communication........................................................................................ 321
Update Clock/Calendar, Special Relays, Special Registers........................................ 321
Application Program Execution............................................................................... 322
PLC Numbering Systems......................................................................................... 323
PLC Resources......................................................................................................... 323
VMemory.............................................................................................................. 324
Binary-Coded Decimal Numbers............................................................................. 324
Hexadecimal Numbers............................................................................................ 324
Memory Map............................................................................................................ 325
Octal Numbering System........................................................................................ 325
Discrete and Word Locations................................................................................... 325
V-memory Locations for Discrete Memory Areas..................................................... 325
Input Points (X Data Type)...................................................................................... 326
Output Points (Y Data Type)................................................................................... 326
Control Relays (C Data Type).................................................................................. 326
Timers and Timer Status Bits (T Data Type)............................................................. 326
Timer Current Values (V Data Type)........................................................................ 327
Counters and Counter Status Bits (CT Data type).................................................... 327
Counter Current Values (V Data Type).................................................................... 327
Word Memory (V Data Type).................................................................................. 328
Stages (S Data type)................................................................................................ 328
Special Relays (SP Data Type).................................................................................. 328
DL06 System V-memory........................................................................................... 329
System Parameters and Default Data Locations (V Data Type)................................ 329
DL06 Aliases.............................................................................................................. 331
DL06 Memory Map................................................................................................... 332
X Input/Y Output Bit Map....................................................................................... 333
Stage Control/Status Bit Map.................................................................................. 334
Control Relay Bit Map.............................................................................................. 336

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


Table of Contents

Timer Status Bit Map................................................................................................ 338


Counter Status Bit Map............................................................................................ 338
GX and GY I/O Bit Map........................................................................................... 339

Chapter 4: System Design and Configuration


DL06 System Design Strategies................................................................................. 42
I/O System Configurations........................................................................................ 42
Networking Configurations....................................................................................... 42
Module Placement...................................................................................................... 43
Slot Numbering........................................................................................................ 43
Automatic I/O Configuration..................................................................................... 44
Manual I/O Configuration......................................................................................... 44
Power Budgeting........................................................................................................ 45
Power supplied ........................................................................................................ 45
Power required by base unit .................................................................................... 45
Power required by option cards ............................................................................... 45
Configuring the DL06s Comm Ports......................................................................... 47
DL06 Port Specifications............................................................................................ 47
DL06 Port Pinouts..................................................................................................... 47
Choosing a Network Specification............................................................................. 48
RS-232 Network........................................................................................................ 48
RS-422 Network........................................................................................................ 48
RS-485 Network........................................................................................................ 48
Connecting to MODBUS and DirectNET Networks................................................... 49
MODBUS Port Configuration..................................................................................... 49
DirectNET Port Configuration.................................................................................. 410
NonSequence Protocol (ASCII In/Out and PRINT)................................................ 411
Non-Sequence Port Configuration........................................................................... 411
Network Slave Operation......................................................................................... 412
MODBUS Function Codes Supported...................................................................... 412
Determining the MODBUS Address......................................................................... 412
If Your Host Software Requires the Data Type and Address..................................... 413
Example 1: V2100................................................................................................... 414
Example 2: Y20....................................................................................................... 414
Example 3: T10 Current Value................................................................................. 414

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


v
Table of Contents

Example 4: C54....................................................................................................... 414


If Your MODBUS Host Software Requires an Address ONLY.................................... 415
Example 1: V2100 584/984 Mode.......................................................................... 416
Example 2: Y20 584/984 Mode.............................................................................. 416
Example 3: T10 Current Value 484 Mode............................................................... 417
Example 4: C54 584/984 Mode.............................................................................. 417
Network Master Operation...................................................................................... 417
Step 1: Identify Master Port # and Slave #.............................................................. 418
Step 2: Load Number of Bytes to Transfer............................................................... 418
Step 3: Specify Master Memory Area....................................................................... 419
Step 4: Specify Slave Memory Area......................................................................... 420
Communications from a Ladder Program................................................................ 421
Multiple Read and Write Interlocks.......................................................................... 421
Network Master Operation (using MRX and MWX Instructions).......................... 422
MODBUS Function Codes Supported...................................................................... 422
MODBUS Read from Network(MRX)....................................................................... 423
MRX Slave Memory Address.................................................................................... 424
MRX Master Memory Addresses.............................................................................. 424
MRX Number of Elements....................................................................................... 424
MRX Exception Response Buffer.............................................................................. 424
MODBUS Write to Network (MWX)........................................................................ 425
MWX Slave Memory Address.................................................................................. 426
MWX Master Memory Addresses............................................................................. 426
MWX Number of Elements...................................................................................... 426
MWX Exception Response Buffer............................................................................. 426
MRX/MWX Example in DirectSOFT......................................................................... 427
Multiple Read and Write Interlocks.......................................................................... 427

Chapter 5: Standard RLL Instructions


Introduction................................................................................................................ 52
Using Boolean Instructions........................................................................................ 55
END Statement......................................................................................................... 55
Simple Rungs............................................................................................................ 55
Normally Closed Contact.......................................................................................... 56
Contacts in Series...................................................................................................... 56
Midline Outputs........................................................................................................ 56

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


Table of Contents

Parallel Elements........................................................................................................ 57
Joining Series Branches in Parallel.............................................................................. 57
Joining Parallel Branches in Series.............................................................................. 57
Combination Networks............................................................................................. 57
Comparative Boolean................................................................................................ 58
Boolean Stack............................................................................................................ 58
Immediate Boolean................................................................................................... 59
Boolean Instructions ................................................................................................ 510
Comparative Boolean............................................................................................... 526
Immediate Instructions............................................................................................ 532
Timer, Counter and Shift Register Instructions....................................................... 539
Using Timers........................................................................................................... 539
Timer Example Using Discrete Status Bits................................................................ 541
Timer Example Using Comparative Contacts........................................................... 541
Accumulating Timer Example using Discrete Status Bits.......................................... 543
Accumulator Timer Example Using Comparative Contacts...................................... 543
Using Counters....................................................................................................... 544
Counter Example Using Discrete Status Bits............................................................ 546
Counter Example Using Comparative Contacts....................................................... 546
Stage Counter Example Using Discrete Status Bits................................................... 548
Stage Counter Example Using Comparative Contacts............................................. 548
Up / Down Counter Example Using Discrete Status Bits.......................................... 550
Up / Down Counter Example Using Comparative Contacts..................................... 550
Accumulator/Stack Load and Output Data Instructions......................................... 552
Using the Accumulator............................................................................................ 552
Copying Data to the Accumulator........................................................................... 552
Changing the Accumulator Data............................................................................. 553
Using the Accumulator Stack................................................................................... 554
Using Pointers......................................................................................................... 555
Logical Instructions (Accumulator).......................................................................... 569
Math Instructions..................................................................................................... 586
Transcendental Functions...................................................................................... 5118
Bit Operation Instructions...................................................................................... 5120
Number Conversion Instructions (Accumulator)................................................... 5127
Shuffle Digits Block Diagram................................................................................. 5139

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


vii
Table of Contents

Table Instructions................................................................................................... 5141


Copy Data From a Data Label Area to V-memory.................................................. 5143
Clock/Calendar Instructions................................................................................... 5171
CPU Control Instructions........................................................................................ 5173
Program Control Instructions................................................................................ 5175
Interrupt Instructions............................................................................................. 5183
Message Instructions.............................................................................................. 5186
Move Block Instruction (MOVBLK)........................................................................ 5189
Copy Data From a Data Label Area to V-memory.................................................. 5189
Intelligent I/O Instructions..................................................................................... 5194
Read from Intelligent Module (RD)........................................................................ 5194
Write to Intelligent Module (WT).......................................................................... 5195
Network Instructions.............................................................................................. 5196
Direct Text Entry................................................................................................... 5200
Embedding date and/or time variables.................................................................. 5201
Embedding V-memory data.................................................................................. 5201
Data Format Suffixes for Embedded V-memory Data............................................ 5202
Text Entry from V-memory.................................................................................... 5203
MODBUS RTU Instructions .................................................................................... 5204
MRX Slave Address Ranges.................................................................................... 5205
MWX Slave Address Ranges.................................................................................. 5208
MWX Master Memory Address Ranges.................................................................. 5208
MWX Number of Elements ................................................................................. 5208
MWX Exception Response Buffer........................................................................... 5208
ASCII Instructions................................................................................................... 5210
Reading ASCII Input Strings................................................................................... 5210
Writing ASCII Output Strings................................................................................. 5210
Managing the ASCII Strings.................................................................................. 5211
Intelligent Box (IBox) Instructions......................................................................... 5230

Chapter 6: Drum Instruction Programming


Introduction................................................................................................................ 62

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


Table of Contents

Volume Two:
Table of Contents
Purpose..................................................................................................................... 62
Drum Terminology.................................................................................................... 62
Drum Chart Representation....................................................................................... 63
Output Sequences..................................................................................................... 63
Step Transitions.......................................................................................................... 64
Drum Instruction Types............................................................................................. 64
Timer-Only Transitions.............................................................................................. 64
Timer and Event Transitions...................................................................................... 65
Event-Only Transitions............................................................................................... 66
Counter Assignments................................................................................................ 66
Last Step Completion................................................................................................ 67
Overview of Drum Operation.................................................................................... 68
Drum Instruction Block Diagram............................................................................... 68
Powerup State of Drum Registers.............................................................................. 69
Drum Control Techniques........................................................................................ 610
Drum Control Inputs............................................................................................... 610
Self-Resetting Drum................................................................................................ 611
Initializing Drum Outputs........................................................................................ 611
Using Complex Event Step Transitions.................................................................... 611
Drum Instruction...................................................................................................... 612
Timed Drum with Discrete Outputs (DRUM)........................................................... 612
Event Drum (EDRUM)............................................................................................. 614
Handheld Programmer Drum Mnemonics............................................................... 616
Masked Event Drum with Discrete Outputs (MDRMD)............................................ 619
Masked Event Drum with Word Output (MDRMW)................................................ 621

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


ix
Table of Contents

Chapter 7: RLLPLUS Stage Programming


Introduction to Stage Programming......................................................................... 72
Overcoming Stage Fright....................................................................................... 72
Learning to Draw State Transition Diagrams............................................................ 73
Introduction to Process States................................................................................... 73
The Need for State Diagrams.................................................................................... 73
A 2State Process...................................................................................................... 73
RLL Equivalent........................................................................................................... 74
Stage Equivalent........................................................................................................ 74
Lets Compare........................................................................................................... 75
Initial Stages.............................................................................................................. 75
What Stage Bits Do................................................................................................... 76
Stage Instruction Characteristics................................................................................ 76
Using the Stage Jump Instruction for State Transitions........................................... 77
Stage Jump, Set, and Reset Instructions..................................................................... 77
Stage Program Example: Toggle On/Off Lamp Controller....................................... 78
A 4State Process...................................................................................................... 78
Four Steps to Writing a Stage Program.................................................................... 79
1. Write a Word Description of the application......................................................... 79
2. Draw the Block Diagram....................................................................................... 79
3. Draw the State Transition Diagram....................................................................... 79
4. Write the Stage Program....................................................................................... 79
Stage Program Example: A Garage Door Opener................................................... 710
Garage Door Opener Example................................................................................ 710
Draw the Block Diagram......................................................................................... 710
Draw the State Diagram.......................................................................................... 711
Add Safety Light Feature......................................................................................... 712
Modify the Block Diagram and State Diagram........................................................ 712
Using a Timer Inside a Stage................................................................................... 713
Add Emergency Stop Feature.................................................................................. 714
Exclusive Transitions................................................................................................ 714
Stage Program Design Considerations.................................................................... 715
Stage Program Organization................................................................................... 715
How Instructions Work Inside Stages....................................................................... 716
Using a Stage as a Supervisory Process.................................................................... 717

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


Table of Contents

Stage Counter......................................................................................................... 717


Power Flow Transition Technique............................................................................ 718
Stage View in DirectSOFT........................................................................................ 718
Parallel Processing Concepts.................................................................................... 719
Parallel Processes..................................................................................................... 719
Converging Processes.............................................................................................. 719
Convergence Stages (CV)........................................................................................ 719
Convergence Jump (CVJMP).................................................................................... 720
Convergence Stage Guidelines................................................................................ 720
RLLPLUS (Stage) Instructions..................................................................................... 721
Stage (SG)............................................................................................................... 721
Initial Stage (ISG).................................................................................................... 722
Jump (JMP)............................................................................................................. 722
Not Jump (NJMP).................................................................................................... 722
Converge Stage (CV) and Converge Jump (CVJMP)................................................ 723
Block Call (BCALL)................................................................................................... 725
Block (BLK).............................................................................................................. 725
Block End (BEND).................................................................................................... 725
Questions and Answers about Stage Programming............................................... 727

Chapter 8: PID Loop Operation


DL06 PID Control........................................................................................................ 82
DL06 PID Control Features........................................................................................ 82
Introduction to PID Control....................................................................................... 84
What is PID Control?................................................................................................. 84
Introducing DL06 PID Control................................................................................... 86
Process Control Definitions........................................................................................ 88
PID Loop Operation.................................................................................................... 89
Position Form of the PID Equation............................................................................. 89
Reset Windup Protection......................................................................................... 810
Freeze Bias.............................................................................................................. 811
Adjusting the Bias.................................................................................................... 811
Step Bias Proportional to Step Change in SP........................................................... 812
Eliminating Proportional, Integral or Derivative Action............................................ 812
Velocity Form of the PID Equation........................................................................... 812

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


xi
Table of Contents

Bumpless Transfer................................................................................................... 813


Loop Alarms............................................................................................................ 813
Loop Operating Modes........................................................................................... 814
Special Loop Calculations........................................................................................ 814
Ten Steps to Successful Process Control................................................................. 816
PID Loop Setup......................................................................................................... 818
Some Things to Do and Know Before Starting........................................................ 818
PID Error Flags......................................................................................................... 818
Establishing the Loop Table Size and Location........................................................ 818
Loop Table Word Definitions................................................................................... 820
PID Mode Setting 1 Bit Descriptions (Addr + 00).................................................... 821
PID Mode Setting 2 Bit Descriptions (Addr + 01).................................................... 822
Mode/Alarm Monitoring Word (Addr + 06)............................................................ 823
Ramp/Soak Table Flags (Addr + 33)........................................................................ 823
Ramp/Soak Table Location (Addr + 34)................................................................... 824
Ramp/Soak Table Programming Error Flags (Addr + 35)......................................... 824
Configure the PID Loop.......................................................................................... 825
PID Loop Tuning....................................................................................................... 840
Open-Loop Test...................................................................................................... 840
Manual Tuning Procedure....................................................................................... 841
Alternative Manual Tuning Procedures by Others.................................................... 844
Tuning PID Controllers............................................................................................ 844
Auto Tuning Procedure........................................................................................... 845
Use DirectSOFT 5 Data View with PID View............................................................ 849
Open a New Data View Window............................................................................. 849
Open PID View........................................................................................................ 850
Using the Special PID Features................................................................................ 853
How to Change Loop Modes.................................................................................. 853
Operator Panel Control of PID Modes..................................................................... 854
PLC Modes Effect on Loop Modes........................................................................... 854
Loop Mode Override............................................................................................... 854
PV Analog Filter....................................................................................................... 855
Creating an Analog Filter in Ladder Logic................................................................ 856
Use the DirectSOFT Filter Intelligent Box Instructions.............................................. 8-57
FilterB Example........................................................................................................ 8-57
Ramp/Soak Generator.............................................................................................. 858

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


Table of Contents

Introduction............................................................................................................ 858
Ramp/Soak Table.................................................................................................... 859
Ramp/Soak Table Flags............................................................................................ 861
Ramp/Soak Generator Enable.................................................................................. 861
Ramp/Soak Controls................................................................................................ 861
Ramp/Soak Profile Monitoring................................................................................. 862
Ramp/Soak Programming Errors.............................................................................. 862
Testing Your Ramp/Soak Profile............................................................................... 862
DirectSOFT 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........................................................................................................ 865
Introduction............................................................................................................ 865
Cascaded Loops in the DL06 CPU........................................................................... 866
Tuning Cascaded Loops.......................................................................................... 867
Time-Proportioning Control..................................................................................... 868
On/Off Control Program Example........................................................................... 869
Feedforward Control................................................................................................ 870
Feedforward Example.............................................................................................. 871
PID Example Program.............................................................................................. 872
Program Setup for the PID Loop............................................................................. 872
Troubleshooting Tips............................................................................................... 875
Glossary of PID Loop Terminology.......................................................................... 877
Bibliography ............................................................................................................ 879

Chapter 9: Maintenance and Troubleshooting


Hardware System Maintenance................................................................................. 92
Standard Maintenance.............................................................................................. 92
Diagnostics.................................................................................................................. 92
Diagnostics................................................................................................................ 92
Fatal Errors................................................................................................................ 92
Non-fatal Errors......................................................................................................... 92
V-memory Error Code Locations................................................................................ 93
Special Relays (SP) Corresponding to Error Codes..................................................... 93

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


xiii
Table of Contents

DL06 Micro PLC Error Codes..................................................................................... 94


Program Error Codes................................................................................................. 95
CPU Indicators............................................................................................................ 96
PWR Indicator........................................................................................................... 96
RUN Indicator........................................................................................................... 97
CPU Indicator............................................................................................................ 97
Communications Problems........................................................................................ 97
I/O Point Troubleshooting......................................................................................... 98
Possible Causes......................................................................................................... 98
Some Quick Steps..................................................................................................... 98
Handheld Programmer Keystrokes Used to Test an Output Point.............................. 99
Noise Troubleshooting............................................................................................. 910
Electrical Noise Problems......................................................................................... 910
Reducing Electrical Noise........................................................................................ 910
Machine Startup and Program Troubleshooting.................................................... 911
Syntax Check.......................................................................................................... 911
Special Instructions.................................................................................................. 912
Duplicate Reference Check...................................................................................... 913
Run Time Edits........................................................................................................ 914
Run Time Edit Example........................................................................................... 915
Forcing I/O Points................................................................................................... 916
Regular Forcing with Direct Access.......................................................................... 918
Bit Override Forcing................................................................................................ 919
Bit Override Indicators............................................................................................. 919
Reset the PLC to Factory Defaults............................................................................ 920

Chapter 10: LCD Display Panel


Introduction to the DL06 LCD Display Panel.......................................................... 102
Keypad... 102
Snap-in installation................................................................................................... 103
Display Priority......................................................................................................... 104
Menu Navigation...................................................................................................... 105
Confirm PLC Type, Firmware Revision Level, Memory Usage, Etc......................... 106
Examining Option Slot Contents............................................................................. 108

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


Table of Contents

Menu 2, M2:SYSTEM CFG. ..................................................................................... 108


Monitoring and Changing Data Values................................................................. 1010
Menu 3, M3:MONITOR ....................................................................................... 1010
Data Monitor........................................................................................................ 1010
V-memory values................................................................................................... 1010
Pointer values........................................................................................................ 1012
Bit Monitor............................................................................................................. 1013
Bit status............................................................................................................... 1013
Changing Date and Time....................................................................................... 1014
Menu 4, M4 : CALENDAR R/W.............................................................................. 1014
Setting Password and Locking............................................................................... 1017
Menu 5, M5 : PASSWORD R/W............................................................................. 1017
Reviewing Error History.......................................................................................... 1020
Menu 6, M6 : ERR HISTORY.................................................................................. 1020
Toggle Light and Beeper, Test Keys...................................................................... 1021
Menu 7, M7 : LCD TEST&SET............................................................................... 1021
PLC Memory Information for the LCD Display Panel........................................... 1022
Data Format Suffixes for Embedded V-memory Data............................................ 1022
Reserved memory registers for the LCD Display Panel........................................... 1023
V7742 bit definitions............................................................................................. 1024
Changing the Default Screen................................................................................. 1025
Example program for setting the default screen message...................................... 1025
DL06 LCD Display Panel Instruction (LCD)............................................................ 1026
Source of message................................................................................................ 1026
ASCII Character Codes.......................................................................................... 1027
Example program: alarm with embedded date/time stamp.................................. 1028
Example program: alarm with embedded V-memory data.................................... 1029
Example program: alarm text from V-memory with embedded V-memory data... 1030

Appendix A: Auxiliary Functions


Introduction................................................................................................................A2
Purpose of Auxiliary Functions...................................................................................A2
Accessing AUX Functions via DirectSOFT...................................................................A3
Accessing AUX Functions via the Handheld Programmer...........................................A3

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


xv
Table of Contents

AUX 2* RLL Operations..........................................................................................A4


AUX 21 Check Program............................................................................................A4
AUX 22 Change Reference........................................................................................A4
AUX 23 Clear Ladder Range......................................................................................A4
AUX 24 Clear Ladders...............................................................................................A4
AUX 3* V-memory Operations...............................................................................A4
AUX 31 Clear V-memory...........................................................................................A4
AUX 4* I/O Configuration......................................................................................A5
AUX 41 Show I/O Configuration...............................................................................A5
AUX 5* CPU Configuration....................................................................................A5
AUX 51 Modify Program Name.................................................................................A5
AUX 53 Display Scan Time........................................................................................A5
AUX 54 Initialize Scratchpad.....................................................................................A5
AUX 55 Set Watchdog Timer....................................................................................A5
AUX 56 CPU Network Address..................................................................................A6
AUX 57 Set Retentive Ranges....................................................................................A6
AUX 58 Test Operations............................................................................................A6
AUX 59 Bit Override..................................................................................................A7
AUX 5B Counter Interface Configuration...................................................................A7
AUX 5D Select PLC Scan Mode.................................................................................A7
AUX 6* Handheld Programmer Configuration.....................................................A8
AUX 61 Show Revision Numbers...............................................................................A8
AUX 62 Beeper On/Off..............................................................................................A8
AUX 65 Run Self Diagnostics.....................................................................................A8
AUX 7* EEPROM Operations..................................................................................A8
Transferrable Memory Areas......................................................................................A8
AUX 71 CPU to HPP EEPROM....................................................................................A8
AUX 72 HPP EEPROM to CPU....................................................................................A9
AUX 73 Compare HPP EEPROM to CPU....................................................................A9
AUX 74 HPP EEPROM Blank Check............................................................................A9
AUX 75 Erase HPP EEPROM.......................................................................................A9
AUX 76 Show EEPROM Type.....................................................................................A9
AUX 8* Password Operations................................................................................A9
AUX 81 Modify Password..........................................................................................A9
AUX 82 Unlock CPU................................................................................................A10
AUX 83 Lock CPU...................................................................................................A10

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


Table of Contents

Appenedix B: DL06 Error codes


DL06 Error Codes........................................................................................................B2

Appendix C: Instruction Execution Times


Introduction................................................................................................................C2
V-Memory Data Registers..........................................................................................C2
V-Memory Bit Registers.............................................................................................C2
How to Read the Tables............................................................................................C2
Instruction Execution Times.......................................................................................C3
Boolean Instructions..................................................................................................C3
Comparative Boolean Instructions.............................................................................C4
Immediate Instructions............................................................................................C11
Bit of Word Boolean Instructions.............................................................................C12
Timer, Counter and Shift Register...........................................................................C13
Accumulator Data Instructions................................................................................C14
Logical Instructions.................................................................................................C15
Math Instructions....................................................................................................C16
Differential Instructions...........................................................................................C19
Bit Instructions........................................................................................................C19
Number Conversion Instructions.............................................................................C20
Table Instructions....................................................................................................C20
CPU Control Instructions.........................................................................................C22
Program Control Instructions..................................................................................C22
Interrupt Instructions...............................................................................................C22
Network Instructions...............................................................................................C22
Intelligent I/O Instructions.......................................................................................C23
Message Instructions...............................................................................................C23
RLLPLUS Instructions..................................................................................................C23
Drum Instructions...................................................................................................C23
Clock/Calendar Instructions.....................................................................................C24
MODBUS Instructions..............................................................................................C24
ASCII Instructions....................................................................................................C24

Appendix D: Special Relays


DL06 PLC Special Relays............................................................................................ D2
Startup and Real-Time Relays................................................................................... D2

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


xvii
Table of Contents
CPU Status Relays..................................................................................................... D2
System Monitoring................................................................................................... D3
Accumulator Status.................................................................................................. D3
HSIO Input Status..................................................................................................... D4
HSIO Pulse Output Relay.......................................................................................... D4
Communication Monitoring Relay............................................................................ D4
Option Slot Communication Monitoring Relay......................................................... D4
Option Slot Special Relay......................................................................................... D4
Counter 1 Mode 10 Equal Relays............................................................................. D5
Counter 2 Mode 10 Equal Relays............................................................................. D6

Appendix E: High-speed Input and Pulse Output Features


Introduction................................................................................................................ E2
Built-in Motion Control Solution............................................................................... E2
Availability of HSIO Features...................................................................................... E2
Dedicated High- Speed I/O Circuit............................................................................ E3
Wiring Diagrams for Each HSIO Mode...................................................................... E3
Choosing the HSIO Operating Mode......................................................................... E4
Understanding the Six Modes................................................................................... E4
Default Mode............................................................................................................ E5
Configuring the HSIO Mode..................................................................................... E6
Configuring Inputs X0 X3....................................................................................... E6
Mode 10: High-Speed Counter.................................................................................. E7
Purpose..................................................................................................................... E7
Functional Block Diagram.......................................................................................... E7
Wiring Diagram......................................................................................................... E8
Interfacing to Counter Inputs.................................................................................... E8
Setup for Mode 10.................................................................................................... E9
Presets and Special Relays......................................................................................... E9
Absolute and Incremental Presets............................................................................ E10
Preset Data Starting Location.................................................................................. E11
Using Fewer than 24 Presets................................................................................... E11
Equal Relay Numbers.............................................................................................. E12
Calculating Your Preset Values................................................................................. E13
X Input Configuration............................................................................................. E14
Writing Your Control Program................................................................................. E15
Program Example 1: Counter Without Presets......................................................... E16
Program Example 2: Counter With Presets.............................................................. E18

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


Table of Contents

Program Example 3: Counter With Preload............................................................. E21


Troubleshooting Guide for Mode 10....................................................................... E23
Symptom: The counter does not count................................................................... E23
Symptom: The counter counts but the presets do not function.............................. E23
Symptom: The counter counts up but will not reset............................................... E23
Mode 20: Up/Down Counter................................................................................... E24
Purpose................................................................................................................... E24
Functional Block Diagram........................................................................................ E24
Quadrature Encoder Signals.................................................................................... E25
Wiring Diagram....................................................................................................... E25
Interfacing to Encoder Outputs............................................................................... E26
Setup for Mode 20.................................................................................................. E27
Presets and Special Relays....................................................................................... E27
X Input Configuration............................................................................................. E28
Mode 20 Up/Down Counter................................................................................... E28
Writing Your Control Program................................................................................. E29
Program Example 1: Quadrature Counting with an Interrupt.................................. E30
Program Example 2: Up/Down Counting with Standard Inputs.............................. E32
Program Example 3: Quadrature Counting............................................................. E34
Troubleshooting Guide for Mode 20....................................................................... E37
Symptom: The counter does not count................................................................... E37
Symptom: The counter counts in the wrong direction........................................... E37
Symptom: The counter counts up and down but will not reset............................... E37
Mode 30: Pulse Output............................................................................................ E38
Purpose................................................................................................................... E38
Functional Block Diagram........................................................................................ E39
Wiring Diagram....................................................................................................... E40
Interfacing to Drive Inputs....................................................................................... E40
Motion Profile Specifications................................................................................... E41
Physical I/O Configuration....................................................................................... E41
Logical I/O Functions.............................................................................................. E41
Setup for Mode 30.................................................................................................. E42
Profile/Velocity Select Register................................................................................. E43
Profile Parameter Table............................................................................................ E43
Automatic Trapezoidal Profile.................................................................................. E43
Step Trapezoidal Profile........................................................................................... E44
Velocity Control...................................................................................................... E44

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


xix
Table of Contents

Step Trapezoidal Profile........................................................................................... E44


Choosing the Profile Type....................................................................................... E45
Automatic Trapezoidal Profile Defined..................................................................... E45
Step Trapezoidal Profiles Defined............................................................................ E46
Velocity Control Defined......................................................................................... E46
Automatic Trapezoidal Profile Operation................................................................. E47
Program Example 1: Automatic Trapezoidal Profile without External Interrupt........ E48
Preload Position Value............................................................................................. E49
Program Example 2: Automatic Trapezoidal Profile with External Interrupt............. E50
Program Example 3: Automatic Trapezoidal Profile with Home Search.................... E53
Step Trapezoidal Profile Operation.......................................................................... E58
Program Example 4: Step Trapezoidal Profile ......................................................... E59
Velocity Profile Operation........................................................................................ E62
Program Example 5: Velocity Profile........................................................................ E63
Automatic Trapezoidal Profile Error Codes............................................................... E65
Troubleshooting Guide for Mode 30....................................................................... E65
Symptom: The stepper motor does not rotate........................................................ E65
Symptom: The motor turns in the wrong direction................................................. E66
Mode 40: High-Speed Interrupts............................................................................. E67
Purpose................................................................................................................... E67
Functional Block Diagram........................................................................................ E67
Setup for Mode 40.................................................................................................. E68
Interrupts and the Ladder Program......................................................................... E68
External Interrupt Timing Parameters...................................................................... E69
Timed Interrupt Parameters..................................................................................... E69
X Input/Timed INT Configuration........................................................................... E69
Program Example 1: External Interrupt .................................................................. E70
Program Example 2: Timed Interrupt ..................................................................... E71
Mode 50: Pulse Catch Input..................................................................................... E72
Purpose................................................................................................................... E72
Functional Block Diagram........................................................................................ E72
Pulse Catch Timing Parameters............................................................................... E72
Setup for Mode 50.................................................................................................. E73
X Input Configuration............................................................................................. E74
Program Example 1: Pulse Catch ............................................................................ E75
Mode 60: Discrete Inputs with Filter....................................................................... E76
Purpose................................................................................................................... E76

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


Table of Contents

Functional Block Diagram........................................................................................ E76


Input Filter Timing Parameters................................................................................ E76
Setup for Mode 60.................................................................................................. E77
X Input Configuration............................................................................................. E77
Program Example: Filtered Inputs ........................................................................... E78

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............................................................................................... H2

Appendix I: Numbering Systems


Introduction.................................................................................................................I2
Binary Numbering System..........................................................................................I2
Hexadecimal Numbering System................................................................................I3
Octal Numbering System............................................................................................I4
Binary Coded Decimal (BCD) Numbering System.....................................................I5
Real (Floating Point) Numbering System...................................................................I5
BCD/Binary/Decimal/Hex/Octal -What is the Difference?.........................................I6
Data Type Mismatch...................................................................................................I7
Signed vs. Unsigned Integers......................................................................................I8
AutomationDirect.com Products and Data Types......................................................I9
DirectLOGIC PLCs...................................................................................................... I9
C-more/C-more Micro-Graphic Panels........................................................................ I9

Appendix J: European Union Directives (CE)


European Union (EU) Directives................................................................................. J-2
Member Countries......................................................................................................J-2

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


xxi
Table of Contents

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-5
Enclosures...................................................................................................................J-5
Electrostatic Discharge (ESD).......................................................................................J-5
AC Mains Filters..........................................................................................................J-6
Suppression and Fusing...............................................................................................J-6
Internal Enclosure Grounding......................................................................................J-6
Equipotential Grounding...........................................................................................J-7
Communications and Shielded Cables........................................................................J-7
Analog and RS232 Cables...........................................................................................J-8
Multidrop Cables.........................................................................................................J-8
Shielded Cables within Enclosures...............................................................................J-8
Analog Modules and RF Interference...........................................................................J-9
Network Isolation........................................................................................................J-9
DC Powered Versions..................................................................................................J-9
Items Specific to the DL06........................................................................................J-10

Appendix K: Introduction to Serial Communications


Introduction to Serial Communications...................................................................K2
Wiring Standards.......................................................................................................K2
Communications Protocols........................................................................................K3
DL06 Port Specifications............................................................................................K5
DL06 Port Pinouts.....................................................................................................K5
Port Setup Using DirectSOFT 5 or Ladder Logic Instructions.....................................K6
Port 2 Setup for RLL Using K-Sequence, DirectNET or MODBUS RTU........................K7
K-Sequence Communications..................................................................................K10
DirectNET Communications....................................................................................K10
Step 1: Identify Master Port # and Slave #..............................................................K10
Step 2: Load Number of Bytes to Transfer...............................................................K10
Step 3: Specify Master Memory Area.......................................................................K11
Step 4: Specify Slave Memory Area.........................................................................K12
Communications from a Ladder Program................................................................K13
Multiple Read and Write Interlocks..........................................................................K13

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


Table of Contents

MODBUS RTU Communications..............................................................................K14


ASCII Communications............................................................................................K14

Index

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


xxiii
Table of Contents

Notes

xxiv DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter
Getting Started
1
In This Chapter...
Introduction...................................................................................... 12
Conventions Used............................................................................. 13
DL06 Micro PLC Overview................................................................ 14
I/O Quick Selection Guide................................................................. 15
Quick Start........................................................................................ 16
Steps to Designing a Successful System.......................................... 110
Questions and Answers about DL06 Micro PLCs............................. 112
Chapter 1: Getting Started

Introduction
1 The Purpose of this Manual
Thank you for purchasing a DL06 Micro PLC. This manual shows you how to install,
2 program, and maintain all PLCs in the DL06 family. It also helps you understand how
to interface them to other devices in a control system.This manual contains important
3 information for personnel who will install DL06 PLCs and for the PLC programmer. This
user manual will provide the information you need to get and keep your system up and
running.
4
Supplemental Manuals
5 The D0OPTIONSM manual contains technical information about the option cards
available for the DL06 PLCs. This information includes specifications and wiring diagrams
that will be indispensable if you use any of the optional I/O or communications cards. If
6 you have purchased one of our operator interface panels or DirectSOFT programming
software, you will want to refer to the manuals that are written for these products.
7 Technical Support
8 We strive to make our manuals the best in the industry. We rely on your feedback to let
us know if we are reaching our goal. If you cannot find the solution to your particular
application, or, if for any reason you need technical assistance, please call us at
9 7708444200
Our technical support group will work with you to answer your questions. They are available
10 Monday through Friday from 9:00 A.M. to 6:00 P.M. Eastern Time. We also encourage you
to visit our web site where you can find technical and non-technical information about our
products and our company.
11 http://www.automationdirect.com

12 If you have a comment, question or suggestion about any of our products, services, or
manuals, please fill out and return the Suggestions card included with this manual.

13
14
A
B
C
D

1-2 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 1: Getting Started

Conventions Used
When you see the notepad icon in the left-hand margin, the paragraph to its
1
immediate right will be a special note. Notes represent information that may make
your work quicker or more efficient. 2
The word NOTE in boldface type will mark the beginning of the text.
3
4
When you see the exclamation point icon in the left-hand margin, the paragraph to
its immediate right will be a warning. This information could prevent injury, loss 5
of property, or even death in extreme cases. Any warning in this manual should be
regarded as critical information that should be read in its entirety.
The word WARNING in boldface type will mark the beginning of the text.
6
7
Key Topics for Each Chapter Getting Started CHAPTER
8
The beginning of each chapter will list the key topics
that can be found in that chapter.
1 9
In This Chapter...
General Information .................................................................1-2
Specifications ...........................................................................1-4 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-3


Chapter 1: Getting Started

DL06 Micro PLC Overview


1 The DL06 micro PLC family is a versatile product line that
combines powerful features and a very compact footprint.
2 The DL06 PLCs offer expandable I/O, high-speed
counter, floating point, PID, etc. There are a number of
communication options and an optional LCD display.
3 The DL06 PLC Features
4 The DL06 Micro PLC family includes nine different
versions. All have the same appearance and CPU
performance. The CPU offers an instruction set very similar to our powerful new DL260
5 CPU including new easy to use ASCII and MODBUS instructions. All DL06 PLCs have
two built-in communications ports that can be used for programming, operator interface,
6 networking, etc.
Units with DC inputs have selectable high-speed input features on four input points. Units
7 with DC outputs offer selectable pulse output capability on the first and second output
points. Details of these features and more are covered in Chapter 3, CPU Specifications and
Operation. There are nine versions of the DL06 PLC. The most common industrial I/O
8 types and power supply voltages are available. Consult the following table to find the model
number of the PLC that best fits your application.
9 DL06 Micro PLC Family
DL06 Part Discrete Input Discrete Output High-Speed
10 Number
D006AA
Type
AC
Type
AC
External Power
95240 VAC
Input
No
Pulse Output
No

11 D006AR
D006DA
AC
DC
Relay
AC
95240 VAC
95240 VAC
No
Yes
No
No
D006DD1 DC DC Sinking 95240 VAC Yes Yes
12 D006DD2 DC DC Sourcing 95240 VAC Yes Yes
D006DR DC Relay 95240 VAC Yes No

13 D006DD1D
D006DD2D
DC
DC
DC Sinking
DC Sourcing
1224 VDC
1224 VDC
Yes
Yes
Yes
Yes
D006DRD DC Relay 1224 VDC Yes No
14
DirectSOFT 5 Programming for Windows
A The DL06 Micro PLC can be programmed with DirectSOFT, a Windows-based software
package that supports familiar features such as cut-and-paste between applications, point-and-
B click editing, viewing and editing multiple application programs at the same time, floating
views, intelligent boxes, etc. Firmware version 2.10 is needed in order to use the intelligent
boxes.
C
D

1-4 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 1: Getting Started
DirectSOFT (part number PC-DSOFTx) supports the DirectLOGIC CPU families.
You can use DirectSOFT 5 to program the DL05, DL06, DL105, DL205, DL305, and
DL405 CPUs. A separate manual discusses DirectSOFT programming software. Earlier
programming software versions such as DirectSOFT32, version 4.0 can also be used to 1
program the DL06.

Handheld Programmer 2
All DL06 Micro PLCs have a built-in programming port for use with the handheld
programmer (D2HPP), the same programmer used with the DL05, DL105 and DL205 3
families. The handheld programmer can be used to create, modify and debug your
application program. A separate manual discusses the Handheld Programmer. Only D2
HPPs with firmware version 2.0 or later will program the DL06.
4
NOTE: Not all instructions are available to use with the HPP - the real number instructions, for 5
example. DirectSOFT will be needed to program instructions such as these.
6
I/O Quick Selection Guide 7
The nine versions of the DL06 have input/output circuits which can interface to a wide
variety of field devices. In several instances a particular input or output circuit can interface
to either DC or AC voltages, or both sinking and sourcing circuit arrangements. Check this 8
guide to find the proper DL06 Micro PLC to interface to the field devices in your application.
9
I/O Selection Guide
DL06 Part
INPUTS OUTPUTS 10
I/O type/ Voltage I/O type/
Number Sink/Source Sink/Source Voltage/ Current Ratings*
D006AA
commons
AC / 5
Ranges
90 120 VAC
commons
AC / 4 17 240 VAC, 50/60 Hz 0.5A
11
D006AR AC / 5 90 120 VAC Relay / 4 Sink or Source
6 27VDC, 2A
6 240 VAC, 2A 12
D006DA DC / 5 Sink or Source 12 24 VDC AC / 4 17 240 VAC, 50/60 Hz 0.5A
D006DD1 DC / 5 Sink or Source 12 24 VDC DC / 4 Sink
6 27 VDC, 0.5A (Y0Y1)
6 27 VDC, 1.0A (Y2Y17) 13
12 24 VDC, 0.5A (Y0Y1)
D006DD2 DC / 5 Sink or Source 12 24 VDC DC / 4 Source

D006DR DC / 5 Sink or Source 12 24 VDC Relay / 4 Sink or Source


12 24 VDC, 1.0A (Y2Y17)
6 27VDC, 2A 14
6 240 VAC, 2A
D006DD1D DC / 5 Sink or Source 12 24 VDC DC / 4 Sink
6 27 VDC, 0.5A (Y0Y1)
6 27 VDC, 1.0A (Y2Y17) A
12 24 VDC, 0.5A (Y0Y1)
D006DD2D DC / 5 Sink or Source 12 24 VDC DC / 4 Source

D006DRD DC / 5 Sink or Source 12 24 VDC Relay / 4 Sink or Source


12 24 VDC, 1.0A (Y2Y17)
6 27 VDC, 2A B
6 240 VAC, 2A
C
* See Chapter 2, Specifications for more information about a particular DL06 version.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-5


Chapter 1: Getting Started

Quick Start
1 This example is not intended to tell you everything you need to know about programming
and starting up a complex control system. It is only intended to give you an opportunity
2 to demonstrate to yourself and others the basic steps necessary to power up the PLC and
confirm its operation. Please look for warnings and notes throughout this manual for
important information you will not want to overlook.
3 Step 1: Unpack the DL06 Equipment
4 Unpack the DL06 and gather the parts necessary to build this demonstration system. The
recommended components are:

5 DL06 Micro PLC


AC power cord or DC power supply

6 Toggle switches (see Step 2 on next page)


Hook-up wire, 16-22 AWG

7 DL06 User Manual (this manual)


A small screwdriver, 5/8 flat or #1 Philips type

8 You will need at least one of the following programming options:


D
 irectSOFT Programming Software V5.0 or later (PC-DSOFTx), DirectSOFT Programming
Software Manual (included with the software), and a programming cable (D2-DSCBL connects the
9 DL06 to a personal computer).
or
10 D2-HPP Handheld Programmer, firmware version 2.0 or later, (comes with programming cable).
Please purchase Handheld Programmer Manual D2-HPP-M separately.
11
12 OUTPUT: 6-240V
G LG 0V
AC(L) AC(N) 24V C0
Y0

50 - 60Hz
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12

2.0A, 6 - 27V
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A PWR: 100-240V 50-60Hz 40VA
PWR
RUN
CPU

Y D0-06DR TX1

13
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
14
K oyo

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

PORT1 PORT2 RUN STOP

A
B
C
D

1-6 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


fuse
Chapter 1: Getting Started
-
+24 VDC
+
L L L L L L L L L L L L L L L L

Step 2: Connect Switches to Input Terminals


To proceed with this quick-start exercise or to follow other examples in this manual, you
will need to connect one or more input switches as shown below. If you have DC inputs 1
on an AC-supply DL06, you can use the auxiliary 24VDC supply on the output terminal
2
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
block or other external 12-24VDC power supply. Be sure to follow the instructions in the
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA
Y D0-06DD1
accompanying
X
0 1 WARNING on this page.
2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

INPUT: 12 - 24V 3 - 15mA

D0-06DA, D0-06DD1,
3
LOGIC 06
D0-06DD2, D0-06DR,
D0-06DD1-D, and 4
K oyo D0-06DR1-D DC Input
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.
5
6
12 - 24 VDC
-
fuse

+
7
Toggle Switches
UL Listed 8
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
9
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
OUTPUT: 17-240V
Y
X
0 1 2 3
50 - 60Hz

4 5
0.5A

6 7 10
PWR: 100-240V

11 12 13
50-60Hz 40VA

14 15 16 17 20 21 22
D0-06AA
23 10
INPUT: 90 - 120V 7 - 15mA

D0-06AA and D0-06AR 11


AC input only
LOGIC 06
K oyo
12
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.

90 - 120 VAC 14
Toggle Switches
UL Listed A
fuse

WARNING: Remove power and unplug the DL06 when wiring


the switches. Use only UL-approved switches rated for at
least 250VAC, 1A for AC inputs. Firmly mount the switches
B
before using.
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-7


Chapter 1: Getting Started

Step 3: Connect the Power Wiring


1 Connect the power input wiring for the DL06. Observe all precautions stated earlier
in this manual. For more details on wiring, see Chapter 2 on Installation, Wiring, and
Specifications. When the wiring is complete, close the connector covers. Do not apply power
2 at this time. 12 - 24 VDC
+ -

3 110/220 VAC Power Input 12/24 VDC Power Input

4
5
6
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
G LG N.C. Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
+ - N.C. C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16
OUTPUT: 17-240V 50 - 60Hz 0.5A PWR: 100-240V 50-60Hz 40VA
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 12-24 20W
Y D0-06AA
Y D0-06
7 X
0 1 2

INPUT: 90 - 120V
3

7 - 15mA
4 5 6 7 10 11 12 13 14 15 16 17 20 21 22

X
23
0 1

INPUT: 12 - 24V
2 3 4

3 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20 21 22

8
Step 4: Connect the Programming Device
9 Most
LOGIC
computer.
06
programmers will use DirectSOFT programming software, installed on a personal
LOGIC
K oyo An alternative, if you need a compact portable programming device, is the
06
K oyo
10 Handheld Programmer (firmware version 2.20 or later). Both devices will connect to COM
C0
port X1 X3
theX4 X5 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X0 1 X2of C1 DL06 X7 via
X10 the
X12 appropriate
X15 X17 cable.
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23
C3 X20 X22 N.C.
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C

11 NOTE: The
Handheld
12 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
Programmer
cannot create
Use cable part # or access
13
LOGIC 06
K oyo

D2DSCBL
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

LCD, ASCII
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
fuse

PORT1 PORT2 RUN STOP


DC
Supply or MODBUS
14 instructions.

A (cable comes with HPP)

For replacement
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1

B
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2

cable, use part #


INPUT: 12 - 24V 3 - 15mA

06
DV1000CBL
LOGIC
K oyo

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

PORT1 PORT2 RUN STOP

C
D

1-8 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 1: Getting Started

Step 5: Switch on the System Power


Apply power to the system and ensure the PWR indicator on the DL06 is on. If not, remove
power from the system and check all wiring and refer to the troubleshooting section in 1
Chapter 9 for assistance.

Step 6: Initialize Scratchpad Memory 2


Its a good precaution to always clear the system memory (scratchpad memory) on a new
DL06. There are two ways to clear the system memory: 3
In DirectSOFT, select the PLC menu, then Setup and Initialize Scratch Pad. Initializing Scratch
Pad will return secondary comm port settings and retentive range settings to default. If you have
made any changes to these, you will need to note these changes and re-enter them after initializing
4
Scratchpad.
For the Handheld Programmer, use the AUX key and execute AUX 54. 5
See the Handheld Programmer Manual for additional information.
6
Step 7: Enter a Ladder Program
At this point, DirectSOFT programmers need to refer to Chapter 2 (Quick Start) in the
DirectSOFT Programming Software Manual. There you will learn how to establish a
7
communications link with the DL06 PLC, change CPU modes to Run or Program, and enter
a program. 8
If you are learning how to program with the Handheld Programmer, make sure the CPU is
in Program Mode (the RUN LED on the front of the DL06 should be off). If the RUN LED 9
is on, use the MODE key on the Handheld Programmer to put the PLC in Program Mode,
then switch to TERM. 10
Clear the Program
Equivalent Direct SOFT display
11
CLR CLR

C E AUX ENT ENT CLR


X0 Y0 2 4

OUT
Move to the first
12
NEXT $ A ENT
address and enter
13
STR 0
X0 contact
END
GX A Enter output Y0
14
ENT
OUT 0

Enter the END


SHFT E
4
N
TMR
D
3
ENT
statement A
Enter the following keystrokes on the Handheld Programmer.
After entering the simple example program, put the PLC in Run mode by using the Mode B
key on the Handheld Programmer.
The RUN indicator on the PLC will illuminate, indicating the CPU has entered the Run C
mode. If not, repeat this step, ensuring the program is entered properly or refer to the
troubleshooting guide in chapter 9. D
After the CPU enters the run mode, the output status indicator for Y0 should follow the
switch status on input channel X0. When the switch is on, the output will be on.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-9


Chapter 1: Getting Started

Steps to Designing a Successful System


1 Step 1: Review the Installation Guidelines
Always make safety the first priority in any system
2 design. Chapter 2 provides several guidelines that will
help you design a safer, more reliable system. This
3 chapter also includes wiring guidelines for the various
versions of the DL06 PLC.

4
5 Step 2: Understand the PLC Setup Procedures
6 The PLC is the heart of your automation system.
Make sure you take time to understand the various
features and setup requirements.
7
8
Step 3: Review the I/O Selection Criteria PLC

9 There are many considerations involved when you


Input

select your I/O type and field devices. Take time +

10
Input
to understand how the various types of sensors and Sensing
loads can affect your choice of I/O type. Common

11
12 Step 4: Choose a System Wiring Strategy AC
Power
Loads
It is important to understand the various
13 system design options that are available before
wiring field devices and field-side power
DL06
PLC
Power Input 16 Outputs Commons

20 Inputs Commons

14
+24 VDC
supplies to the Micro PLC.
+

A Step 5: Understand the System Operation


B Before you begin to enter a program, it is very
helpful to understand how the DL06 system Power Up
processes information. This involves not only
C program execution steps, but also involves Initialize Hardware

the various modes of operation and memory


D layout characteristics.

1-10 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 1: Getting Started

Step 6: Review the Programming Concepts


The DL06 PLC instruction set provides for three main approaches to solving the application
program, depicted in the figure below. 1
RLL diagram-style programming is the best tool for solving boolean logic and general CPU register/
accumulator manipulation. It includes dozens of instructions, which will also be needed to augment 2
drums and stages.
The Timer/Event Drum Sequencer features up to 16 steps and offers both time and/or event-based
step transitions. The DRUM instruction is best for a repetitive process based on a single series of
3
steps.
Stage programming (also called RLL ) is based on state-transition diagrams. Stages divide the
plus 4
ladder program into sections which correspond to the states in a flow chart you draw for your
process.
Standard RLL Programming Timer/Event Drum Sequencer Stage Programming
5
(see Chapter 5) (see Chapter 6) (see Chapter 7)

PushUP RAISE
6
X0

7
LDD
V1076

CMPD DOWN LIGHT UP


K309482
SP62 Y0
OUT LOWER Push
DOWN
8
9
After reviewing the programming concepts above, youll be equipped with a variety of tools to
write your application program. 10
Step 7: Choose the Instructions
Once you have installed the Micro PLC and TMR
11
T1
understand the main programming concepts, you
can begin writing your application program. At
K30
CNT 12
CT3
that time you will begin to use one of the most
powerful instruction sets available in a small PLC.
K10
13
Step 8: Understand the Maintenance and
14
Troubleshooting Procedures
Sometimes equipment failures occur when we
A
least expect it. Switches fail, loads short and need
to be replaced, etc. In most cases, the majority B
of the troubleshooting and maintenance time is
spent trying to locate the problem. The DL06
Micro PLC has many built-in features, such as
C
error codes, that can help you quickly identify
problems. D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-11


Chapter 1: Getting Started

Questions and Answers about DL06 Micro PLCs


1 Q. What is the instruction set like?
A. The instruction set is very close to that of our DL260 CPU. The DL06 instructions
2 include the drum sequencing instruction, networking, ASCII, MODBUS, LCD,
intelligent boxes and High-Speed I/O capabilities. High-Speed inputs are available on
3 units with DC inputs only; high-speed outputs are available on units with DC outputs
only.

4 Q. Do I have to buy the full DirectSOFT programming package to program the
DL06?
5 A. Yes. The part number for DirectSOFT (PC-DSOFT6) is now used for all PLCs in the
DirectLOGIC family, and the price is very affordable.
6 Q. Is the DL06 expandable?
A. Yes, the DL06 series function as stand-alone PLCs. However, option card slots allow you
7 to expand the system without changing the footprint.

Q. Does the DL06 have motion control capability?


8 A. Yes, the DL06 has limited motion control capabilities. The High-Speed I/O features offer
either encoder inputs with high-speed counting and presets with interrupt, or a pulse/
9 direction output for stepper control. Three types of motion profiles are available, which are
explained in Appendix E. The H0-CTRIO(2) option module can also be used to provide
10 more motion functionality.

Q. Are the ladder programs stored in a removable EEPROM?


11 A. No. The DL06 contains a non-removable FLASH memory for program storage, which
may be written and erased thousands of times. You may transfer programs to/from
12 DirectSOFT on a PC.

Q. Does the DL06 contain fuses for its outputs?


13 A. There are no output circuit fuses. Therefore, we recommend fusing each channel, or fusing
each common. See Chapter 2 for I/O wiring guidelines.
14 Q. Is the DL06 Micro PLC U.L. approved?
A. The Micro PLC has met the requirements of UL (Underwriters Laboratories, Inc.),
A and CUL (Canadian Underwriters Laboratories, Inc.). See our website, www.
Automationdirect.com, for complete details.
B Q. Does the DL06 Micro PLC comply with European Union (EU) Directives?
C A. The Micro PLC has met the requirements of the European Union Directives (CE). See
our website, www.Automationdirect.com, for complete details.

1-12 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 1: Getting Started

Q. Which devices can I connect to the communication ports of the DL06?


A. Port 1: The port is RS-232C, fixed at 9600 baud, odd parity, address 1, and uses the
proprietary K-sequence protocol. The DL06 can also connect to MODBUS RTU and 1
DirectNET networks as a slave device through port 1. The port communicates with the
following devices:
DV-1000 Data Access Unit, C-more, DirectTouch, LookoutDirect, DSData or Optimation
2
Operator interface panels
DirectSOFT (running on a personal computer)
3
D2-HPP handheld programmer
Other devices which communicate via K-sequence, Directnet, MODBUS RTU protocols should
4
work with the DL06 Micro PLC. Contact the vendor for details.
A. Port 2: This is a multi-function port. It supports RS-232C, RS422, or RS485, with 5
selective baud rates (300 - 38,400 bps), address and parity. It also supports the proprietary
K-sequence protocol as well as DirectNet and MODBUS RTU, ASCII In/Out and
non-sequence/print protocols.
6
Q. Can the DL06 accept 5VDC inputs? 7
A. No. 5 volts is lower than the DC input ON threshold. However, many TTL logic circuits
can drive the inputs if they are wired as open collector (sinking) inputs. See Chapter 2 for I/O 8
wiring guidelines.
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 1-13


Chapter 1: Getting Started

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

1-14 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Installation, Wiring, Chapter
and Specifications
2
In This Chapter...
Safety Guidelines............................................................................... 22
Orientation to DL06 Front Panel....................................................... 25
Mounting Guidelines........................................................................ 27
Wiring Guidelines............................................................................ 211
System Wiring Strategies................................................................. 214
Wiring Diagrams and Specifications................................................ 230
Glossary of Specification Terms....................................................... 248
Chapter 2: Installation, Wiring, and Specifications

Safety Guidelines
1 NOTE: Products with CE marks perform their required functions safely and adhere to relevant
standards as specified by CE directives, provided they are used according to their intended purpose,
2 and the instructions in this manual are strictly followed. The protection provided by the equipment
may be impaired if this equipment is used in a manner not specified in this manual. A listing of our
3 international affiliates is available on our Web site: http://www.automationdirect.com

WARNING: Providing a safe operating environment for personnel and equipment is your
4 responsibility and should be your primary goal during system planning and installation.
Automation systems can fail and may result in situations that can cause serious injury to
5 personnel and/or damage equipment. Do not rely on the automation system alone to provide
a safe operating environment. Sufficient emergency circuits should be provided to stop the
operation of the PLC or the controlled machine or process, either partially or totally. These
6 circuits should be routed outside the PLC in the event of controller failure, so that independent
and rapid shutdown are available. Devices, such as mushroom switches or end of travel limit
7 switches, should operate motor starter, solenoids, or other devices without being processed
by the PLC. These emergency circuits should be designed using simple logic with a minimum
number of highly reliable electromechanical components. Every automation application is
8 different, so there may be special requirements for your particular application. Make sure all
national, state, and local government requirements are followed for the proper installation and
9 use of your equipment.

Plan for Safety


10 The best way to provide a safe operating environment is to make personnel and equipment
safety part of the planning process. You should examine every aspect of the system to
11 determine which areas are critical to operator or machine safety. If you are not familiar with
PLC system installation practices, or your company does not have established installation
12 guidelines, you should obtain additional information from the following sources.
NEMA The National Electrical Manufacturers Association, located in Washington, D.C.,
publishes many different documents that discuss standards for industrial control systems. You can
13 order these publications directly from NEMA. Some of these include:
ICS 1, General Standards for Industrial Control and Systems
14 ICS 3, Industrial Systems
ICS 6, Enclosures for Industrial Control Systems
NEC The National Electrical Code provides regulations concerning the installation and use of
A various types of electrical equipment. Copies of the NEC Handbook can often be obtained from your
local electrical equipment distributor or your local library.
B Local and State Agencies many local governments and state governments have additional
requirements above and beyond those described in the NEC Handbook. Check with your local
Electrical Inspector or Fire Marshall office for information.
C
D

2-2 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Three Levels of Protection


The publications mentioned provide many ideas and requirements for system safety.
At a minimum, you should follow these regulations. Also, you should use the following 1
techniques, which provide three levels of system control.
Emergency stop switch for disconnecting system power 2
Mechanical disconnect for output module power
Orderly system shutdown sequence in the PLC control program 3
Emergency Stops 4
It is recommended that emergency stop circuits be incorporated into the system for every
machine controlled by a PLC. For maximum safety in a PLC system, these circuits must not 5
be wired into the controller, but should be hardwired external to the PLC. The emergency
stop switches should be easily accessed by the operator and are generally wired into a master
control relay (MCR) or a safety control relay (SCR) that will remove power from the PLC
6
I/O system in an emergency.
MCRs and SCRs provide a convenient means for removing power from the I/O system
7
during an emergency situation. By de-energizing an MCR (or SCR) coil, power to the input
(optional) and output devices is removed. This event occurs when any emergency stop switch 8
opens. However, the PLC continues to receive power and operate even though all its inputs
and outputs are disabled. 9
The MCRcircuit could be extended by placing a PLC fault relay (closed during normal
PLC operation) in series with any other emergency stop conditions. This would cause the
MCRcircuit to drop the PLC I/O power in case of a PLC failure (memory error, I/O
10
communications error, etc.).
HOT Use E-Stop and Master Relay
Master
NEUTRAL 11
Control
Power On Guard

12
E STOP Relay
Link

13
MCR
L1 to Output Supply Saw
Guard Line Switch Emergency Arbor
Stop

14
A
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

06
B
LOGIC
K oy o

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

PORT1 PORT2 RUN STOP

MCR
C
L1 to Input Supply
(optional)
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-3


Chapter 2: Installation, Wiring, and Specifications
Emergency Power Disconnect
A properly rated emergency power disconnect should be used to power the PLC controlled
system as a means of removing the power from the entire control system. It may be necessary
1 to install a capacitor across the disconnect to protect against a condition known as outrush.
This condition occurs when the output Triacs are turned off by powering off the disconnect,
2 thus causing the energy stored in the inductive loads to seek the shortest distance to ground,
which is often through the Triacs.
After an emergency shutdown or any other type of power interruption, there may be
3 requirements that must be met before the PLC control program can be restarted. For
example, there may be specific register values that must be established (or maintained from
4 the state prior to the shutdown) before operations can resume. In this case, you may want
to use retentive memory locations, or include constants in the control program to insure a
5 known starting point.

Orderly System Shutdown


6 Ideally, the first level of fault detection is the PLC
control program, which can identify machine
7 problems. Certain shutdown sequences should be
performed. The types of problems are usually things
such as jammed parts, etc., that do not pose a risk
8 of personal injury or equipment damage. Jam
Detect
Turn off
Saw

9
RST

WARNING: The control program must not be the only


RST
form of protection for any problems that may result in
10 a risk of personal injury or equipment damage. Retract
Arm

11 Class 1, Division 2 Approval


This equipment is suitable for use in Class 1, Zone 2, Division 2, groups A, B, C and D or
12 non-hazardous locations only.
WARNING: Explosion Hazard! Substitution of components may impair suitability for Class 1, Division 2.
13 Do not disconnect equipment unless power has been switched off or area is known to be non-
hazardous.

14 WARNING: Explosion Hazard! Do not disconnect equipment unless power has been switched off or the
area is known to be non-hazardous.

A WARNING: All models used with connector accessories must use R/C (ECBT2) mating plug for all
applicable models. All mating plugs shall have suitable ratings for device.
B WARNING: This equipment is designed for use in Pollution Degree 2 environments (installed within an
enclosure rated at least IP54).
C
WARNING: Transient suppression must be provided to prevent the rated voltage from being exceeded
D by 140%.

2-4 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Orientation to DL06 Front Panel


Most connections, indicators and labels on the DL06 Micro PLCs are located on its front 1
panel. The communication ports are located on front of the PLC, as are the option card
slots and the mode selector switch. Please refer to the drawing below. 2
The output and power connector accepts external power and logic and chassis ground
connections on the indicated terminals. The remaining terminals are for connecting
commons and output connections Y0 through Y17. The sixteen output terminals are
3
numbered in octal, Y0-Y7 and Y10-Y17. On DC output units, the end terminal on the
right accepts power for the output stage. The input side connector provides the location for 4
connecting the inputs X0 and X23 and the associated commons.
5
Power Inputs Output Circuit
6
Power Input
Mounting Tab Discrete Outputs Output Status
Indicators (for DC output versions only)
Status
Indicators 7
8
G LG
AC(L) AC(N) 24V
0V
C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7
C2
Y10 Y12 C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
PWR
RUN
9
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR
10
TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X
Communication
RX2
INPUT: 12 - 24V 3 - 15mA

Ports
11
06
LOGIC
K oyo
12
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

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

PORT1 PORT2 RUN STOP

14
Discrete Inputs Input Status Option Slots Mode Switch
Indicators Mounting Tab A
WARNING: For some applications, field device power may still be present on the terminal block
even though the Micro PLC is turned off. To minimize the risk of electrical shock, check all field B
device power before you expose or remove either connector.
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-5


Chapter 2: Installation, Wiring, and Specifications

Terminal Block Removal


1 The DL06 terminals are divided into two groups. Each group has its own terminal block. The
outputs and power wiring are on one block, and the input wiring is on the other. In some
instances, it may be desirable to remove the terminal block for easy wiring. The terminal block is
2 designed for easy removal with just a small screwdriver. The drawing below shows the procedure
for removing one of the terminal blocks.
3
4
5
6
7
8
9
1. Loosen the retention screws on each end of the connector block.
10 2. From the center of the connector block, pry upward with the screwdriver until the
connector is loose.
11 The terminal blocks on DL06 PLCs have regular (m3 size) screw terminals, which will accept
either standard blade-type or #1 Philips screwdriver tips. Use No. 16 to 22 AWG solid/
12 stranded wire. Be careful not to over-tighten; maximum torque is 0.882 to 1.020 Nm (7.806
to 9.028 inch-lbs).

13 Spare terminal blocks are available in an accessory kit. Please refer to part number
D0-ACC-2. You can find this and other accessories on our web site.

14
A
B
C
D

2-6 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Mounting Guidelines
In addition to the panel layout guidelines, other specifications can affect the installation of a
PLC system. Always consider the following:
1
Environmental Specifications
Power Requirements
2
Agency Approvals
Enclosure Selection and Component Dimensions
3
Unit Dimensions 4
The following diagram shows the outside dimensions and mounting hole locations for all
versions of the DL06. Make sure you follow the installation guidelines to allow proper 5
spacing from other components.
6
7
8
9
0.71"
10
18mm

1.46"
11
37mm

12
13
Enclosures
Your selection of a proper enclosure is important to ensure safe and proper operation of your 14
DL06 system. Applications of DL06 systems vary and may require additional features. The
minimum considerations for enclosures include: A
Conformance to electrical standards
Protection from the elements in an industrial environment B
Common ground reference
Maintenance of specified ambient temperature C
Access to equipment
Security or restricted access D
Sufficient space for proper installation and maintenance of equipment

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-7


Chapter 2: Installation, Wiring, and Specifications
Panel Layout & Clearances
There are many things to consider when designing the panel layout. The following items
correspond to the diagram shown. Note: there may be additional requirements, depending on
1 your application and use of other components in the cabinet.
1. Mount the PLCs horizontally as shown below to provide
2 proper ventilation. You cannot mount the DL06 units
vertically, upside down, or on a flat horizontal surface. If
you place more than one unit in a cabinet, there must be a
3 minimum of 7.2 (183 mm) between the units.
2. Provide a minimum clearance of 1.5 (39 mm) between
4 the unit and all sides of the cabinet. Remember to allow for
any operator panels or other items mounted in the door.

5 3. There should also be at least 3 (78 mm) of clearance


between the unit and any wiring ducts that run parallel to
the terminals.
6 4. The ground terminal on the DL06 base must be
connected to a single point ground. Use copper stranded
7 wire to achieve a low impedance. Copper eye lugs should
be crimped and soldered to the ends of the stranded wire to
ensure good surface contact.
8 NOTE: There is a minimum clearance
requirement of 1.5 (38 mm) Temperature Probe
9 between the panel door (or any
devices mounted in the panel door)
10 and the nearest DL06 component.
Ground braid

11 Panel
copper lugs

12
Panel or single 1.5"
point ground 38mm
Star Washers Star Washers min

13 Power Source

1.5"
38mm

14
Pan
el G min
roun
d Te
rmin
al

A Eart
h Gr
oun
1.5"
38mm
min
d

B
C 5. There must be a single point ground (i.e., copper bus bar) for all devices in the panel
requiring an earth ground return. The single point of ground must be connected to the panel
D ground termination. The panel ground termination must be connected to earth ground.
Minimum wire sizes, color coding, and general safety practices should comply with appropriate
electrical codes and standards for your area.

2-8 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
6. A good common ground reference (Earth ground) is essential for proper operation of the DL06.
One side of all control and power circuits and the ground lead on flexible shielded cable must be
properly connected to Earth ground. There are several methods of providing an adequate common
ground reference, including:
a) Installing a ground rod as close to the panel as possible 1
b) Connection to incoming power system ground
7. Evaluate any installations where the ambient temperature may approach the lower or upper
limits of the specifications. If you suspect the ambient temperature will not be within the operating
2
specification for the DL06 system, measures such as installing a cooling/heating source must be taken
to get the ambient temperature within the range of specifications. 3
8. The DL06 systems are designed to be powered by 95-240 VAC or 1224 VDC normally available
throughout an industrial environment. Electrical power in some areas where the PLCs are installed is
not always stable and storms can cause power surges. Due to this, powerline filters are recommended
4
for protecting the DL06 PLCs from power surges and EMI/RFI noise. The Automation Powerline
Filter, for use with 120 VAC and 240 VAC, 15 Amps, is an excellent choice (locate at www. 5
automationdirect.com); however, you can use a filter of your choice. These units install easily
between the power source and the PLC.
6
NOTE: If you are using other components in your system, make sure you refer to the appropriate
manual to determine how those units can affect mounting dimensions. 7
Using Mounting Rails
DL06 Micro PLCs can be secured to a panel by using mounting rails. We recommend rails
8
that conform to DIN EN standard 50022. They are approximately 35 mm high, with a
depth of 7 mm. If you mount the Micro PLC on a rail, do consider using end brackets on 9
each side of the PLC. The end bracket helps keep the PLC from sliding horizontally along the
rail, reducing the possibility of accidentally pulling the wiring loose. On the bottom of the
PLC are two small retaining clips. To secure the PLC to a DIN rail, place it onto the rail and
10
gently push up on the clips to lock it onto the rail. To remove the PLC, pull down on the
retaining clips, lift up on the PLC slightly, then pull it away from the rail. 11
DIN rail slot is designed for 35 mm x 7 mm rail
12
DIN Rail Dimensions conforming to DIN EN 50022
7mm
13
14
35mm A
B
Retaining Clip
C
NOTE: Refer to our catalog or web site for a complete listing of DINnector connection systems. D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-9


Chapter 2: Installation, Wiring, and Specifications

Environmental Specifications
The following table lists the environmental specifications that generally apply to DL06
1 Micro PLCs. The ranges that vary for the Handheld Programmer are noted at the bottom of
this chart. Certain output circuit types may have derating curves, depending on the ambient
temperature and the number of outputs ON. Please refer to the appropriate section in this
2 chapter pertaining to your particular DL06 PLC.

3 Specification
Environmental Specifications
Rating

4 Storage temperature
Ambient operating temperature*
4F to 158F (20C to 70C)
32F to 131F (0C to 55C)
Ambient humidity** 5% 95% relative humidity (noncondensing)
5 Vibration resistance
Shock resistance
MIL STD 810C, Method 514.2
MIL STD 810C, Method 516.2

6 Noise immunity
Atmosphere
NEMA (ICS3304)
No corrosive gases
Agency approvals UL, CE (C1D2), FCC class A
7
* Operating temperature for the Handheld Programmer and the DV1000 is 32 to 122F (0 to 50C) Storage temperature
8 for the Handheld Programmer and the DV1000 is 4 to 158F (20 to 70C).
**Equipment will operate down to 5% relative humidity; however, static electricity problems occur much more frequently
at low humidity levels (below 30%). Make sure you take adequate precautions when you touch the equipment. Consider
9 using ground straps, anti-static floor coverings, etc. if you use the equipment in low-humidity environments.

Agency Approvals
10 Some applications require agency approvals for particular components. The DL06 Micro
PLC agency approvals are listed below:
11 UL (Underwriters Laboratories, Inc.)
CUL (Canadian Underwriters Laboratories, Inc.)
12 CE (European Economic Union)

Marine Use
13 American Bureau of Shipping (ABS) certification requires flame-retarding insulation as
per 4-8-3/5.3.6(a). ABS will accept Navy low smoke cables, cable qualified to NEC
14 Plenum rated (fire resistant level 4), or other similar flammability resistant rated cables. Use
cable specifications for your system that meet a recognized flame retardant standard (i.e.,
A UL, IEEE, etc.), including evidence of cable test certification (i.e., tests certificate, UL file
number, etc.).

B NOTE: Wiring must be low smoke per the above paragraph. Teflon coated wire is also
recommended.
C
D

2-10 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Wiring Guidelines
Connect the power input wiring for the DL06. Observe all precautions stated earlier in this
manual. When the wiring is complete, close the connector covers. Do not apply power at this
1
time.
12 - 24 VDC
2
+ -
110/220 VAC Power Input 12/24 VDC Power Input 3
4
5
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17G
Y11 Y13 Y14 Y16 + N.C. -
LG N.C. Y0
N.C. C0 Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15
Y11 Y13 Y14 Y1
6
7D0-
OUTPUT: 17-240V 50 - 60Hz 0.5A PWR: 100-240V 50-60Hz 40VA OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 12-24 20W
Y Y D0-06AA
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 200 211 222 233 4 5 6 7 10 11 12 13 14 15 16 17 20 21 2
X X

8
INPUT: 90 - 120V 7 - 15mA INPUT: 12 - 24V 3 - 15mA

WARNING: Once the power wiring is connected, secure the terminal block cover in the closed
9
06
position. There is a risk of electrical shock if you accidentally touch the connection terminals or
powerLOGIC
wiring when the cover is open.
K oyo
LOGIC 06
K oyo 10
External Power
X1 Source

11
C0 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23C0N.C.X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X2
X15 X17 X20 X22 N.C.X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22
The power
X0
source
X2 C1
must
X5
be capable of suppling
X7 X10 X12 C3
voltage and current complying with individual
Micro PLC specifications, according to the following specifications:

NOTE: The rating between all internal circuits is BASIC INSULATION ONLY. 12
Power Source Specifications
13
DC
fuse

Item DL06 AC Powered


Supply Units DL06 DC Powered Units
Input Voltage Range 110/220 VAC (100240 VAC/50-60 Hz) 1224 VDC (10.826.4 VDC) 14
Maximum Inrush Current 13 A, 1ms (100240 VAC) 10A
Maximum Power
15 A, 1ms (240264 VAC)
40 VA 20 W A
Voltage Withstand (dielectric) 1 minute @ 1500 VAC between primary, secondary, field ground
Insulation Resistance > 10 Mq at 500 VDC B
NOTE: Recommended wire size for field devices is 16 - 22 AWG solid/stranded. Tighten terminal C
screws to 7.81 lb-in (0.882 N*m) to 9.03 lb-in (1.02 N*m).
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-11


Chapter 2: Installation, Wiring, and Specifications

Planning the Wiring Routes


The following guidelines provide general information on how to wire the I/O connections to
1 DL06 Micro PLCs. Refer to the corresponding specification sheet which appears later in this
chapter for specific information on wiring a particular PLC .
2 1. Each terminal connection of the DL06 PLC can accept one 16 AWG wire or two 18 AWG size
wires. Do not exceed this recommended capacity.

3 2. Always use a continuous length of wire. Do not splice wires to attain a needed length.
3. Use the shortest possible wire length.

4 4. Use wire trays for routing where possible.


5. Avoid running wires near high energy wiring.

5 6. Avoid running input wiring close to output wiring where possible.


7. To minimize voltage drops when wires must run a long distance, consider using multiple wires for

6 the return line.


8. Avoid running DC wiring in close proximity to AC wiring where possible.

7 9. Avoid creating sharp bends in the wires.


10. Install the recommended powerline filter to reduce power surges and EMI/RFI noise.

8
9
10
11
12
13
14
A
B
C
D

2-12 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Fuse Protection for Input and Output Circuits


Input and Output circuits on DL06 Micro PLCs do not have internal fuses. In order to
protect your Micro PLC, we suggest you add external fuses to your I/O wiring. A fast-blow 1
fuse, with a lower current rating than the I/O banks common current rating, can be wired to
each common. Or, a fuse with a rating of slightly less than the maximum current per output
point can be added to each output. Refer to the Micro PLC specification sheets further in
2
this chapter to find the maximum current per output point or per output common. Adding
the external fuse does not guarantee the prevention of Micro PLC damage, but it will provide 3
added protection.
4
5
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
PWR
RUN
6
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA

7
CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
K oyo
8
9
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

PORT1 PORT2 RUN STOP

10
I/O Point Numbering
11
All DL06 Micro PLCs have a fixed I/O configuration. It follows the same octal numbering
system used on other DirectLogic family PLCs, starting at X0 and Y0. The letter X is always 12
used to indicate inputs and the letter Y is always used for outputs.
The I/O numbering always starts at zero and does not include the digits 8 or 9. The addresses 13
are typically assigned in groups of 8 or 16, depending on the number of points in an I/O
group. For the DL06, the twenty inputs use reference numbers X0 X23. The sixteen output
points use references Y0 Y17.
14
Additional I/O modules can be installed in the four option slots. See the DL05/06 Option
Modules User Manual, D0-OPTIONS-M, for a complete selection of modules and how to
A
addresss them in the DL06. This manual can either be ordered from Automationdirect or
downloaded from our website. B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-13


Chapter 2: Installation, Wiring, and Specifications

System Wiring Strategies


1 The DL06 Micro PLC is very flexible and will work in many different wiring configurations.
By studying this section before actual installation, you can probably find the best wiring
2 strategy for your application. This will help to lower system cost and wiring errors, and avoid
safety problems.

3 PLC Isolation Boundaries


PLC circuitry is divided into three main regions separated by isolation boundaries, shown
4 in the drawing below. Electrical isolation provides safety, so that a fault in one area does not
damage another. A powerline filter will provide isolation between the power source and the
power supply. A transformer in the power supply provides magnetic isolation between the
5 primary and secondary sides. Opto-couplers provide optical isolation in Input and Output
circuits. This isolates logic circuitry from the field side, where factory machinery connects.
6 Note that the discrete inputs are isolated from the discrete outputs, because each is isolated
from the logic side. Isolation boundaries protect the operator interface (and the operator)
from power input faults or field wiring faults. When wiring a PLC, it is extremely important to
7 avoid making external connections that connect logic side circuits to any other.
Power 16 Discrete Outputs

8 Input

Output circuit LCD monitor

9
10
Power 4 Optional
Supply CPU card slots

Isolation

11 boundary
Input circuit 2 comm. ports

12 20 discrete Inputs
To programming device
or Operator interface

13 The next figure shows the internal layout of DL06 PLCs, as viewed from the front panel.
Power
Filter 16 Discrete Outputs Commons
14 Input

A Output Circuit Optional


Card Slots

Main
B Power
Supply
CPU
LCD Monitor

2 Comm.
C DL06 Input Circuit
Ports
PLC
D To Programming De-
vice, Operator Interface
20 Discrete Commons
Inputs or networking

2-14 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Connecting Operator Interface Devices


Operator interfaces require data and power connections. Some operator interfaces usually
require separate AC power. However, other operator interface devices like the popular 1
DV-1000 Data Access Unit may be powered directly from the DL06 Micro PLC. Connect
the DV-1000 to communication port 1 on the DL06 Micro PLC using the cable shown
below. A single cable contains transmit/receive data wires and +5 V power.
2
DL06 Micro PLC
3
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 DV-1000
RJ12 RJ12

4
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1

phone style phone style


RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
Use cable part no.
K oyo

5
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

PORT1 PORT2 RUN STOP


DV1000CBL

C-more operator interface touch panels use a provided 24 VDC plug-in power supply.
Connect the DL06 to the serial connector on the rear of the C-more panel using the cable
shown below.
6
DL06 Micro PLC

15-pin 15-pin D-shell


7
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17

VGA male male

8
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
K oyo

9
C0
X0
X1
X2
X3
C1
X4
X5
X6
X7
C2 X11 X13 X14 X16
X10 X12 C3
C4 X21 X23 N.C.
X15 X17 X20 X22 N.C.
TERM Use cable part no.
PORT1 PORT2 RUN STOP
EA-2CBL-1

Connecting Programming Devices


DL06 Micro PLCs can be programmed with either a handheld programmer or with
10
DirectSOFT on a PC. Connect the DL06 to a PC using the cable shown below.
DL06 Micro PLC 11
RJ12 9-pin D-shell

12
phone style female
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

Use cable part no.

13
LOGIC 06
K oyo

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
D2DSCBL
PORT1 PORT2 RUN STOP

The D2-HPP Handheld Programmer comes with a communications cable. For a replacement
part, use the cable shown below.
14
DL06 Micro PLC A
RJ12 RJ12 D2HPP
OUTPUT: 6-240V
Y
X
0

INPUT: 12 - 24V
1
G

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

3
Y0
Y1
Y2

3 - 15mA
4
Y3
50 - 60Hz
C1
Y4
Y5

5
Y6
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
50-60Hz 40VA

17 20 21 22
D0-06DR
23
PWR
RUN
CPU
TX1
RX1
TX2
RX2
phone style phone style

(cable comes with HPP)


B
06

C
LOGIC

For replacement
K oyo

C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

cable, use part no.


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

DV1000CBL
PORT1 PORT2 RUN STOP

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-15


Chapter 2: Installation, Wiring, and Specifications

Sinking / Sourcing Concepts


Before going further in our presentation of wiring strategies, we need to introduce the
1 concepts of sinking and sourcing. These terms apply to typical input or output circuits. It is
the goal of this section to make these concepts easy to understand. First, we give the following
2 short definitions, followed by practical applications.
Sinking = Path to supply ground ()
3 Sourcing = Path to supply source (+)
Notice the reference to (+) and () polarities. Sinking and sourcing terminology applies only
4 to DC input and output circuits. Input and output points that are either sinking or sourcing
can conduct current in only one direction. This means it is possible to connect the external
5 supply and field device to the I/O point with current trying to flow in the wrong direction,
and the circuit will not operate. However, we can successfully connect the supply and field
device every time by understanding sourcing and sinking.
6 For example, the figure to the right depicts a sinking input. To properly connect the external
supply, we just have to connect it so the input provides a path to ground (). So, we start at
7 the PLC input terminal, follow through the input
Input
PLC
sensing circuit, exit at the common terminal, and
8 connect the supply () to the common terminal.
By adding the switch, between the supply (+) and +
(sinking)

the input, we have completed the circuit. Current Input


9 flows in the direction of the arrow when the switch Sensing
is closed. Common
10 By applying the circuit principle above to the four
possible combinations of input/output sinking/sourcing types, we have the four circuits
11 as shown below. The DC-powered DL06 Micro PLCs have selectable sinking or sourcing
inputs and either sinking or sourcing outputs. Any pair of input/output circuits shown below
is possible with one of the DL06 models.
12
13 Sinking Input
PLC
Sinking Output
PLC
Input Output

14 +
Load
+
Input Output

A
Common Sensing Switch Common

B Sourcing Input
PLC
Sourcing Output
PLC
Common Common
C + Input +
Sensing Output
D Input Switch Output
Load

2-16 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
I/O Common Terminal Concepts
In order for a PLC I/O circuit to operate, PLC
Field Main Path
current must enter at one terminal and exit
at another. This means at least two terminals
+
Device (I/O point) I/O
Circuit 1
are associated with every I/O point. In the
figure to the right, the input or output
terminal is the main path for the current.

Return Path
2
One additional terminal must provide the
return path to the power supply. PLC
3
Most input or output point groups on PLCs
share the return path among two or more Input 1
Input Sensing
4
I/O points. The figure to the right shows
a group (or bank) of 4 input points which
share a common return path. In this way,
Input 2 5
the four inputs require only five terminals Input 3
instead of eight.
Input 4
6
NOTE: In the circuit to the right, the
current in the common path is 4 times any
+
7
channels input current when all inputs are Common
energized. This is especially important in
output circuits, where heavier gauge wire is
8
sometimes necessary on commons.
9
Most DL06 input and output circuits are grouped into banks that share a common return
path. The best indication of I/O common grouping is on the wiring label. The I/O common
groups are separated by a bold line. A thinner line
10
separates the inputs associated with that common. To
the right, notice that X0, X1, X2, and X3 share the 11
common terminal C0, located to the left of X1.
12
The following complete set of labels shows five banks of four inputs and four banks of four 13
outputs. One common is provided for each bank.
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 14
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.

C0 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.

This set of labels is for DC (sinking) output versions such as the D0-06DD1 and B
D0-06DD1-D. One common is provided for each group of four outputs, and one designated
terminal on the output side accepts power for the output stage.
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
C
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V
D
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.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-17


Chapter 2: Installation, Wiring, and Specifications
Connecting DC I/O to Solid State Field Devices
In the previous section on sinking and sourcing concepts, we discussed DC I/O circuits that
only allow current to flow one way. This is also true for many of the field devices which have
1 solid-state (transistor) interfaces. In other words, field devices can also be sourcing or sinking.
When connecting two devices in a series DC circuit (as is the case when wiring a field device to a
2 PLC DC input or output), one must be wired as sourcing and the other as sinking.

Solid State Input Sensors


3 The DL06s DC inputs are flexible in that they detect current flow in either direction, so they
can be wired as either sourcing or sinking. In the following circuit, a field device has an open-
4 collector NPN transistor output. It sinks current from the PLC input point, which sources
current. The power supply can be the included auxiliary 24 VDC power supply or another
supply (+12 VDC or +24 VDC), as long as the input specifications are met.
5 Field Device PLC DC Input
Output Input

6 (sinking)
Supply
(sourcing)

Ground + Common
7
8 In the next circuit, a field device has an open-emitter PNP transistor output. It sources
current to the PLC input point, which sinks the current back to ground. Since the field
9 device is sourcing current, no additional power supply is required between the device and the
PLC DC Input.
Field Device
10 =>
Input
PLC DC Input

(sinking)

11 Output (sourcing)

Ground Common

12
Solid State Output Loads
13 Sometimes an application requires connecting a PLC output point to a solid state input on
a device. This type of connection is usually made to carry a low-level signal, not to send DC
14 power to an actuator.
The DL06 PLC family offers DC outputs that are sinking only or DC outputs that are
A sourcing. All sixteen outputs have the same electrical common, even though there are four
common terminal screws. In the following circuit, the PLC output point sinks current to the
output common when energized. It is connected to a sourcing input of a field device input.
B PLC DC Output Field Device
Power

C +DC Power
Output Input
=>

(sinking) + (sourcing)

D Common
2 .25
> Ground

2-18 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
In the next example we connect a PLC DC output point to the sinking input of a field
device. This is a bit tricky, because both the PLC output and field device input are sinking
type. Since the circuit must have one sourcing and one sinking device, we add sourcing
capability to the PLC output by using a pull-up resistor. In the circuit below, we connect
Rpull-up from the output to the DC output circuit power input.
1
PLC DC Output
+DC pwr
Power
2
3
Field Device
R pull-up
(sourcing)
(sinking) Output Input R input

4
+ (sinking)
Supply
Common Ground

5
NOTE 1: DO NOT attempt to drive a heavy load (>25 mA) with this pull-up method.
6
NOTE 2: Using the pull-up resistor to implement a sourcing output has the effect of inverting the
output point logic. In other words, the field device input is energized when the PLC output is OFF, 7
from a ladder logic point-of-view. Your ladder program must comprehend this and generate an
inverted output. Or, you may choose to cancel the effect of the inversion elsewhere, such as in the
field device.
8
It is important to choose the correct value of Rpull-up. In order to do so, we need to know the 9
nominal input current to the field device (Iinput) when the input is energized. If this value
is not known, it can be calculated as shown (a typical value is 15 mA). Then use Iinput and
the voltage of the external supply to compute Rpull-up. Then calculate the power Ppull-up (in
10
watts), in order to size Rpull-up properly.
I
V input (turnon)
11
input =
R input

V supply 0.7 V supply


2 12
R pull-up = R input P pull-up =
I input R pullup
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-19


Chapter 2: Installation, Wiring, and Specifications

Relay Output Wiring Methods


The D006AR and the D006DR models feature relay outputs. Relays are best for the
1 following applications:
Loads that require higher currents than the solid-state DL06 outputs can deliver
2 Cost-sensitive applications
Some output channels need isolation from other outputs (such as when some loads require AC
3 while others require DC)
Some applications in which NOT to use relays:
4 Loads that require currents under 10 mA
Loads which must be switched at high speed and duty cycle
5 This section presents various ways to wire relay outputs to the loads. The relay output DL06s
have sixteen normally-open SPST relays available. They are organized with four relays per
6 common. The figure below shows the relays and the internal wiring of the PLC. Note that
each group is isolated from the other group of outputs.

7 Y0 Common Y1 Y2 Y3 Y4 Common Y5 Y6 Y7

8
9
10 In the circuit below, all loads use the same AC power supply which powers the DL06 PLC.
In this example, all commons are connected together.
11
12 L L L L L L L L L L L L L L L L

13
14
A
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
Y D0-06AR
B X
0 1 2

INPUT: 90 - 120V
3 4

7 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

C In the circuit on the following page, loads for Y0 Y3 use the same AC power supply which
powers the DL06 PLC. Loads for Y4 Y7 use a separate DC supply. In this example, the

06
commons are separated according to which supply powers the associated load.
D LOGIC
K oyo

C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

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

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


Chapter 2: Installation, Wiring, and Specifications

+24 VDC
L N
-

11

+
fuse
L L L L L L L L

OUTPUT: 6-240V
Y
G LG
AC(L) AC(N) 24V
0V
C0
50 - 60Hz
Y0
Y1
Y2
Y3
C1

2.0A,
Y4
Y5
Y6
Y7
C2
Y10

6 - 27V
22Y12
Y11 Y13
C3

2.0A
Y15 Y17
Y14 Y16 N.C.
PWR: 100-240V 50-60Hz 40VA
D0-06AR
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

33
X
INPUT: 90 - 120V 7 - 15mA

06
44
LOGIC
K oyo

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.

AC
55
Supply

66
Relay Outputs Transient Suppression for Inductive Loads in a Control System
The following pages are intended to give a quick overview of the negative effects of transient 77
voltages on a control system and provide some simple advice on how to effectively minimize

automation world. Many mysterious errors that can afflict an installation can be traced back to 88
them. The need for transient suppression is often not apparent to the newcomers in the

a lack of transient suppression.


What is a Transient Voltage and Why is it Bad? 99
Inductive loads (devices with a coil) generate transient voltages as they transition from being
energized to being de-energized. If not suppressed, the transient can be many times greater 10 10
than the voltage applied to the coil. These transient voltages can damage PLC outputs or other
electronic devices connected to the circuit, and cause unreliable operation of other electronics 1111
in the general area. Transients must be managed with suppressors for long component life and
reliable operation of the control system.
This example shows a simple circuit with a small 24 V/125 mA/3 W relay. As you can see,
12
12
when the switch is opened, thereby de-energizing the coil, the transient voltage generated across
the switch contacts peaks at 140 V. 13
13
Example: Circuit with no Suppression
Oscilloscope 14
14 Volts
160
140

AA 120
100
+ 80
24 VDC
- Relay Coil BB 60
40
(24V/125mA/3W, 20
AutomationDirect part no.
750-2C-24D)
CC 0
-20

DD

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-21


Chapter 2: Installation, Wiring, and Specifications

In the same circuit on the previous page, replacing the relay with a larger 24 V/290 mA/7 W relay
will generate a transient voltage exceeding 800 V (not shown). Transient voltages like this can
cause many problems, including:
1 Relay contacts driving the coil may experience arcing, which can pit the contacts and reduce the
relays lifespan.
2 Solid state (transistor) outputs driving the coil can be damaged if the transient voltage exceeds the
transistors ratings. In extreme cases, complete failure of the output can occur the very first time a coil
3 is de-energized.
Input circuits, which might be connected to monitor the coil or the output driver, can also be
damaged by the transient voltage.
4 A very destructive side-effect of the arcing across relay contacts is the electromagnetic interference
(EMI) it can cause. This occurs because the arcing causes a current surge, which releases RF
5 energy. The entire length of wire between the relay contacts, the coil, and the power source carries
the current surge and becomes an antenna that radiates the RF energy. It will readily couple into
6 parallel wiring and may disrupt the PLC and other electronics in the area. This EMI can make an
otherwise stable control system behave unpredictably at times.

7 PLCs Integrated Transient Suppressors


Although the PLCs outputs typically have integrated suppressors to protect against transients,
8 they are not capable of handling them all. It is usually necessary to have some additional
transient suppression for an inductive load.
9 Here is another example using the same 24 V/125 mA/3 W relay used earlier. This example
measures the PNP transistor output of a D0-06DD2 PLC, which incorporates an integrated
10 Zener diode for transient suppression. Instead of the 140V peak in the first example, the
transient voltage here is limited to about 40 V by the Zener diode. While the PLC will probably
tolerate repeated transients in this range for some time, the 40 V is still beyond the modules
11 peak output voltage rating of 30 V.
Example: Small Inductive Load with Only Integrated Suppression
12 2VFLOORVFRSH

9ROWV

13 )RUWKLVH[DPSOHD9P$:
UHOD\LVXVHG $XWRPDWLRQ'LUHFW
SDUWQR&'




14 


9'& 

A 5HOD\
&RLO 


B




C The next example uses the same circuit as above, but with a larger 24 V/290 mA/7 W relay,
thereby creating a larger inductive load. As you can see, the transient voltage generated is much
D worse, peaking at over 50 V. Driving an inductive load of this size without additional transient
suppression is very likely to permanently damage the PLC output.

2-22 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

Example: Larger Inductive Load with Only Integrated Suppression


2VFLOORVFRSH

)RUWKLVH[DPSOHDP$:
9ROWV

1
2
UHOD\LVXVHG $XWRPDWLRQ'LUHFW 
SDUWQR6&(*9'&



9'&
5HOD\



3
4
&RLO



5
Additional transient suppression should be used in both these examples. If you are unable
to measure the transients generated by the connected loads of your control system, using 6
additional transient suppression on all inductive loads would be the safest practice.
7
Types of Additional Transient Protection
DC Coils: 8
The most effective protection against transients from a DC coil is a flyback diode. A flyback
diode can reduce the transient to roughly 1V over the supply voltage, as shown in this example. 9
10
DC Flyback Circuit
Oscilloscope
Volts
30 11
25

24 VDC
+
_
20

15
12
10

5
13
0

-5 14
Sinking Sourcing
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-23


Chapter 2: Installation, Wiring, and Specifications

Many AutomationDirect socketed relays and motor starters have add-on flyback diodes
that plug or screw into the base, such as the AD-ASMD-250 protection diode module and
1 784-4C-SKT-1 socket module shown below. If an add-on flyback diode is not available for
your inductive load, an easy way to add one is to use AutomationDirects DN-D10DR-A
2 diode terminal block, a 600 VDC power diode mounted in a slim DIN rail housing.

3
4
5
6 AD-ASMD-250 784-4C-SKT-1 DN-D10DR-A
Protection Diode Module Relay Socket Diode Terminal Block
7
Two more common options for DC coils are Metal Oxide Varistors (MOV) or TVS diodes.
8 These devices should be connected across the driver (PLC output) for best protection as shown
below. The optimum voltage rating for the suppressor is the lowest rated voltage available that
will NOT conduct at the supply voltage, while allowing a safe margin.
9 AutomationDirects ZL-TSD8-24 transorb module is a good choice for 24 VDC circuits. It is
a bank of 8 uni-directional 30 V TVS diodes. Since they are uni-directional, be sure to observe
10 the polarity during installation. MOVs or bi-directional TVS diodes would install at the same
location, but have no polarity concerns.
11 DC MOV or TVS Diode Circuit

12
+
13 24 VDC _

14 ZL-TSD8-24
Transorb Module
A Sinking Sourcing

B
C
D

2-24 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

AC Coils:
Two options for AC coils are MOVs or bi-directional TVS diodes. These devices are most
effective at protecting the driver from a transient voltage when connected across the driver 1
(PLC output) but are also commonly connected across the coil. The optimum voltage rating
for the suppressor is the lowest rated voltage available that will NOT conduct at the supply
voltage, while allowing a safe margin.
2
AutomationDirects ZL-TSD8-120 transorb module is a good choice for 120 VAC circuits. It
is a bank of eight bi-directional 180 V TVS diodes.
3
4
AC MOV or Bi-Directional Diode Circuit
5
6
VAC

7
ZL-TSD8-120
Transorb Module 8
9
NOTE: Manufacturers of devices with coils frequently offer MOV or TVS diode suppressors as an
add-on option which mount conveniently across the coil. Before using them, carefully check the
10
suppressors ratings. Just because the suppressor is made specifically for that part does not mean it
will reduce the transient voltages to an acceptable level. 11
For example, a MOV or TVS diode rated for use on 24-48 VDC coils would need to have a
high enough voltage rating to NOT conduct at 48 V. That suppressor might typically start
12
conducting at roughly 60 VDC. If it were mounted across a 24 V coil, transients of roughly
84 V (if sinking output) or -60 V (if sourcing output) could reach the PLC output. Many 13
semiconductor PLC outputs cannot tolerate such levels.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-25


Chapter 2: Installation, Wiring, and Specifications

Prolonging Relay Contact Life


Relay contacts wear according to the amount of relay switching, amount of spark created at
1 the time of open or closure, and presence of airborne contaminants. There are some steps you
can take to help prolong the life of relay contacts, such as switching the relay on or off only
2 when it is necessary, and if possible, switching the load on or off at a time when it will draw
the least current. Also, take measures to suppress inductive voltage spikes from inductive DC
loads such as contactors and solenoids.
3 For inductive loads in DC circuits we recommend using a suppression diode as shown in the
following diagram (DO NOT use this circuit with an AC power supply). When the load is
4 energized the diode is reverse-biased (high impedance). When the load is turned off, energy
stored in its coil is released in the form of a negative-going voltage spike. At this moment the
5 diode is forward-biased (low impedance) and shunts the energy to ground. This protects the
relay contacts from the high voltage arc that would occur just as the contacts are opening.

6 Place the diode as close to the inductive field device as possible. Use a diode with a peak
inverse voltage rating (PIV) at least 100 PIV, 3 A forward current or larger. Use a fast-
recovery type (such as Schottky type). DO NOT use a small-signal diode such as 1N914,
7 1N941, etc. Be sure the diode is in the circuit correctly before operation. If installed
backwards, it short-circuits the supply when the relay energizes.
8 PLC Relay Output Inductive Field Device

9 Output Input

10 Common + Common

11
12
13
14
A
B
C
D

2-26 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


fuse
-
+24 VDC
+
Chapter
L L L L 2:
L Installation,
L L L L L L L Wiring,
L L L L and Specifications

DC Input Wiring Methods


PLC DC Input
DL06 Micro PLCs with DC inputs are particularly Input
flexible because they can be wired as either sinking
or sourcing. The dual diodes G LG
(shown
0V Y0
toY2theC1right)
Y5 Y7 Y10 Y12 C3 Y15 Y17
1
allow 10.8 26.4 VDC. The24Vtarget
AC(L) AC(N) C0 applications
Y1 Y3 Y4 are C2 Y11 Y13 Y14 Y16 +V
Y6

+12 VDC and


group of inputs Y
+24 VDC. You can actually
OUTPUT: Sinking Output 6 - 27V
wire each50-60Hz 40VA
1.0A PWR: 100-240V

associated common group of inputs Common D0-06DD1 2


X
as DC sinking and the other
INPUT: 12 - 24V
half as DC sourcing.
3 - 15mA
Inputs grouped by a common must be all sinking or all 3
sourcing.
fuse
In the first and simplest example -
+12 VDC +24 VDC
below, all commons are connected together- and all inputs 4
are sinking.
LOGIC
+
06
K oyo
L L L L L L L L
+
L L L L L L L L
5
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. 6
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 +V
7
OUTPUT: Sinking Output
Y+24 VDC
6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA
D0-06DD1 8
X -
INPUT: 12 - 24V

+
3 - 15mA
9
10
LOGIC 06
In the next example, the first eight inputs are sinking, and the last twelve are sourcing.
K oyo 11
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. 12
13
+12 VDC
-
+24 VDC
+ 14
+
-
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-27


Chapter 2: Installation, Wiring, and Specifications

DC Output Wiring Methods


DL06 DC output circuits are high-performance transistor switches with low on-resistance
1 and fast switching times. Please note the following characteristics which are unique to the DC
output type:
2 There is only one electrical common for all sixteen outputs. All sixteen outputs belong to one bank.
The output switches are current-sinking only or current sourcing only. Refer to the detailed
3 specifications in this manual to determine which type output is present on a particular model.
The output circuit inside the PLC requires external power. The supply () must be connected to

4 a common terminal, and the supply (+) connects the right-most terminal on the upper connector
(+V).
In the example below, all sixteen outputs share a common supply.
5
-
6 L L L L L L L L L L L L L L L L
+
+24 VDC

7
8
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17

9 AC(L) AC(N) 24V C0


OUTPUT: Sinking Output
Y1 Y3
6 - 27V
Y4 Y6
1.0A
C2 Y11 Y13 Y14 Y16 +V
PWR: 100-240V 50-60Hz 40VA

In the nextYexample below, the outputs D0-06DD1


have split supplies. The first eight outputs are using a
10
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
+12 VDC supply,
X and the last eight are using a +24 VDC supply. However, you can split the
INPUT: 12 - 24V 3 - 15mA
outputs among any number of supplies, as long as:
11 all supply voltages are within the specified range
all output points are wired as sinking

12 LOGIC 06
all source () terminals are connected together
K oyo
+12 VDC +24 VDC

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.
+
L L L L L L L L L L L L L L L L
14
A
B DC
Supply
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 +V
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA
D0-06DD1
C Y
Warning: The maximum
0 1 2 3output
4 5 current
6 7 from
10 11 the
12 Auxiliary 24 VDC
13 14 15 16 17 20 power
21 22 depends
23
X Refer to Chapter 4, page 4-6, to determine how much current can be drawn from
configuration.
on the I/O
INPUT: 12 - 24V 3 - 15mA

D the Auxiliary 24 VDC power for your particular I/O configuration.

2-28
LOGIC
oyo
06
DL06 Micro PLC UserKManual, 3rd Edition, Rev. D
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
Signal Common
Power Input Pulse
Direction

Chapter 2: Installation, Wiring, and Specifications

High-Speed I/O Wiring Methods G LG 0V


AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 +V
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA
DL06 versions with
Y DC type input or output points contain a dedicated High-Speed I/O
circuit (HSIO). The
X
0 1 2 3 4
D0-06DD1
5 6 7
circuit configuration is programmable, and it processes specific I/O
INPUT: 12 - 24V 3 - 15mA
10 11 12 13 14 15 16 17 20 21 22 23
1
points independently from the CPU scan. Appendix E discusses the programming options for
HSIO. While the HSIO circuit has six modes, we show wiring diagrams for two of the most
popular modes in this chapter. The high-speed input interfaces to points X0 X3. Properly
2
configured, the DL06LOGIC 06
can count quadrature pulses at up to 7 kHz from an incremental
3
encoder as shown below. K oyo
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

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

5
6
Phase A = X0
Phase B = X1
7
8
NOTE: Do not use this drawing to wire your device. This is a general example and is not specific
to any PLC model, stepper or encoder. Always refer to the device documentaion for proper wiring 9
connections.
10
Motor
Amplifier

-
11
12
+24 VDC
+

Signal Common
Power Input Pulse
Direction
13
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 +V
14
A
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA
Y D0-06DD1
DL06 versions withX DC type output points can use the High Speed I/O Pulse Output
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

feature. It can generate high-speed pulses at up to 10 kHz for specialized control such as
INPUT: 12 - 24V 3 - 15mA

stepper motor / intelligent drive systems. Output Y0 and Y1 can generate pulse and direction
signals, or it can generate CCW and CW pulse signals respectively. See Appendix E on high-
B
speed input and pulse output
LOGIC
options. 06
K oyo C
NOTE: Do not use this drawing toX3wire your device. This is a general example and is not specific
D
C0 X1 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

to any PLC model, stepper orX0 encoder.


X2 C1 X5
Always refer toX15the
X7 X10 X12 C3
device documentaion for proper wiring
X17 X20 X22 N.C.

connections.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-29


Chapter 2: Installation, Wiring, and Specifications

Wiring Diagrams and Specifications


1 The remainder of this chapter provides detailed technical information for the DL06 PLCs. A basic
wiring diagram, equivalent I/O circuits, and specification tables are laid out for each PLC.
2 D006AA I/O Wiring Diagram
The D006AA PLC has twenty AC inputs and sixteen AC outputs. The following diagram shows a
3 typical field wiring example. The AC external power connection uses four terminals as shown.
Inputs are organized into five banks of four. Each bank has an isolated common terminal. The
4 wiring example below shows all commons connected together, but separate supplies and common
circuits may be used. The equivalent input circuit shows one channel of a typical bank.
5 Outputs are organized into four banks of four triac switches. Each bank has a common terminal. The
wiring example below shows all commons connected together, but separate supplies and common
circuits may be used. The equivalent output circuit shows one channel of a typical bank.
6 POWER
input wiring
OUTPUT
point wiring

7 100-240V
VAC
L L L L L L L L L L L L L L L L 17-240V
VAC

8
9
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
Derating Chart for ACOutputs Y D0-06AA
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

10 Points
16
X
INPUT: 90 - 120V 7 - 15mA

0.5 A Y0 - Y7
11 12
Y10 - Y17
8

4 LOGIC 06
12 0
0 10 20 30 40 50 55C
C0
K oyo

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.
32 50 68 86 104 122 131F

13 Ambient Temperature ( C/ F)

14 AA

A
90-120V
VAC
INPUT point wiring

Equivalent Input Circuit Equivalent Output Circuit


B Internal module circuitry
+V

C
OUTPUT Optical
L Isolator


9$&
D COM

To LED

2-30 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

D0-06AA General Specifications


External Power Requirements
Communication Port 1 9600 baud (Fixed),
100 240 VAC/50-60 Hz, 40 VA maximum
1
KSequence (Slave), DirectNET (Slave), MODBUS (Slave)
8 data bits, 1 stop bit odd parity
Communication Port 2 9600 baud (default)
8 data bits, 1 stop bit odd parity
KSequence (Slave),DirectNET (Master/Slave), MODBUS
(Master/Slave), Non-sequence / print, ASCII in/out
2
Programming cable type
Operating Temperature
D2DSCBL
32 to 131F (0 to 55C) 3
Storage Temperature 4 to 158F (20 to 70C)
Relative Humidity
Environmental air
5 to 95% (non-condensing)
No corrosive gases permitted
4
Vibration
Shock
MIL STD 810C 514.2
MIL STD 810C 516.2
5
Noise Immunity NEMA ICS3304
Terminal Type Removable 6
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum

AC Input Specifications 7
Input Voltage Range (Min. - Max.) 80 132 VAC, 47 - 63 Hz
Operating Voltage Range 90 120 VAC, 47 - 63 Hz
8 mA @100 VAC at 50 Hz
8
Input Current 10 mA @100 VAC at 60 Hz

Max. Input Current 12 mA @132 VAC at 50 Hz


15 mA @132 VAC at 60 Hz
9
Input Impedance
ON Current/Voltage
14Kq @50 Hz, 12Kq @60Hz
> 6 mA @ 75 VAC
10
OFF Current/Voltage < 2 mA @ 20 VAC
OFF to ON Response < 40 ms 11
ON to OFF Response < 40 ms
Status Indicators
Commons
Logic Side
4 channels / common x 5 banks (isolated)
12
AC Output Specifications
13
Output Voltage Range (Min. - Max.) 15 264 VAC, 47 63 Hz
Operating Voltage 17 240 VAC, 47 63 Hz 14
On Voltage Drop 1.5 VAC (>50mA) 4.0 VAC (<50mA)
Max Current
Max leakage current
0.5 A / point, 1.5 A / common
<4 mA @ 264 VAC
A
Max inrush current 10 A for 10 ms
Minimum Load 10 mA B
OFF to ON Response 1 ms
ON to OFF Response
Status Indicators
1 ms +1/2 cycle
Logic Side
C
Commons
Fuses
4 channels / common x 4 banks (isolated)
None (external recommended) D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-31


Chapter 2: Installation, Wiring, and Specifications

D006AR I/O Wiring Diagram


The D006AR PLC has twenty AC inputs and sixteen relay contact outputs. The following
1 diagram shows a typical field wiring example. The AC external power connection uses four
terminals at the left as shown.
2 The twenty AC input channels use terminals on the bottom of the connector. Inputs are
organized into five banks of four. Each bank has a common terminal. The wiring example
3 below shows all commons connected together, but separate supplies and common circuits
may be used. The equivalent input circuit shows one channel of a typical bank.

4 OUTPUT point wiring

6-240
VAC
or

5 POWER VAC
100-240V

input wiring
L L L L L L L L L L L L L L L L
6-27
VDC

6 Derating Chart for Relay Outputs

7
Points
16 G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
2.0A Y0 - Y7 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
12 OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
Y10 - Y17
D0-06AR
8 8

4
Y
X
0 1 2

INPUT: 90 - 120V
3 4

7 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

9
0
0 10 20 30 40 50 55C
32 50 68 86 104 122 131F
Ambient Temperature ( C/ F)

10 LOGIC 06
K oyo
Typical Relay Life (Operations) at
AR

11 Room Temperature 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.

Voltage & Load Load Current


12 Type
24VDC Resistive
At 1A At 2A
500K 250K
24VDC Inductive 100K 50K
13 110VAC Resistive 500K 250K
90-120V
110VAC Inductive 200K 100K VAC

14
INPUT point wiring
220VAC Resistive 350K 200K
220VAC Inductive 100K 50K

A Equivalent Input Circuit Equivalent Output Circuit

B
C 
9$&

2-32 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
The sixteen relay output channels use terminals on the right side top connector. Outputs are
organized into four banks of four normally-open relay contacts. Each bank has a common
terminal. The wiring example on the last page shows all commons connected together, but
separate supplies and common circuits may be used. The equivalent output circuit shows one
channel of a typical bank. The relay contacts can switch AC or DC voltages.
1
D0-06AR General Specifications 2
External Power Requirements 100 240 VAC/50-60 Hz, 40 VA maximum
Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave), MODBUS (Slave)
bits, 1 stop bit, odd parity
3
Communication Port 2 9600 baud (default), 8 data KSequence (Slave), DirectNET (Master/Slave), MODBUS
bits, 1 stop bit, odd parity (Master/Slave), Non-sequence / print, ASCII in/out 4
Programming cable type D2DSCBL
Operating Temperature
Storage Temperature
32 to 131F (0 to 55C)
4 to 158F (20 to 70C)
5
Relative Humidity 5 to 95% (non-condensing)
Environmental air No corrosive gases permitted 6
Vibration MIL STD 810C 514.2
Shock
Noise Immunity
MIL STD 810C 516.2
NEMA ICS3304
7
Terminal Type Removable
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum 8
AC Input Specifications X0-X23
Input Voltage Range (Min. - Max.) 80 132 VAC, 47 - 63 Hz
9
Operating Voltage Range 90 120 VAC, 47 -63 Hz
Input Current 8 mA @ 100 VAC at 50 Hz 10 mA @ 100 VAC at 60 Hz 10
Max. Input Current 12 mA @ 132 VAC at 50 Hz 15 mA @ 132 VAC at 60 Hz
Input Impedance
ON Current/Voltage
14Kq @50 Hz, 12Kq @60 Hz
>6 mA @ 75 VAC
11
OFF Current/Voltage <2 mA @ 20 VAC
OFF to ON Response < 40 ms 12
ON to OFF Response < 40 ms
Status Indicators
Commons
Logic Side
4 channels / common x 5 banks (isolated)
13
Relay Output Specifications Y0-Y17
14
Output Voltage Range (Min. Max.) 5 264 VAC (47 -63 Hz), 5 30 VDC
Operating Voltage Range 6 240 VAC (47 -63 Hz), 6 27 VDC A
Output Current 2A / point, 6A / common
Max. leakage current
Smallest Recommended Load
0.1 mA @264VAC
5 mA @5 VDC
B
OFF to ON Response
ON to OFF Response
< 15 ms
< 10 ms C
Status Indicators Logic Side
Commons
Fuses
4 channels / common x 4 banks (isolated)
None (external recommended)
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-33


Chapter 2: Installation, Wiring, and Specifications

D006DA I/O Wiring Diagram


The D006DA PLC has twenty DC inputs and sixteen AC outputs. The following diagram shows
1 a typical field wiring example. The AC external power connection uses four terminals as shown.
Inputs are organized into five banks of four. Each bank has an isolated common terminal, and
2 may be wired as sinking or sourcing. The wiring example below shows all commons connected
together, but separate supplies and common circuits may be used. The equivalent circuit for
3 standard inputs is shown below, and the high-speed input circuit is shown to the left.
Outputs are organized into four banks of four triac switches. Each bank has a common terminal.
4 The wiring example below shows all commons connected together, but separate supplies and
common circuits may be used. The equivalent output circuit shows one channel of a typical bank.
Power

5 input wiring
100-240 VAC
Output point wiring

17-240

6 VAC

Derating Chart forAC Outputs


7 Points
16
0.5 A Y0 - Y7

8
12
Y10 - Y17
8

9 0
0
32
10
50
20
68
30
86
40
104
50
122
Ambient Temperature ( C/ F)
55C
131F

10 Equivalent Output Circuit

11 OUTPUT
Internal module circuitry

Optical
+V
L Isolator

12
COM

13 To LED

14
12-24

A VDC Source Sink Input point wiring

B Standard Inputs (X4-X23) High Speed Inputs (X0-X3)

C 
 9'&

D 9'&

6RXUFH 6LQN
6RXUFH 6LQN

2-34 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

D0-06DA General Specifications


External Power Requirements 100 240 VAC/50-60 Hz, 40 VA maximum
Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave),
MODBUS (Slave)
1
bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default), 8 data
bits, 1 stop bit, odd parity
KSequence (Slave), DirectNET (Master/Slave),
MODBUS (Master/Slave), Non-sequence/print, ASCII in/out 2
Programming cable type D2DSCBL
Operating Temperature
Storage Temperature
32 to 131F (0 to 55C)
4 to 158F (20 to 70C)
3
Relative Humidity
Environmental air
5 to 95% (non-condensing)
No corrosive gases permitted
4
Vibration MIL STD 810C 514.2
Shock MIL STD 810C 516.2 5
Noise Immunity NEMA ICS3304
Terminal Type
Wire Gauge
Removable
One 16 AWG or two 18 AWG, 24 AWG minimum
6
DC Input Specifications 7
Parameter HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23
Input Voltage Range 10.8 26.4 VDC 10.8 26.4 VDC 8
Operating Voltage Range 12 24 VDC 12 24 VDC
Maximum Voltage
Minimum Pulse Width
30 VDC (7 kHz maximum frequency)
70 s
30 VDC
N/A
9
ON Voltage Level
OFF Voltage Level
> 10 VDC
< 2.0 VDC
> 10 VDC
< 2.0 VDC 10
Input Impedance 1.8 kq @ 12 24 VDC 2.8 kq @ 12 24 VDC
Minimum ON Current
Maximum OFF Current
>5 mA
< 0.5 mA
>4 mA
<0.5 mA
11
OFF to ON Response
ON to OFF Response
<70 s
<70 s
2 8 ms, 4 ms typical
2 8 ms, 4 ms typical 12
Status Indicators Logic side Logic side
Commons 4 channels / common x 5 bank (isolated) 13
AC Output Specifications
Output Voltage Range (Min. - Max.) 15 264 VAC, 47 63 Hz 14
Operating Voltage 17 240 VAC, 47 63 Hz
On Voltage Drop
Max Current
1.5 VAC @> 50mA, 4 VAC @< 50mA
0.5 A / point, 1.5 A / common
A
Max leakage current
Max inrush current
< 4 mA @ 264 VAC, 60Hz
10 A for 10 ms B
Minimum Load 10 mA
OFF to ON Response
ON to OFF Response
1 ms
1 ms +1/2 cycle
C
Status Indicators
Commons
Logic Side
4 channels / common x 4 banks (isolated) D
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-35


Chapter 2: Installation, Wiring, and Specifications

D006DD1 I/O Wiring Diagram


The D0-06DD1 PLC has twenty sinking/sourcing DC inputs and sixteen sinking DC outputs. The
1 following diagram shows a typical field wiring example. The AC external power connection uses four
terminals as shown.
Inputs are organized into five banks of four. Each bank has an isolated common terminal,
2 and may be wired as either sinking or sourcing inputs. The wiring example below shows all
commons connected together, but separate supplies and common circuits may be used.
3 Outputs all share the same common. Note the requirement for external power.

4
Derating Chart for DC Outputs
5
20-28
Points Power VDC
input wiring Output point wiring
16
0.75A Y0-Y17 6-27

6
12
1.0 A VDC
8 100-240
VAC
4

7 0
0
32
10
50
20
68
30
86
40
104
50 55C
122 131F

8
Ambient Temperature ( C/ F)

DCPulse Outputs (Y0-Y1)


9


10
9'&

11
12 DCStandard Outputs (Y2-Y17)

13 
9'&

14 12-24 VDC

A Source Sink Input point wiring

B DC Standard Inputs (X4-X23) High Speed Inputs (X0-X3)

C 

9'&
9'&

D
6RXUFH 6LQN
6RXUFH 6LQN

2-36 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
D0-06DD1 General Specifications
External Power Requirements 100 240 VAC/50-60 Hz, 40 VA maximum
Communication Port 1 9600 baud (Fixed), KSequence (Slave), DirectNET (Slave),
8 data bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default),
MODBUS (Slave)
KSequence (Slave), DirectNET (Master/Slave),
1
8 data bits, 1 stop bit, odd parity MODBUS (Master/Slave), Non-sequence / print, ASCII in/out
Programming cable type D2DSCBL 2
Operating Temperature 32 to 131F (0 to 55C)
Storage Temperature
Relative Humidity
4 to 158F (20 to 70C)
5 to 95% (non-condensing)
3
Environmental air No corrosive gases permitted
Vibration MIL STD 810C 514.2 4
Shock MIL STD 810C 516.2
Noise Immunity
Terminal Type
NEMA ICS3304
Removable
5
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum

DC Input Specifications
6
Parameter
Min. - Max. Voltage Range
HighSpeed Inputs, X0 X3
10.8 26.4 VDC
Standard DC Inputs X4 X23
10.8 26.4 VDC
7
Operating Voltage Range 12 24 VDC 12 24 VDC
Peak Voltage 30 VDC (7 kHz maximum frequency) 30 VDC 8
Minimum Pulse Width 100 s N/A
ON Voltage Level
OFF Voltage Level
> 10.0 VDC
< 2.0 VDC
> 10.0 VDC
< 2.0 VDC
9
Max. Input Current 6mA @12VDC, 13mA @24VDC 4mA @12VDC, 8.5mA @24VDC
Input Impedance 1.8 qk @ 12 24 VDC 2.8 qk @ 12 24 VDC 10
Minimum ON Current >5 mA >4 mA
Maximum OFF Current
OFF to ON Response
< 0.5 mA
<70 s
<0.5 mA
2 8 ms, 4 ms typical
11
ON to OFF Response <70 s 2 8 ms, 4 ms typical
Status Indicators Logic side Logic side 12
Commons 4 channels / common x 5 banks isolated

DC Output Specifications 13
Parameter Pulse Outputs Y0 Y1 Standard Outputs Y2 Y17
Min. - Max. Voltage Range
Operating Voltage
5 30 VDC
6 27 VDC
5 30 VDC
6 27 VDC
14
Peak Voltage
On Voltage Drop
< 50 VDC (10 kHz max. frequency)
0.3 VDC @ 1 A
< 50 VDC
0.3 VDC @ 1 A
A
Max Current (resistive) 0.5 A / pt., 1A / pt. as standard pt. 1.0 A / point
Max leakage current 15A @ 30 VDC 15A @ 30 VDC B
Max inrush current 2 A for 100 ms 2 A for 100 ms
External DC power required 20 - 28 VDC Max 150mA 20 - 28 VDC Max 280mA (Aux. 24VDC
powers V+ terminal (sinking outputs) C
OFF to ON Response < 10 s < 10 s
ON to OFF Response
Status Indicators
< 20 s
Logic Side
< 60 s
Logic Side
D
Commons 4 channels / common x 4 banks non-isolated
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-37


Chapter 2: Installation, Wiring, and Specifications

D006DD2 I/O Wiring Diagram


The D006DD2 PLC has twenty sinking/sourcing DC inputs and sixteen sourcing DC outputs. The
1 following diagram shows a typical field wiring example. The AC external power connection uses four
terminals as shown.

2 Inputs are organized into four banks of four. Each bank has an isolated common terminal,
and may be wired as either sinking or sourcing inputs. The wiring example below shows all
commons connected together, but separate supplies and common circuits may be used.
3 All outputs share the same common. Note the requirement for external power.

4 100-240
Power input wiring Output point wiring

Derating Chart for DC Outputs VAC 12-24

5 Points
16
VDC

0.75A

6
Y0 - Y7
12
1.0 A Y10 - Y17
8

7 0
0
32
10
50
20
68
30
86
40
104
50 55C
122 131F
Ambient Temperature ( C/ F)

8
DCStandard Outputs (Y2-Y17)
9
10

9'&

11
12 DCPulse Outputs (Y0-Y1)
12-24 VDC

13 Source Sink Input point wiring

14 
9'&

A
B High Speed Inputs (X0-X3) DC Standard Inputs (X4-X23)

C 
9'& 

D
9'&
6RXUFH 6LQN
6RXUFH 6LQN

2-38 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
D0-06DD2 General Specifications
External Power Requirements 100 240 VAC/50-60 Hz, 40 VA maximum
Communication Port 1 9600 baud (Fixed), KSequence (Slave), DirectNET (Slave),
8 data bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default),
MODBUS (Slave)
KSequence (Slave), DirectNET (Master/Slave),
1
8 data bits, 1 stop bit, odd parity MODBUS (Master/Slave), Non-sequence / print, ASCII in/out
Programming cable type D2DSCBL 2
Operating Temperature 32 to 131F (0 to 55C)
Storage Temperature
Relative Humidity
4 to 158F (20 to 70C)
5 to 95% (non-condensing)
3
Environmental air No corrosive gases permitted
Vibration MIL STD 810C 514.2 4
Shock MIL STD 810C 516.2
Noise Immunity
Terminal Type
NEMA ICS3304
Removable
5
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum
6
DC Input Specifications
Parameter
Min. - Max. Voltage Range
HighSpeed Inputs, X0 X3
10.8 26.4 VDC
Standard DC Inputs X4 X23
10.8 26.4 VDC
7
Operating Voltage Range
Peak Voltage
12 24 VDC
30 VDC (7 kHz maximum frequency)
12 24 VDC
30 VDC 8
Minimum Pulse Width 70 s N/A
ON Voltage Level
OFF Voltage Level
> 10.0 VDC
< 2.0 VDC
> 10.0 VDC
< 2.0 VDC
9
Max. Input Current
Input Impedance
6mA @12VDC, 13mA @24VDC
1.8 qk @ 12 24 VDC
4mA @12VDC, 8.5mA @24VDC
2.8 qk @ 12 24 VDC 10
Minimum ON Current >5 mA >4 mA
Maximum OFF Current
OFF to ON Response
< 0.5 mA
<70 s
<0.5 mA
2 8 ms, 4 ms typical
11
ON to OFF Response
Status Indicators
<70 s
Logic side
2 8 ms, 4 ms typical
Logic side 12
Commons 4 channels/common x 5 banks (isolated)
DC Output Specifications 13
Parameter Pulse Outputs Y0 Y1 Standard Outputs Y2 Y17
Min. - Max. Voltage Range 10.8 -26.4 VDC 10.8 -26.4 VDC 14
Operating Voltage 12-24 VDC 12-24 VDC
Peak Voltage
On Voltage Drop
< 50 VDC (10 kHz max. frequency)
0.5VDC @ 1 A
< 50 VDC
1.2 VDC @ 1 A
A
Max Current (resistive) 0.5 A / pt., 1A / pt. as standard pt. 1.0 A / point
Max leakage current 15 A @ 30 VDC 15 A @ 30 VDC B
Max inrush current 2 A for 100 ms 2 A for 100 ms
External DC power required
OFF to ON Response
12 - 24 VDC
< 10s
12 -24 VDC
< 10 s
C
ON to OFF Response < 20 s < 0.5 s
Status Indicators Logic Side Logic Side D
Commons 4 channels / common x 4 banks (non-isolated)
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-39


Chapter 2: Installation, Wiring, and Specifications
D006DR I/O Wiring Diagram
The D006DR PLCs feature twenty DC inputs and sixteen relay contact outputs. The following diagram
shows a typical field wiring example. The AC external power connection uses four terminals as shown.
1 Inputs are organized into five banks of four. Each bank has an isolated common terminal, and
may be wired as either sinking or sourcing inputs. The wiring example below shows all commons
2 connected together, but separate supplies and common circuits may be used. The equivalent
circuit for standard inputs is shown below, and the high-speed input circuit is shown to the left.
3 Outputs are organized into four banks of four normally-open relay contacts. Each bank has
a common terminal. The wiring example below shows all commons connected together, but
separate supplies and common circuits may be used. The equivalent output circuit shows one
4 channel of a typical bank. The relay contacts can switch AC or DC voltages.

5 Typical Relay Life (Operations) at Room


Temperature Power input wiring Output point wiring
6-240
VAC
Voltage & Load Load Current
6
or
6-27
Type At 1A At 2A 100-240
VAC
VDC

24VDC Resistive 500K 250K

7 24VDC Inductive
110VAC Resistive
100K
500K
50K
250K
110VAC Inductive 200K 100K
8 220VAC Resistive
220VAC Inductive
350K
100K
200K
50K

9 Derating Chart for Relay Outputs

10
11
12 F

Equivalent Output Circuit


13
14 12-24
VDC Source Sink Input point wiring

A
B Equivalent Circuit, Standard Inputs (X4-X23) Equivalent Circuit, High-speed Inputs (X0-X3)

C


D  9'&
9'&
6RXUFH 6LQN
6RXUFH 6LQN

2-40 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

D0-06DR General Specifications


External Power Requirements 100 240 VAC/50-60 Hz, 40 VA maximum
Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave), MODBUS (Slave) 1
bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default), 8 data KSequence (Slave), DirectNET (Master/Slave), MODBUS
bits, 1 stop bit, odd parity (Master/Slave), Non-sequence /print, ASCII in/out
2
Programming cable type D2DSCBL
Operating Temperature 32 to 131F (0 to 55C) 3
Storage Temperature 4 to 158F (20 to 70C)
Relative Humidity
Environmental air
5 to 95% (non-condensing)
No corrosive gases permitted
4
Vibration
Shock
MIL STD 810C 514.2
MIL STD 810C 516.2 5
Noise Immunity NEMA ICS3304
Terminal Type
Wire Gauge
Removable
One 16 AWG or two 18 AWG, 24 AWG minimum
6
DC Input Specifications 7
Parameter HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23
Min. - Max. Voltage Range 10.8 26.4 VDC 10.8 26.4 VDC 8
Operating Voltage Range 12 -24 VDC 12 -24 VDC
Peak Voltage
Minimum Pulse Width
30 VDC (7 kHz maximum frequency)
70 s
30 VDC
N/A
9
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC 10
Input Impedance 1.8 kq @ 12 24 VDC 2.8 kq @ 12 24 VDC
Max. Input Current
Minimum ON Current
6mA @12VDC 13mA @24VDC
>5 mA
4mA @12VDC 8.5mA @24VDC
>4 mA
11
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 s 2 8 ms, 4 ms typical 12
ON to OFF Response <70 s 2 8 ms, 4 ms typical
Status Indicators
Commons
Logic side Logic side
4 channels / common x 5 banks (isolated)
13
Relay Output Specifications
Output Voltage Range (Min. - Max.) 5 -264 VAC (47 -63 Hz), 5 - 30 VDC
14
Operating Voltage
Output Current
6 -240 VAC (47 -63 Hz), 6 - 27 VDC
2A / point 6A / common
A
Maximum Voltage 264 VAC, 30 VDC
Max leakage current 0.1 mA @264 VAC B
Smallest Recommended Load 5 mA
OFF to ON Response
ON to OFF Response
< 15 ms
< 10 ms
C
Status Indicators Logic Side
Commons 4 channels / common x 4 banks (isolated) D
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-41


Chapter 2: Installation, Wiring, and Specifications

D006DD1D I/O Wiring Diagram


These micro PLCs feature twenty DC inputs and sixteen sinking DC outputs. The following
1 diagram shows a typical field wiring example. The DC external power connection uses four
terminals at the left as shown.
Power
2 Inputs are organized into
five banks of four. Each 12 - 24 VDC
input wiring
+ -
Output point wiring
20-28
VDC

bank has an isolated


3 common terminal, and 6-27
VDC
may be wired as either
4 sinking or sourcing
inputs. The wiring
example below shows
5 all commons connected
together, but separate + - N.C.
6 supplies and common
circuits may be used.
12-24V 12-24V 20W
D0-06DD1-D

7 All outputs actually share


the same common. Note
the requirement for
8 external power.

9 Points
Derating Chart for DC Outputs

16

10 12

8
0.75A
1.0 A
Y0-Y17

11 4

0 12-24 VDC
0 10 20 30 40 50 55C

12
32 50 68 86 104 122 131F
Ambient Temperature ( C/ F)
Source Sink Input point wiring
DC Pulse Outputs (Y0-Y1)

13 
High Speed Inputs (X0-X3)

9'&

14 
9'&

A 6RXUFH 6LQN

B DC Standard Outputs(Y2-Y17) Standard Input Circuit (X4-X23)

C 
9'&



D 9'&

6RXUFH 6LQN

2-42 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
D0-06DD1-D General Specifications
External Power Requirements 12 24 VDC, 20 W maximum,
Communication Port 1: 9600 baud (Fixed), KSequence (Slave), DirectNET (Slave),
8 data bits, 1 stop bit, odd parity
Communication Port 2: 9600 baud (default),
MODBUS (Slave)
KSequence (Slave), DirectNET (Master/Slave),
1
8 data bits, 1 stop bit,odd parity MODBUS (Master/Slave), Non-sequence/print, ASCII in/out
Programming cable type D2DSCBL 2
Operating Temperature 32 to 131F (0 to 55C)
Storage Temperature
Relative Humidity
4 to 158F (20 to 70C)
5 to 95% (non-condensing)
3
Environmental air No corrosive gases permitted
Vibration MIL STD 810C 514.2 4
Shock MIL STD 810C 516.2
Noise Immunity
Terminal Type
NEMA ICS3304
Removable
5
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum
6
DC Input Specifications
Parameter
Min. - Max. Voltage Range
HighSpeed Inputs, X0 X3
10.8 26.4 VDC
Standard DC Inputs X4 X23
10.8 26.4 VDC
7
Operating Voltage Range
Peak Voltage
12 24 VDC
30 VDC (7 kHz maximum frequency)
12 24 VDC
30 VDC 8
Minimum Pulse Width 70 s N/A
ON Voltage Level
OFF Voltage Level
>10.0 VDC
< 2.0 VDC
> 10.0 VDC
< 2.0 VDC
9
Max. Input Current
Input Impedance
6mA @12VDC, 13mA @24VDC
1.8 kq @ 12 24 VDC
4mA @12VDC, 8.5mA @24VDC
2.8 kq @ 12 24 VDC
10
Minimum ON Current >5 mA >4 mA
Maximum OFF Current < 0.5 mA <0.5 mA 11
OFF to ON Response <70 s 2 8 ms, 4 ms typical
ON to OFF Response
Status Indicators
<70 s
Logic side
2 8 ms, 4 ms typical
Logic side
12
Commons 4 channels / common x 5 banks (isolated)
DC Output Specifications 13
Parameter Pulse Outputs, Y0 Y1 Standard Outputs, Y2 Y17
Min. - Max. Voltage Range 5 30 VDC 5 30 VDC 14
Operating Voltage 6 27 VDC 6 27 VDC
Peak Voltage
On Voltage Drop
< 50 VDC (10 kHz max. frequency)
0.3 VDC @ 1 A
< 50 VDC
0.3 VDC @ 1 A
A
Max Current (resistive) 0.5 A / pt., 1A / pt. as standard pt. 1.0 A / point
Max leakage current 15 A @ 30 VDC 15 A @ 30 VDC B
Max inrush current 2 A for 100 ms 2 A for 100 ms
External DC power required
OFF to ON Response
20 - 28 VDC Max 150mA
< 10 s
20 - 28 VDC Max 150mA
< 10 s
C
ON to OFF Response < 20 s < 60 s
Status Indicators Logic Side Logic Side D
Commons 4 channels / common x 4 banks (non-isolated)
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-43


Chapter 2: Installation, Wiring, and Specifications

D006DD2D I/O Wiring Diagram


These micro PLCs feature twenty DC inputs and sixteen sourcing DC outputs. The
1 following diagram shows a typical field wiring example. The DC external power connection
uses four terminals at the left as shown.

2 Inputs are organized into five banks of four. Each bank has an isolated common terminal,
and may be wired as either sinking or sourcing inputs. The wiring example below
12 - 24 VDC
shows all commons + - Output point wiring

3 connected together,
but separate supplies
Power
input wiring
+ 12 - 24
- VDC
and
L L L L L L L L L L L L L L L L

4 common circuits may


used.
be

5 All outputs actually


the same common.
G LG N.C. Y0
share
Note
Y2 V1 Y5 Y7 Y10 Y12 V3 Y15 Y17
the requirement + - N.C. V0 for
Y1 Y3 Y4 Y6 V2 Y11 Y13 Y14 Y16 C0

6 external power. Y
OUTPUT: Sourcing Output 12-24V

0 1 2 3
D0-06DD2-D
4 5 6
1.0A

7 10
PWR: 12-24V

11 12 13 14
20W

15 16 17 20 21 22 23
X

7
INPUT: 12 - 24V 3 - 15mA

8 Points
Derating Chart for DC Outputs
LOGIC 06
16 K oyo
0.75A

9 12

8
1.0 A
Y0 - Y7
Y10 - Y17 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.
4

10 0
0
32
10
50
20
68
30
86
40
104
50 55C
122 131F
Ambient Temperature ( C/ F)

11 12-24 VDC

DC Standard Outputs(Y2-Y17)
12 Source Sink Input point wiring


High Speed Inputs (X0-X3)
13 9'&

14 
9'&
6RXUFH 6LQN

A DC Pulse Outputs (Y0-Y1)

B Standard Input Circuit (X4-X23)

C 
9'&



D 9'&

6RXUFH 6LQN

2-44 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications
D0-06DD2-D General Specifications
External Power Requirements 12 24 VDC, 20 W maximum,
Communication Port 1: 9600 baud (Fixed), KSequence (Slave), DirectNET (Slave),
8 data bits, 1 stop bit, odd parity
Communication Port 2: 9600 baud (default),
MODBUS (Slave)
KSequence (Slave), DirectNET (Master/Slave),
1
8 data bits, 1 stop bit, odd parity MODBUS (Master/Slave), Non-sequence/print, ASCII in/out
Programming cable type D2DSCBL 2
Operating Temperature 32 to 131F (0 to 55C)
Storage Temperature
Relative Humidity
4 to 158F (20 to 70C)
5 to 95% (non-condensing)
3
Environmental air No corrosive gases permitted
Vibration MIL STD 810C 514.2 4
Shock MIL STD 810C 516.2
Noise Immunity
Terminal Type
NEMA ICS3304
Removable
5
Wire Gauge One 16 AWG or two 18 AWG, 24 AWG minimum
6
DC Input Specifications
Parameter
Min. - Max. Voltage Range
HighSpeed Inputs, X0 X3
10.8 26.4 VDC
Standard DC Inputs X4 X23
10.8 26.4 VDC
7
Operating Voltage Range
Peak Voltage
12 24 VDC
30 VDC (7 kHz maximum frequency)
12 24 VDC
30 VDC 8
Minimum Pulse Width 70 s N/A
ON Voltage Level
OFF Voltage Level
>10.0 VDC
< 2.0 VDC
> 10.0 VDC
< 2.0 VDC
9
Max. Input Current
Input Impedance
15mA @26.4VDC
1.8 kq @ 12 24 VDC
11mA @26.4VDC
2.8 kq @ 12 24 VDC 10
Minimum ON Current 5 mA 3 mA
Maximum OFF Current
OFF to ON Response
0.5 mA
<70 s
0.5 mA
2 8 ms, 4 ms typical
11
ON to OFF Response
Status Indicators
<70 s
Logic side
2 8 ms, 4 ms typical
Logic side
12
Commons 4 channels / common x 5 banks (isolated)

DC Output Specifications
13
Parameter Pulse Outputs, Y0 Y1 Standard Outputs, Y2 Y17
Min. - Max. Voltage Range 10.8 26.4 VDC 10.8 26.4 VDC 14
Operating Voltage 12 24 VDC 12 24 VDC
Peak Voltage
On Voltage Drop
30 VDC (10 kHz max. frequency)
0.5 VDC @ 1 A
30 VDC
1.2 VDC @ 1 A
A
Max Current (resistive)
Max leakage current
0.5 A / pt., 1A / pt. as standard pt.
15 A @ 30 VDC
1.0 A / point
15 A @ 30 VDC B
Max inrush current 2 A for 100 ms 2 A for 100 ms
External DC power required
OFF to ON Response
N/A
< 10 s
N/A
< 10 s
C
ON to OFF Response
Status Indicators
< 20 s
Logic Side
< 0.5 ms
Logic Side D
Commons 4 channels / common x 4 banks (non-isolated)
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-45


Chapter 2: Installation, Wiring, and Specifications

D006DRD I/O Wiring Diagram


The D006DRD PLC has twenty DC inputs and sixteen relay contact outputs. The
following diagram shows a typical field wiring example. The DC external power connection
1 uses three terminals as shown.
Inputs are organized into five banks of four. Each bank has an isolated common terminal,
2 and may be wired as either sinking or sourcing inputs. The wiring example above shows all
commons connected together, but separate supplies and common circuits may be used.
3 Outputs are organized into
2XWSXWSRLQWZLULQJ
four banks of four normally- 3RZHU


4
9$&
open relay contacts. Each LQSXWZLULQJ RU

bank has a common terminal. 9'&

The wiring example above


5 shows all commons connected
together, but separate supplies
6 and common circuits may
be used. The equivalent
output circuit shows one
7 channel of a typical bank. The
relay contacts can switch AC or
8 Typical Relay Life (Operations) at
Room Temperature
9 Voltage & Load Load Current
Type At 1A At 2A

10 24VDC Resistive
24VDC Inductive
500K
100K
250K
50K
110VAC Resistive 500K 250K

11 110VAC Inductive
220VAC Resistive
200K
350K
100K
200K
9'&

220VAC Inductive 100K 50K


12 Derating Chart for Relay Outputs
6RXUFH 6LQN ,QSXWSRLQWZLULQJ

Standard Input Circuit (X4-X23)


13 Points
16
2.0A Y0 - Y7
DC voltages.
12
Y10 - Y17

14 8

4

0 9'&

A
0 10 20 30 40 50 55C
32 50 68 86 104 122 131F
6RXUFH 6LQN
Ambient Temperature ( C/ F)

Standard Output Circuit

B DR-D High-speed Input Circuit (X0-X3)

C


D
9'&
6RXUFH 6LQN

2-46 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 2: Installation, Wiring, and Specifications

D0-06DR-D General Specifications


External Power Requirements
Communication Port 1 9600 baud (Fixed),
12 24 VDC, 20 W maximum,
KSequence (Slave), DirectNET (Slave), MODBUS (Slave)
1
8 data bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default),
8 data bits, 1 stop bit, odd parity
KSequence (Slave), DirectNET (Master/Slave),
MODBUS (Master/Slave),Non-sequence/print, ASCII in/out
2
Programming cable type
Operating Temperature
D2DSCBL
32 to 131F (0 to 55C) 3
Storage Temperature 4 to 158F (20 to 70C)
Relative Humidity
Environmental air
5 to 95% (non-condensing)
No corrosive gases permitted
4
Vibration
Shock
MIL STD 810C 514.2
MIL STD 810C 516.2 5
Noise Immunity NEMA ICS3304
Terminal Type
Wire Gauge
Removable
One 16 AWG or two 18AWG, 24AWG minimum
6
DC Input Specifications 7
Parameter HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23
Min. - Max. Voltage Range
Operating Voltage Range
10.8 26.4 VDC
12 -24 VDC
10.8 26.4 VDC
12 -24 VDC
8
Peak Voltage
Minimum Pulse Width
30 VDC (7 kHz maximum frequency)
70 s
30 VDC
N/A
9
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC 10
Input Impedance 1.8 kq @ 12 24 VDC 2.8 kq @ 12 24 VDC
Max. Input Current
Minimum ON Current
6mA @12VDC 13mA @24VDC
>5 mA
4mA @12VDC 8.5mA @24VDC
>4 mA
11
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 s 2 8 ms, 4 ms typical 12
ON to OFF Response < 70 s 2 8 ms, 4 ms typical
Status Indicators
Commons
Logic side Logic side
4 channels / common x 5 banks (isolated)
13
Relay Output Specifications 14
Output Voltage Range (Min. - Max.) 5 -264 VAC (47 -63 Hz), 5 - 30 VDC
Operating Voltage 6 -240 VAC (47 -63 Hz), 6 - 27 VDC A
Output Current 2A / point 6A / common
Maximum Voltage
Max leakage current
264 VAC, 30 VDC
0.1 mA @264 VAC
B
Smallest Recommended Load 5 mA
OFF to ON Response < 15 ms C
ON to OFF Response < 10 ms
Status Indicators
Commons
Logic Side
4 channels / common x 4 banks isolated commons
D
Fuses None (external recommended)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 2-47


Chapter 2: Installation, Wiring, and Specifications

Glossary of Specification Terms


Discrete Input
1 One of twenty input connections to the PLC which converts an electrical signal from a field
device to a binary status (off or on), which is read by the internal CPU each PLC scan.
2 Discrete Output
3 One of sixteen output connections from the PLC which converts an internal ladder program
result (0 or 1) to turn On or Off an output switching device. This enables the program to turn
on and off large field loads.
4 I/O Common
5 A connection in the input or output terminals which is shared by multiple I/O circuits. It
usually is in the return path to the power supply of the I/O circuit.

6 Input Voltage Range


The operating voltage range of the input circuit.
7 Maximum Voltage
Maximum voltage allowed for the input circuit.
8 ON Voltage Level
9 The minimum voltage level at which the input point will turn ON.

OFF Voltage Level


10 The maximum voltage level at which the input point will turn OFF

11 Input Impedance
Input impedance can be used to calculate input current for a particular operating voltage.

12 Input Current
Typical operating current for an active (ON) input.
13 Minimum ON Current
The minimum current for the input circuit to operate reliably in the ON state.
14
Maximum OFF Current
A The maximum current for the input circuit to operate reliably in the OFF state.

OFF to ON Response
B The time the module requires to process an OFF to ON state transition.

C ON to OFF Response
The time the module requires to process an ON to OFF state transition.

D Status Indicators
The LEDs that indicate the ON/OFF status of an input or output point. All LEDs on DL06
Micro PLCs are electrically located on the logic side of the input or output circuit.

2-48 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


CPU Specifications and Chapter
Operation
In This Chapter
3
Overview.......................................................................................... 32
CPU Specifications............................................................................ 33
CPU Hardware Setup........................................................................ 34
Using Battery Backup........................................................................ 38
CPU Operation................................................................................ 312
I/O Response Time.......................................................................... 317
CPU Scan Time Considerations....................................................... 320
Memory Map.................................................................................. 325
DL06 System V-memory................................................................. 329
DL06 Aliases.................................................................................... 331
DL06 Memory Map........................................................................ 332
X Input/Y Output Bit Map............................................................... 333
Stage Control/Status Bit Map.......................................................... 334
Control Relay Bit Map..................................................................... 336
Timer Status Bit Map...................................................................... 338
Counter Status Bit Map................................................................... 338
GX and GY I/O Bit Map.................................................................. 339
Chapter 3: CPU Specifications and Operation

Overview
1 The Central Processing Unit (CPU) is the heart of the Micro PLC. Almost all PLC
operations are controlled by the CPU, so it is important that it is set up correctly. This
2 chapter provides the information needed to understand:
Steps required to set up the CPU

3 Operation of ladder programs


Organization of Variable Memory

4 Power
Input 16 Discrete Outputs

5
Output circuit LCD monitor

6
7
Power 4 Optional
Supply CPU card slots

Isolation

8 boundary
Input circuit 2 comm. ports

9 To programming device
20 discrete Inputs or Operator interface

10 NOTE: The High-Speed I/O function (HSIO) consists of dedicated but configurable hardware in the
DL06. It is not considered part of the CPU because it does not execute the ladder program. For more
11 on HSIO operation, see Appendix E.

12 DL06 CPU Features


The DL06 Micro PLC has 14.8K words of memory comprised of 7.6K of ladder memory
and 7.6K words of V-memory (data registers). Program storage is in the FLASH memory
13 which is a part of the CPU board in the PLC. In addition, there is RAM with the CPU which
will store system parameters, V-memory, and other data not in the application program. The
14 RAM is backed up by a super-capacitor, storing the data for several hours in the event of a
power outage. The capacitor automatically charges during powered operation of the PLC.
A The DL06 supports fixed I/O which includes twenty discrete input points and sixteen output
points.

B Over 220 different instructions are available for program development as well as extensive
internal diagnostics that can be monitored from the application program or from an operator
interface. Chapters 5, 6, and 7 provide detailed descriptions of the instructions.
C The DL06 provides two built-in communication ports, so you can easily connect a handheld
programmer, operator interface, or a personal computer without needing any additional
D hardware.

3-2 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

CPU Specifications
1
Specifications

Total Program memory (words)


Feature DL06
14.8K
2
Ladder memory (words)
Total V-memory (words)
7680
7616 3
User V-memory (words) 7488
Non-volatile V Memory (words)
Contact execution (boolean)
128
<0.6us
4
Typical scan (1k boolean)
RLL Ladder style Programming
1-2ms
Yes 5
RLL and RLLPLUS Programming Yes
Run Time Edits Yes 6
Supports Overrides Yes
Scan
Handheld programmer
Variable / fixed
Yes
7
DirectSOFT programming for Windows Yes
Built-in communication ports (RS232C) Yes 8
FLASH Memory Standard on CPU
Local Discrete I/O points available
Local Analog input / output channels maximum
36
None
9
High-Speed I/O (quad., pulse out, interrupt, pulse catch, etc.) Yes, 2
I/O Point Density 20 inputs, 16 outputs 10
Number of instructions available (see Chapter 5 for details) 229
Control relays
Special relays (system defined)
1024
512
11
Stages in RLLPLUS
Timers
1024
256
12
Counters 128
Immediate I/O Yes 13
Interrupt input (external / timed) Yes
Subroutines
For/Next Loops
Yes
Yes
14
Math (Integer and floating point) Yes
Drum Sequencer Instruction Yes A
Time of Day Clock/Calendar Yes
Internal diagnostics
Password security
Yes
Yes
B
System error log Yes
User error log Yes C
Optional D2-BAT-1 available
Battery backup (not included with unit)
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-3


Chapter 3: CPU Specifications and Operation

CPU Hardware Setup


Communication Port Pinout Diagrams
1 Cables are available that allow you to quickly and easily connect a Handheld Programmer or
a personal computer to the DL06 PLCs. However, if you need to build your cable(s), use the
2 pinout descriptions shown below, or use the Tech Support/Cable Wiring Diagrams located
on our website. The DL06 PLCs require an RJ-12 phone plug for port 1 (D2-DSCBL) and a
3 15-pin SVGA DSub for port 2 (D2-DSCBL-1).
The DL06 PLC has two built-in serial communication ports. Port 1 (RS232C only) is
4 generally used for connecting to a D2-HPP, Direct SOFT, operator interface, MODBUS
slave only, or a Direct NET slave only. The baud rate is fixed at 9600 baud for port 1. Port
2 (RS232C/RS422/RS485) can be used to connect to a D2-HPP, Direct SOFT, operator
5 interface, MODBUS master/slave, Direct NET master/slave or ASCII in/out. Port 2 has a
range of speeds from 300 baud to 38.4K baud.
6 NOTE: The 5V pins are rated at 220mA maximum, primarily for use with some operator interface
units.
7 Port 1 Pin Descriptions Port 2 Pin Descriptions
1 5V Power (+) connection
1 0V Power (-) connection (GND)
8 2 5V Power (-) 220 mA max
2
3
TXD
RXD
Transmit data (RS-232C)
Receive data (RS-232C)
3 RXD Receive data (RS-232C)
9 4
5
TXD
5V
Transmit data (RS-232C)
Power (+) connection
4
5
RTS
CTS
Ready to send
Clear to send
6 RXD- Receive data (-) (RS-422/485)
6 0V Power (-) connection (GND)
10 7
8
0V
0V
Power (-) connection (GND)
Power (-) connection (GND)

11
TERM
9 TXD+ Transmit data (+) (RS-422/485)
PORT1 PORT2 RUN STOP 10 TXD- Transmit data (-) (RS-422/485)
11 RTS+ Ready to send (+) (RS-422/485)
12 12
13
RTS-
RXD+
Ready to send (-) (RS-422/485)
Receive data (+) (RS-422/485)
5 4 3 2

13 6 1 5

15
10
1

11
6
14
15
CTS+
CTS-
Clear to send (+) (RS-422/485)
Clear to send (-) (RS-422/485)

14 PORT1

Communications Port 1
PORT2
Communications Port 2
Connects to HPP, DirectSOFT, operator interfaces,
etc.
A Connects to HPP, DirectSOFT, operator interfaces,
etc. 15-pin, multifunction port, RS232C, RS422, RS485
(RS485 with 2-wire is only available for MODBUS
6-pin, RS232C and Non-sequence.)
B Communication speed (baud): 9600 (fixed)
Parity: odd (fixed)
Communication speed (baud): 300, 600, 1200,
2400, 4800, 9600, 19200, 38400
Com 1 Station Address: 1 (fixed) Parity: odd (default), even, none
C 8 data bits
Com 2
Station Address: 1 (default)
1 start, 1 stop bit 8 data bits

D Asynchronous, half-duplex, DTE


Protocol (auto-select): K-sequence (slave only),
1 start, 1 stop bit
Asynchronous, half-duplex, DTE
DirectNET (slave only), MODBUS (slave only) Protocol (auto-select): K-sequence (slave only),
DirectNET (master/slave), MODBUS (master/slave),
non-sequence/print/ASCII in/out

3-4 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Connecting the Programming Devices


If youre using a Personal Computer with the DirectSOFT programming package, you
can connect the computer to either of the DL06s serial ports. For an engineering office
environment (typical during program development), this is the preferred method of 1
programming.
2
3
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
4
5
LOGIC 06
K oyo

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

PORT1 PORT2 RUN STOP

6
Use cable part no.
D2DSCBL

The Handheld programmer D2-HPP is connected to the CPU with a handheld programmer
cable. This device is ideal for maintaining existing installations or making small program
changes. The handheld programmer is shipped with a cable, which is approximately 6.5 feet
7
(200 cm) long.
8
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
9
LOGIC

C0
X0
X1
06
K oyo

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 For replacement
10
cable, use part no.

11
PORT1 PORT2 RUN STOP

DV1000CBL

CPU Setup Information


Even if you have years of experience using PLCs, there are a few things you need to do before 12
you can start entering programs. This section includes some basic things, such as changing
the CPU mode, but it also includes some things that you may never have to use. Heres a
brief list of the items that are discussed:
13
Using Auxiliary Functions
Clearing the program (and other memory areas)
14
How to initialize system memory
Setting retentive memory ranges
A
The following paragraphs provide the setup information necessary to get the CPU ready for
programming. They include setup instructions for either type of programming device you
B
are using. The D2HPP Handheld Programmer Manual provides the Handheld keystrokes
required to perform all of these operations. The DirectSOFT Manual provides a description C
of the menus and keystrokes required to perform the setup procedures via DirectSOFT.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-5


Chapter 3: CPU Specifications and Operation

1 G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17


PWR
status indicators
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.

2
RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

3
LOGIC 06
4
K oyo

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 mode switch

5 PORT1 PORT2 RUN STOP

6 Status Indicators
The status indicator LEDs on the CPU front panels have specific functions which can help in
7 programming and troubleshooting.

8 Mode Switch Functions


The mode switch on the DL06 PLC provides positions for enabling and disabling program
changes in the CPU. Unless the mode switch is in the TERM position, RUN and STOP
9 mode changes will not be allowed by any interface device, (handheld programmer,
DirectSOFT programming package or operator interface). Programs may be viewed or
10 monitored but no changes may be made. If the switch is in the TERM position and no
program password is in effect, all operating modes as well as program access will be allowed
11 through the connected programming or monitoring device.

Indicator Status Meaning


12 PWR
ON
OFF
Power good
Power failure

13 RUN
ON
OFF
CPU is in Run Mode
CPU is in Stop or Program Mode
Blinking CPU is in firmware upgrade mode
14 ON CPU self diagnostics error
CPU OFF CPU self diagnostics good

A Blinking
ON
The CPU indicator will blink if the battery is less than 2.5 VDC
Data is being transmitted by the CPU - Port 1
TX1
OFF No data is being transmitted by the CPU - Port 1
B RX1
ON Data is being received by the CPU - Port 1
OFF No data is being received by the CPU - Port 1

C TX2
ON
OFF
Data is being transmitted by the CPU - Port 2
No data is being transmitted by the CPU - Port 2
ON Data is being received by the CPU - Port 2
D RX2
OFF No data is being received by the CPU - Port 2

3-6 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Changing Modes in the DL06 PLC


Mode Switch Position CPU Action
CPU is forced into the RUN mode if no errors are encountered.
1
RUN (Run Program) No changes are allowed by the attached programming/
monitoring device.
PROGRAM and the TEST modes are available. Mode and
2
TERM (Terminal) RUN program changes are allowed by the programming/monitoring
device.
CPU is forced into the STOP mode. No changes are allowed by
3
STOP the programming/monitoring device.
4
There are two ways to change the CPU mode. You can use the CPU mode switch to select
the operating mode, or you can place the mode switch in the TERM position and use a 5
programming device to change operating modes. With the switch in this position, the CPU
can be changed between Run and Program modes. You can use either DirectSOFT or the
Handheld Programmer to change the CPU mode of operation. With DirectSOFT use the
6
PLC menu option PLC > Mode or use the Mode button located on the Online
toolbar. With the Handheld Programmer, you use the MODE key. 7
8
9
10
PLC Menu 11
MODE Key 12
Mode of Operation at Power-up 13
The DL06 CPU will normally power-up in the mode that it was in just prior to the
power interruption. For example, if the CPU was in Program Mode when the power was 14
disconnected, the CPU will power-up in Program Mode (see warning note below).
WARNING: Once the super capacitor has discharged, the system memory may not retain the A
previous mode of operation. When this occurs, the PLC can power-up in either Run or Program
Mode if the mode switch is in the term position. There is no way to determine which mode will
be entered as the startup mode. Failure to adhere to this warning greatly increases the risk of
B
unexpected equipment startup.
C
The mode which the CPU will power-up in is also determined by the state of B7633.13. If
the bit is set and the Mode Switch is in the TERM position, the CPU will power-up in RUN
mode. If B7633.13 is not set with the Mode Switch in TERM position, then the CPU will
D
power-up in the state it was in when it was powered-down.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-7


Chapter 3: CPU Specifications and Operation

Using Battery Backup


An optional lithium battery is available to maintain the system RAM retentive memory when
1 the DL06 system is without external power. Typical CPU battery life is five years, which
includes PLC runtime and normal shutdown periods. However, consider installing a fresh
2 battery if your battery has not been changed recently and the system will be shut down for a
period of more than ten days.

3 NOTE: Before installing or replacing your CPU battery, back-up your V-memory and system
parameters. You can do this by using DirectSOFT to save the program, V-memory, and system
parameters to hard/floppy disk on a personal computer.
4
To install the D2BAT1 CPU battery in the DL06 CPU:
5 1. Press the retaining clip on the battery door down and swing the battery door open.
2. Place the battery into the cointype slot with the +, or larger, side out.
6 3. Close the battery door making sure that it locks securely in place.
4. Make a note of the date the battery was installed
7 Battery door

8
9
10
11
12
13
WARNING: Do not attempt to recharge the battery or dispose of an old battery by fire. The battery
14 may explode or release hazardous materials.

A Battery Backup
The battery backup is available immediately after the battery has been installed. The CPU
B indicator will blink if the battery is low (refer to the table on page 3-6). Special Relay 43
(SP43) will also be set when the battery is low. The low battery indication is enabled by
setting bit 12 of V7633 (B7633.12). If the low battery feature is not desired, do not set bit
C V7633.12. The super capacitor will retain memory IF it is configured as retentive regardless
of the state of B7633.12. The battery will do the same, but for a much longer time.
D

3-8 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation
Auxiliary Functions
Many CPU setup tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions
perform many different operations, ranging from clearing ladder memory, displaying the scan
time, copying programs to EEPROM in the handheld programmer, etc. They are divided into
categories that affect different system parameters. Appendix A provides a description of the
1
AUX functions.
You can access the AUX Functions from DirectSOFT or from the D2HPP Handheld
2
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 3
Programmer setup, so they will not be needed (or available) with the DirectSOFT package.
The following table shows a list of the Auxiliary functions for the Handheld Programmer. 4
Auxiliary Functions Auxiliary Functions (contd)
AUX 2* RLL Operations 57 Set Retentive Ranges 5
21 Check Program 58 Test Operations
22
23
Change Reference
Clear Ladder Range
59
5B
Override Setup
HSIO Configuration
6
24 Clear All Ladders
AUX 3* V-Memory Operations
5C
5D
Display Error History
Scan Control Setup 7
31 Clear V-memory AUX 6* Handheld Programmer Configuration
AUX 4* I/O Configuration 61 Show Revision Numbers 8
41 Show I/O Configuration 62 Beeper On / Off
42
44
I/O Diagnostics
Power Up I/O Configuration check
65 Run Self Diagnostics
AUX 7* EEPROM Operations
9
71 Copy CPU memory to HPP EEPROM
45
46
Select Configuration
Configure I/O 72 Write HPP EEPROM to CPU 10
AUX 5* CPU Configuration 73 Compare CPU to HPP EEPROM
51
52
Modify Program Name 74
75
Blank Check (HPP EEPROM)
Erase HPP EEPROM
11
Display/Change Calendar
53
54
Display Scan Time
Initialize Scratchpad
76 Show EEPROM Type (CPU and HPP)
AUX 8* Password Operations 12
55 Set Watchdog Timer 81 Modify Password
56 Set Communication Port 2 82
83
Unlock CPU
Lock CPU
13
Clearing an Existing Program
14
Before you enter a new program, be sure to always clear ladder memory. You can use AUX
Function 24 to clear the complete program.You can also use other AUX functions to clear A
other memory areas.
AUX 23 Clear Ladder Range AUX 24 Clear all Ladders AUX 31 Clear V-memory B
Initializing System Memory
The DL06 Micro PLC maintains system parameters in a memory area often referred to as the
C
scratchpad. In some cases, you may make changes to the system setup that will be stored in system
memory. For example, if you specify a range of Control Relays (CRs) as retentive, these changes D
are stored in system memory. AUX 54 resets the system memory to the default values.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-9


Chapter 3: CPU Specifications and Operation

WARNING: You may never have to use this feature unless you want to clear any setup information
that is stored in system memory. Usually, youll only need to initialize the system memory if you
1 are changing programs and the old program required a special system setup. You can usually
load in new programs without ever initializing system memory.

2 Remember, this AUX function will reset all system memory. If you have set special
parameters such as retentive ranges, for example, they will be erased when AUX 54 is used.
3 Make sure that you have considered all ramifications of this operation before you select it. See
Appendix F for additional information in reference to PLCmemory.

4 Setting Retentive Memory Ranges


The DL06 PLCs provide certain ranges of retentive memory by default. The default ranges
5 are suitable for many applications, but you can change them if your application requires
additional retentive ranges or no retentive ranges at all. The default settings are:

6 Memory Area
Default Range
DL06
Available Range

7 Control Relays
V-Memory
C1000 C1777
V400 V37777
C0 C1777
V0 V37777
Timers None by default T0 T377
8 Counters CT0 CT177 CT0 CT177
Stages None by default S0 S1777

9
10 You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT menus
to select the retentive ranges. Appendix A contains detailed information about auxiliary
11 functions.

12 WARNING: The DL06 CPUs do not come with a battery. The super capacitor will retain the
values in the event of a power loss, but only for a short period of time, depending on conditions
(typically 4 to 7 days). If the retentive ranges are important for your application, make sure you
13 obtain the optional battery.

14
A
B
C
D

3-10 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Using a Password
The DL06 PLCs allow you to use a password to help minimize the risk of unauthorized
program and/or data changes. Once you enter a password you can lock the PLC against 1
access. Once the CPU is locked you must enter the password before you can use a
programming device to change any system parameters. 2
You can select an 8-digit numeric password. The Micro PLCs are shipped from the factory
with a password of 00000000. All zeros removes the password protection. If a password
has been entered into the CPU you cannot just enter all zeros to remove it. Once you enter
3
the correct password, you can change the password to all zeros to remove the password
protection. 4
WARNING: Make sure you remember your password. If you forget your password you will not
be able to access the CPU. The Micro PLC must be returned to the factory to have the password 5
(along with the ladder project) removed. It is the policy of Automationdirect to require the
memory of the PLC to be cleared along with the password.
You can use the D2HPP Handheld Programmer or
6
DirectSOFT. to enter a password. The following diagram
shows how you can enter a password with the Handheld 7
Programmer.
DirectSOFT D2HPP 8
Select AUX 81
CLR CLR I
8
B
1
AUX ENT
PASSWORD 9
00000000
10
Enter the new 8-digit password
X X X ENT
PASSWORD
11
Press CLR to clear the display
XXXXXXXX 12
There are three ways to lock the CPU once the password has been entered. 13
1. If the CPU power is disconnected, the CPU will be automatically locked against access.
2. If you enter the password with DirectSOFT, the CPU will be automatically locked against access 14
when you exit DirectSOFT.
3. Use AUX 83 to lock the CPU. A
When you use DirectSOFT, you will be prompted for a password if the CPU has been
locked. If you use the Handheld Programmer, you have to use AUX 82 to unlock the CPU.
Once you enter AUX 82, you will be prompted to enter the password.
B
NOTE: The DL06 CPUs support multi-level password protection of the ladder program. This allows C
password protection while not locking the communication port to an operator interface. The multi-
level password can be invoked by creating a password with an upper case A followed by seven
numeric characters (e.g. A1234567).
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-11


Chapter 3: CPU Specifications and Operation

CPU Operation
1 Achieving the proper control for your equipment or process requires a good understanding
of how DL06 CPUs control all aspects of system operation. There are four main areas to
understand before you create your application program:
2 CPU Operating System the CPU manages all aspects of system control. A quick overview of all
the steps is provided in the next section.
3 CPU Operating Modes The two primary modes of operation are Program Mode and Run
Mode.
4 CPU Timing The two important areas we discuss are the I/O response time and the CPU scan
time.

5 CPU Memory Map DL06 CPUs offer a wide variety of resources, such as timers, counters,
inputs, etc. The memory map section shows the organization and availability of these data types.

6 CPU Operating System


At powerup, the CPU initializes the internal electronic
7
Power up
hardware. Memory initialization starts with examining
the retentive memory settings. In general, the contents of Initialize hardware
retentive memory is preserved, and non-retentive memory is
8 initialized to zero (unless otherwise specified). Initialize various memory
based on retentive
configuration
After the one-time powerup tasks, the CPU begins the cyclical
9 scan activity. The flowchart to the right shows how the tasks
differ, based on the CPU mode and the existence of any errors. Update input

10 The scan time is defined as the average time around the task
loop. Note that the CPU is always reading the inputs, even
Service peripheral

during program mode. This allows programming tools to


11
Update Special Relays
monitor input status at any time.
PGM
The outputs are only updated in Run mode. In program mode, Mode?

12 they are in the off state. RUN

Error detection has two levels. Non-fatal errors are reported, but Execute program

13 the CPU remains in its current mode. If a fatal error occurs, the
CPU is forced into program mode and the outputs go off.
Update output

14 Do diagnostics

A OK?
YES

NO

B Report error , set flag


register , turn on LED

C Fatal error

YES
NO

D
Force CPU into
PGM mode

3-12 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Program Mode
In Program Mode, the CPU does not execute the application program or update the output
points. The primary use for Program Mode is to enter or change an application program.
1
You also use program mode to set up the CPU parameters, such as HSIO features, retentive
memory areas, etc. 2
You can use a programming device, such as DirectSOFT, the D2HPP (Handheld
Programmer) or the CPU mode switch to place the CPU in Program Mode. 3
Run Mode
In Run Mode, the CPU executes the 4
application program and updates the I/O
system. You can perform many operations 5
during Run Mode. Some of these include:
Monitor and change I/O point status 6
Change timer/counter preset values Download
Change variable memory locations 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
Program
7
Run Mode operation can be divided into
several key areas. For the vast majority of
applications, some of these execution segments
LOGIC

C0
X0
X1
06
K oyo

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.

PORT1 PORT2
TERM

RUN STOP
8
are more important than others. For example,
you need to understand how the CPU updates Normal Run mode scan 9
the I/O points, handles forcing operations, and
solves the application program. The remaining
segments are not that important for most
Read Inputs 10
applications.
You can use DirectSOFT, the D2HPP
Read Inputs from Specialty I/O 11
(Handheld Programmer) or the CPU mode
switch to place the CPU in Run Mode.
Service Peripherals
12
You can also edit the program during Run Update Clock, Special Relays
Mode. The Run Mode Edits are not bumpless 13
to the outputs. Instead, the CPU ignores the Solve the Application Program
inputs and maintains the outputs in their
last state while it accepts the new program Write
Write Outputs
Outputs
14
information. If an error is found in the new
program, then the CPU will turn all the Write Outputs to Specialty I/O A
outputs off and enter the Program Mode. This
feature is discussed in more detail in Chapter 9. Diagnostics
B
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
C
thoroughly consider the impact of any changes to minimize the risk of personal injury or damage
to equipment. D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-13


Chapter 3: CPU Specifications and Operation

Read Inputs
The CPU reads the status of all inputs, then stores it in the image register. Input image
1 register locations are designated with an X followed by a memory location. Image register
data is used by the CPU when it solves the application program.
2 Of course, an input may change after the CPU has just read the inputs. Generally, the
CPU scan time is measured in milliseconds. If you have an application that cannot wait
3 until the next I/O update, you can use Immediate Instructions. These do not use the status
of the input image register to solve the application program. The Immediate instructions
immediately read the input status directly from the I/O modules. However, this lengthens
4 the program scan since the CPU has to read the I/O point status again. A complete list of the
Immediate instructions is included in Chapter 5.
5 Service Peripherals and Force I/O
After the CPU reads the inputs from the input modules, it reads any attached peripheral
6 devices. This is primarily a communications service for any attached devices. For example, it
would read a programming device to see if any input, output, or other memory type status
7 needs to be modified. There are two basic types of forcing available with the DL06 CPUs:
Forcing from a peripheral not a permanent force, good only for one scan
8 Bit Override holds the I/O point (or other bit) in the current state. Valid bits are X, Y, C, T, CT,
and S. (These memory types are discussed in more detail later in this chapter).

9 Regular Forcing This type of forcing can temporarily change the status of a discrete bit.
For example, you may want to force an input on, even though it is really off. This allows you
to change the point status that was stored in the image register. This value will be valid until
10 the image register location is written to during the next scan. This is primarily useful during
testing situations when you need to force a bit on to trigger another event.
11 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. Bit override
12 basically disables any changes to the discrete point by the CPU. For example, if you enable bit
override for X1, and X1 is off at the time, then the CPU will not change the state of X1. This
means that even if X1 comes on, the CPU will not acknowledge the change. So, if you used
13 X1 in the program, it would always be evaluated as Off in this case. Of course, if X1 was on
when the bit override was enabled, then X1 would always be evaluated as On.
14 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
A Override for Y0 and it was off at the time, then the CPU would not change the state of Y0.
However, you can still use a programming device to change the status. Now, if you use the
programming device to force Y0 on, it will remain on and the CPU will not change the state
B 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
C override is removed. The following diagram shows a brief overview of the bit override feature.
Notice the CPU does not update the Image Register when bit override is enabled.

3-14 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

1
Input Update Input Update
2
X128 ... X2 X1 X0

3
OFF ... ON ON OFF
Bit Override OFF Force from Y128 ... Y2 Y1 Y0 Force from Bit Override ON
Programmer OFF ... ON ON OFF Programmer
C377 ... C2 C1 C0
OFF ... ON OFF OFF
Result of Program
Solution
Image Register (example) Result of Program
Solution 4
5
6
WARNING: Only authorized personnel fully familiar with all aspects of the application should 7
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.
8
CPU Bus Communication
It is possible to transfer data to and from the CPU over the CPU bus on the backplane. This
9
data is more than standard I/O point status. This type of communications can only occur on
the CPU (local) base. There is a portion of the execution cycle used to communicate with 10
these modules. The CPU performs both read and write requests during this segment.

Update Clock, Special Relays and Special Registers 11


The DL06 CPUs have an internal real-time clock and calendar timer which is accessible to
the application program. Special V-memory locations hold this information. This portion 12
of the execution cycle makes sure these locations get updated on every scan. Also, there are
several different Special Relays, such as diagnostic relays, for example, that are also updated
during this segment.
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-15


TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
K oyo

Chapter 3: CPU Specifications and Operation 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

PORT1 PORT2 RUN STOP

Solve Application Program


The CPU evaluates each instruction in the
1 application program during this segment of the OUTPUT: 6-240V
Y
G LG 0V
AC(L) AC(N) 24V C0
Y0

50 - 60Hz
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12

2.0A, 6 - 27V
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A PWR: 100-240V 50-60Hz 40VA
D0-06DR
PWR
RUN
CPU
TX1
RX1

scan cycle. The instructions define the relationship


0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

2 between the input conditions and the desired


output response. The CPU uses the output image
LOGIC

C0
X0
06
K oyo

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

register area to store the status of the desired action


3 for the outputs. Output image register locations
Normal Run mode scan
PORT1 PORT2 RUN STOP

are designated with a Y followed by a memory


4 location. The actual outputs are updated during the
write outputs segment of the scan cycle. There are Read Inputs from Specialty I/O

5 immediate output instructions available that will


update the output points immediately instead of Service Peripherals
waiting until the write output segment. A complete
6 list of the Immediate instructions is provided in
Chapter 5.
Update Special Relays

7 The internal control relays (C), the stages (S), and


the variable memory (V) are also updated in this
Solve the Application Program

segment.
8 You may recall that you can force various types
Write Outputs from Specialty I/O

of points in the system, discussed earlier in this


9
Diagnostics
chapter. If any I/O points or memory data have been
forced, the output image register also contains this
10 information.

Solve PID Loop Equations


11 The DL06 CPU can process up to 8 PID loops. The loop calculations are run as a separate
task from the ladder program execution, immediately following it. Only loops which have
12 been configured are calculated, and then only according to a built-in loop scheduler. The
sample time (calculation interval) of each loop is programmable. Please refer to Chapter 8,
PID Loop Operation, for more on the effects of PID loop calculation on the overall CPU
13 scan time.

14 Write Outputs
Once the application program has solved the instruction logic and constructed the output
A image register, the CPU writes the contents of the output image register to the corresponding
output points. Remember, the CPU also made sure that any forcing operation changes were
stored in the output image register, so the forced points get updated with the status specified
B earlier.

Write Outputs to Specialty I/O


C After the CPU updates the outputs in the local and expansion bases, it sends the output point
information that is required by any Specialty modules which are installed. Specialty modules
D have built-in microprocessors which communicate to the CPU via the backplane. Some
of these modules can process data. Refer to the specific Specialty module user manual for
detailed information.

3-16 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Diagnostics
During this part of the scan, the CPU performs all system diagnostics and other tasks such as
calculating the scan time and resetting the watchdog timer. There are many different error 1
conditions that are automatically detected and reported by the DL06 PLCs. Appendix B
contains a listing of the various error codes. 2
Probably one of the more important things that occurs during this segment is the scan time
calculation and watchdog timer control. The DL06 CPU has a watchdog timer that stores
the maximum time allowed for the CPU to complete the solve application segment of the
3
scan cycle. If this time is exceeded, the CPU will enter the Program Mode and turn off all
outputs. The default value set from the factory is 200 ms. An error is automatically reported. 4
For example, the Handheld Programmer would display the following message E003 S/W
TIMEOUT when the scan overrun occurs.
You can use AUX 53 to view the minimum, maximum, and current scan time. Use AUX 55
5
to increase or decrease the watchdog timer value.
6
I/O Response Time 7
Is Timing Important for Your Application?
I/O response time is the amount of time required for the control system to sense a change in 8
an input point and update a corresponding output point. In the majority of applications, the
CPU performs this task in such a short period of time that you may never have to concern
yourself with the aspects of system timing. However, some applications do require extremely
9
fast update times. In these cases, you may need to know how to determine the amount of
time spent during the various segments of operation. 10
There are four things that can affect the I/O response time.
The point in the scan cycle when the field input changes states
11
Input Off to On delay time
CPU scan time
12
Output Off to On delay time
The next paragraphs show how these items interact to affect the response time.
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-17


Chapter 3: CPU Specifications and Operation

Normal Minimum I/O Response


The I/O response time is shortest when the input changes just before the Read Inputs portion
1 of the execution cycle. In this case the input status is read, the application program is solved,
and the output point gets updated. The following diagram shows an example of the timing
for this situation.
2 Scan

3 Scan
Solve
Program
Read
Solve
Program
Write
Solve
Program
Solve
Program

Inputs Outputs

4
Field Input

5 CPU Reads
Inputs
CPU Writes
Outputs
Input

6 Off/On Delay

7
Output
Off/On Delay

8 I/O Response T ime

In this case, you can calculate the response time by simply adding the following items:
9 Input Delay + Scan Time + Output Delay = Response Time

10 Normal Maximum I/O Response


The I/O response time is longest when the input changes just after the Read Inputs portion
11 of the execution cycle. In this case the new input status is not read until the following scan.
The following diagram shows an example of the timing for this situation.

12 Solve
Scan

Solve Solve Solve


Scan Program Program Program Program

13 Read
Inputs
Write
Outputs

14 Field Input

A
CPU Reads CPU Writes
Inputs Outputs
Input
Off/On Delay

B Output
Off/On Delay

C I/O Response T ime

D In this case, you can calculate the response time by simply adding the following items:
Input Delay +(2 x Scan Time) + Output Delay = Response Time

3-18 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Improving Response Time


There are a few things you can do to help improve throughput.
You can choose instructions with faster execution times 1
You can use immediate I/O instructions (which update the I/O points during the program
execution) 2
You can use the HSIO Mode 50 Pulse Catch features designed to operate in high-speed
environments. See Appendix E for details on using this feature. 3
You can change Mode 60 filter to 0 msec for X0, X1, X2, and X3.
Of these three things the Immediate I/O instructions are probably the most important 4
and most useful. The following example shows how an immediate input instruction
and immediate output instruction would affect the response time. 5
Scan 6
Solve Solve Solve Solve
Scan Program
Normal Read
Program
Write
Program
Normal
Program 7
8
Read Input Output Write
Input Immediate Immediate Outputs

Field Input
9
Input
Off/On Delay 10
Output
In
Off/On Delay this case, you can calculate the response time by simply adding the following items.
11
Input Delay + Instruction Execution Time + Output Delay = Response Time
The instruction execution timeTime
I/O Response would be calculated by adding the time for the immediate
12
input instruction, the immediate output instruction, and any other instructions in between
the two. 13
NOTE: Even though the immediate instruction reads the most current status from I/O, it only uses
the results to solve that one instruction. It does not use the new status to update the image register.
14
Therefore, any regular instructions that follow will still use the image register values. Any immediate
instructions that follow will access the I/O again to update the status. A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-19


Chapter 3: CPU Specifications and Operation

CPU Scan Time Considerations Power up

1 The scan time covers all the cyclical tasks that are performed
by the operating system. You can use DirectSOFT or Initialize hardware

2 the Handheld Programmer to display the minimum,


maximum, and current scan times that have occurred since
Check I/O module
config. and verify

the previous Program Mode to Run Mode transition. This


3 information can be very important when evaluating the
Initialize various memory
based on retentive
configuration
performance of a system. As weve shown previously there
4 are several segments that make up the scan cycle. Each
of these segments requires a certain amount of time to Update input
complete. Of all the segments, the following are the most
5 important: Read input data from
Specialty and Remote I/O
Input Update
6 Peripheral Service
Service peripheral

Program Execution
7 Output Update
CPU Bus Communication

Timed Interrupt Execution


8
Update Clock / Calendar

The one you have the most control over is the amount of
time it takes to execute the application program. This is PGM

9 because different instructions take different amounts of


time to execute. So, if you think you need a faster scan, RUN
Mode?

10 then you can try to choose faster instructions.


Your choice of I/O type and peripheral devices can also
Execute ladder program

affect the scan time. However, these things are usually


11
PID Equations (DL250)

dictated by the application.


Update output
The following paragraphs provide some general information
12 on how much time some of the segments can require. Write output data to
Specialty and Remote I/O

13 Reading Inputs
The time required during each scan to read the input status Do diagnostics
of built-in inputs is 52.6 s. Dont confuse this with the
14 I/O response time that was discussed earlier. OK YES
OK?

A Writing Outputs
The time required to write the output status of built-in
NO
Report the error, set flag,
outputs is 41.1 S. Dont confuse this with the I/O
B
register, turn on LED

response time that was discussed earlier.


NO

C
Fatal error

YES
Force CPU into

D PGM mode

3-20 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Service Peripherals
Communication requests can occur at any time during the scan, but the CPU only logs the
requests for service until the Service Peripherals portion of the scan. The CPU does not spend 1
any time on this if there are no peripherals connected.
To Log Request (anytime) DL06 2
Nothing Connected Min. & Max 0s

Port 1
Send Min. / Max.
Rec. Min. / Max.
5.8/11.8 s
12.5/25.2 s
3
Port 2
Send Min. / Max.
Rec. Min. / Max.
6.2/14.3 s
14.2/31.9 s
4
LCD Min. / Max. 4.8/49.2 s

During the Service Peripherals portion of the scan, the CPU analyzes the communications
5
request and responds as appropriate. The amount of time required to service the peripherals
depends on the content of the request. 6
To Service Request DL06 DL06 7
Minimum 9 s
Run Mode Max.
Program Mode Max.
412 s
2.5 second
8
9
CPU Bus Communication
Some specialty modules can also communicate directly with the CPU via the CPU bus.
During this portion of the cycle the CPU completes any CPU bus communications. The
10
actual time required depends on the type of modules installed and the type of request being
processed. 11
Update Clock/Calendar, Special Relays, Special Registers 12
The clock, calendar, and special relays are updated and loaded into special V-memory
locations during this time. This update is performed during both Run and Program Modes.
13
Modes DL06
Program Mode
Minimum 12.0 s 14
Maximum 12.0 s

Run Mode
Minimum
Maximum
20.0 s
27.0 s
A
B
NOTE: The Clock/Calendar is updated while there is energy on the super-capacitor. If the super-
capacitor is discharged, the real time and date is lost.
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-21


Chapter 3: CPU Specifications and Operation

Application Program Execution


The CPU processes the program from address 0 to the END instruction. The CPU executes
1 the program left to right and top to bottom. As each rung is evaluated the appropriate image
register or memory location is updated. The time required to solve the application program
depends on the type and number of instructions used, and the amount of execution overhead.
2 Just add the execution times for all the instructions in your program to determine to total
execution time. Appendix C provides a complete list of the instruction execution times for
3 the DL06 Micro PLC. For example, the execution time for running the program shown
below is calculated as follows:
4 Instruction Time
X0 X1 Y0

5 STR X0
OR C0
.67
.51
s
s
OUT

ANDN X1 .51 s C0

6 OUT Y0
STRN C100
1.82
.67
s
s
C100
LD K10 9.00 s LD

7 STRN C101
OUT V2002
.67
9.3
s
s C101
OUT
K10

V2002
STRN C102 .67 s

8 LD K50
STRN C103
9.00
.67
s
s C102
LD
OUT V2006 1.82 s K50

9 STR X5
ANDN X10
OUT Y3
.67
.51
1.82
s
s
s
C103
OUT V2006

10 END

SUBTOTAL
12.80

51.11 s
s
X5 X10 Y3
OUT

11 Overhead
Minimum
DL06
746.2 s
END

12 Maximum

TOTALTOTAL
4352.4 s

TIME = (Program
TIME =execution
(Programtime + Overhead)
execution time + xOverhead)
1.18 x 1.18
13
14 The program above takes only 51.11 s to execute during each scan. The DL06 spends
0.18ms on internal timed interrupt management, for every 1ms of instruction time. The
total scan time is calculated by adding the program execution time to the overhead (shown
A above) and multiplying the result (ms) by 1.18. Overhead includes all other housekeeping
and diagnostic tasks. The scan time will vary slightly from one scan to the next, because of
B fluctuation in overhead tasks.
Program Control Instructions the DL06 CPUs offer additional instructions that can
C change the way the program executes. These instructions include FOR/NEXT loops,
Subroutines, and Interrupt Routines. These instructions can interrupt the normal program
flow and affect the program execution time. Chapter 5 provides detailed information on how
D these different types of instructions operate.

3-22 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation
PLC Numbering Systems
If you are a new PLC user or are using octal binary
1482
BCD ?
AutomationDirect PLCs for the first time, please
take a moment to study how our PLCs use numbers.
?
3A9
? 3 0402 ? 1
Youll find that each PLC manufacturer has their 7 961428 ASCII
own conventions on the use of numbers in their
PLCs. We want to take just a moment to familiarize
1001011011
177
?
hexadecimal
1011
2
decimal
A
you with how numbers are used in AutomationDirect
PLCs. The information you learn here applies to all
300124
72B
? 3
of our PLCs.
As any good computer does, PLCs store and manipulate numbers in binary form - just ones
and zeros. So, why do we have to deal with numbers in so many different forms? Numbers
4
have meaning, and some representations are more convenient than others for particular
purposes. Sometimes we use numbers to represent a size or amount of something. Other 5
numbers refer to locations or addresses, or to time. In science we attach engineering units to
numbers to give a particular meaning (see Appendix I for numbering system details). 6
PLC Resources
PLCs offer a fixed amount of resources, depending on the model and configuration. We use 7
the word resources to include variable memory (V-memory), I/O points, timers, counters,
etc. Most modular PLCs allow you to add I/O points in groups of eight. In fact, all the
resources of our PLCs are counted in octal. Its easier for computers to count in groups of
8
eight than ten, because eight is an even power of 2 (see Appendix I for more details).
9
Octal means simply counting in groups of eight things
at a time. In the figure to the right, there are eight
circles. The quantity in decimal is 8, but in octal it is
Decimal 1 2 3 4 5 6 7 8 10
10 (8 and 9 are not valid in octal). In octal, 10 means 1
group of 8 plus 0 (no individuals) Octal 1 2 3 4 5 6 7 10 11
In the figure below, we have two groups of eight circles. Counting in octal we have 20 items, 12
meaning 2 groups of eight, plus 0 individuals Dont say twenty, say twozero octal. This
makes a clear distinction between number systems. 13
Decimal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
14
Octal 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20
A
After counting PLC resources, its time to access PLC resources (theres a difference). The
CPU instruction set accesses resources of the PLC using octal addresses. Octal addresses are
the same as octal quantities, except they start counting at zero. The number zero is significant
B
to a computer, so we dont skip it.
Our circles are in an array of square containers to
X= 0 1 2 3 4 5 6 7
C
X
the right. To access a resource, our PLC instruction
will address its location using the octal references 1 X D
shown. If these were counters, CT14 would access 2 X
the black circle location.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-23


Chapter 3: CPU Specifications and Operation
VMemory
Variable memory (V-memory) stores data for the ladder program and for configuration
settings. V-memory locations and V-memory addresses are the same thing, and are numbered
1 in octal. For example, V2073 is a valid location, while V1983 is not valid (9 and 8 are not
valid octal digits).
2 Each V-memory location is one data word wide, meaning 16 bits. For configuration registers,
our manuals will show each bit of a V-memory word. The least significant bit (LSB) will be
on the right, and the most significant bit (MSB) on the left. We use the word significant,
3 referring to the relative binary weighting of the bits.
V-memory address V-memory data

4 (octal)
V2017
MSB
(binary)

0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1
LSB

5 V-memory data is 16-bit binary, but we rarely program the data registers one bit at a time.
We use instructions or viewing tools that let us work with decimal, octal, and hexadecimal
numbers. All these are converted and stored as binary for us.
6 A frequently-asked question is How do I tell if a number is octal, BCD, or hex? The answer
is that we usually cannot tell just by looking at the data ... but it does not really matter.
7 What matters is, the source or mechanism which writes data into a V-memory location and
the thing which later reads it must both use the same data type (i.e., octal, hex, binary, or
whatever). The V-memory location is just a storage box ... thats all. It does not convert or
8 move the data on its own.

Binary-Coded Decimal Numbers


9 Since humans naturally count in
BCD number

V-memory storage 0 1 0 0
4

1 0 0 1
9

0 0 1 1
3

0 1 1 0
6

decimal (10 fingers, 10 toes), we


10 prefer to enter and view PLC data in decimal as well. However, computers are more efficient
in using pure binary numbers. A compromise solution between the two is Binary-Coded
11 Decimal (BCD) representation. A BCD digit ranges from 0 to 9, and is stored as four binary
bits (a nibble). This permits each V-memory location to store four BCD digits, with a range
of decimal numbers from 0000 to 9999.
12 In a pure binary sense, a 16-bit word can represent numbers from 0 to 65535. In storing
BCD numbers, the range is reduced to only 0 to 9999. Many math instructions use Binary-
13 Coded Decimal (BCD) data, and DirectSOFT and the handheld programmer allow us to
enter and view data in BCD.

14 Hexadecimal Numbers
Hexadecimal numbers are similar to BCD numbers, except they utilize all possible binary
A values in each 4-bit digit. They are base-16 numbers so we need 16 different digits. To extend
our decimal digits 0 through 9, we use A through F as shown.

B Decimal
Hexadecimal
0 1 2 3
0 1 2 3
4 5
4 5
6
6
7
7
8 9 10 11 12 13 14 15
8 9 A B C D E F

C A 4-digit hexadecimal number can represent all 65536 values in a V-memory word. The
range is from 0000 to FFFF (hex). PLCs often need this full range for sensor data, etc.
Hexadecimal is just a convenient way for humans to view full binary data.
D Hexadecimal number A 7 F 4

V-memory storage 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0

3-24 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Memory Map
With any PLC system, you generally have many different types of information to process.
This includes input device status, output device status, various timing elements, parts counts, 1
etc. It is important to understand how the system represents and stores the various types of
data. For example, you need to know how the system identifies input points, output points,
data words, etc. The following paragraphs discuss the various memory types used in DL06
2
Micro PLCs. A memory map overview for the
follows the memory descriptions.
CPU
3
Octal. Numbering System
4
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU

Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X

All memory locations and resources


RX2
INPUT: 12 - 24V 3 - 15mA

are numbered in Octal (base 8). For


5
06 LOGIC
K oyo

example, the diagram shows how the octal 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

numbering system works for the discrete PORT1 PORT2 RUN STOP

input points. Notice the octal system does


not contain any numbers with the digits
6
X0 X1 X2 X3 X4 X5 X6 X7
8 or 9.

Discrete and Word Locations


7
As you examine the different memory
types, youll notice two types of memory
X10 X11 8
in the DL06, discrete and word memory.
Discrete memory is one bit that can be
Discrete On or Off, 1 bit
X0 9
either a 1 or a 0. Word memory is referred
to as V-memory (variable) and is a 16-bit
location normally used to manipulate Word Locations 16 bits
10
data/numbers, store data/numbers, etc.
Some information is automatically stored
0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 11
in V-memory. For example, the timer
current values are stored in V-memory. 12
V-memory Locations for Discrete Memory Areas
The discrete memory area is for inputs, outputs, control relays, special relays, stages, timer 13
status bits and counter status bits. However, you can also access the bit data types as a
V-memory word. Each V-memory location contains 16 consecutive discrete locations. For
example, the following diagram shows how the X input points are mapped into V-memory
14
locations.
8 Discrete (X) Input Points A
X7 X6 X5 X4 X3 X2 X1 X0
B
C
Bit # 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 V40400
These discrete memory areas and their corresponding V-memory ranges are listed in the D
memory area table for DL06 Micro PLCs on the following pages.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-25


Chapter 3: CPU Specifications and Operation

Input Points (X Data Type)


1 The discrete input points are noted by an X data
X0 Y0
OUT
type. There are 20 discrete input points and 256
2 discrete input addresses available with DL06
CPUs. In this example, the output point Y0 will
be turned on when input X0 energizes.
3
Output Points (Y Data Type) X1 Y1

4 The discrete output points are noted by a Y data


type. There are 16 discrete outputs and 256
OUT

discrete output addresses available with DL06


5 CPUs. In this example, output point Y1 will be
turned on when input X1 energizes.
6 Control Relays (C Data Type) X6 C5
OUT
Control relays are discrete bits normally used to
7 control the user program. The control relays do
not represent a real world device, that is, they C5 Y10

8 cannot be physically tied to switches, output


coils, etc. There are 1024 control relays internal
OUT

Y20

9 to the CPU. Because of this, control relays can


be programmed as discrete inputs or discrete
OUT

outputs. These locations are used in programming


10 the discrete memory locations (C) or the
corresponding word location which contains 16
11 consecutive discrete locations.
In this example, memory location C5 will energize
12 when input X6 turns on. The second rung shows
a simple example of how to use a control relay as
an input.
13 Timers and Timer Status Bits (T Data Type)
14 There are 256 timers available in the CPU. Timer
status bits reflect the relationship between the
X0
TMR
K30
T1

current value and the preset value of a specified


A timer. The timer status bit will be on when the
current value is equal or greater than the preset T1 Y12

B value of a corresponding timer.


When input X0 turns on, timer T1 will start.
OUT

C When the timer reaches the preset of 3 seconds (K


of 30) timer status contact T1 turns on. When T1
turns on, output Y12 turns on. Turning off X0
D resets the timer.

3-26 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

Timer Current Values (V Data Type)


As mentioned earlier, some information is automatically
stored in V-memory. This is true for the current values
X0
TMR
K1000
T1 1
associated with timers. For example: V0 holds the
current value for Timer 0; V1 holds the current value for
Timer 1; and so on. These can also be designated as V1 K30 Y2
2
TA0 (Timer Accumulated)for Timer 0, and TA1 for OUT
Timer 1. 3
V1 K50 Y3
The primary reason for this is programming flexibility.
The example shows how you can use relational contacts
OUT
4
to monitor several time intervals from a single timer.

Counters and Counter Status Bits (CT Data type)


V1 K75 V1 K100 Y4
OUT 5
There are 128 counters available in the CPU. Counter
status bits that reflect the relationship between the 6
current value and the preset value of a specified counter. X0
The counter status bit will be on when the current
value is equal to or greater than the preset value of a
CNT
K10
CT3
7
X1
corresponding counter.
Each time contact X0 transitions from off to on, the
8
counter increments by one. (If X1 comes on, the counter CT3 Y2
is reset to zero.) When the counter reaches the preset of OUT 9
10 counts (K of 10) counter status contact CT3 turns on.
When CT3 turns on, output Y2 turns on.
X0
10
Counter Current Values (V Data Type) CNT CT3
Just like the timers, the counter current values are also
X1
K10
11
automatically stored in V-memory. For example, V1000
holds the current value for Counter CT0, V1001 holds
the current value for Counter CT1, etc. These can also
12
V1003 K1 Y2
be designated as CTA0 (Counter Accumulated) for
Counter 0 and CTA01 for Counter 1.
OUT
13
The primary reason for this is programming flexibility. V1003 K3 Y3
The example shows how you can use relational contacts OUT 14
to monitor the counter values.
V1003 K5 V1003 K8 Y4
OUT
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-27


Chapter 3: CPU Specifications and Operation

Word Memory (V Data Type)


Word memory is referred to as V-memory (variable)
1 and is a 16-bit location normally used to manipulate X0
LD
data/numbers, store data/numbers, etc. Some K1345

2 information is automatically stored in V-memory.


For example, the timer current values are stored in
OUT V2000
V-memory. The example shows how a four-digit
3 BCD constant is loaded into the accumulator and
then stored in a V-memory location.
4 Stages (S Data type)
Stages are used in RLLPLUS programs to create a Word Locations 16 bits
5 structured program, similar to a flowchart. Each 0 0 0 1 00 1 1 0 1 0 0 0 1 0 1
program Stage denotes a program segment. When
6 the program segment, or Stage, is active, the logic
within that segment is executed. If the Stage is 1 3 4 5
off, or inactive, the logic is not executed and the
7 CPU skips to the next active Stage. (See Chapter
Ladder Representation
7 for a more detailed description of RLLPLUS ISG
Wait for Start
8
S0000
programming.) Start S1
JMP
Each Stage also has a discrete status bit that can X0

9 be used as an input to indicate whether the Stage


is active or inactive. If the Stage is active, then the SG
S0001 Check for a Part
S500
JMP

status bit is on. If the Stage is inactive, then the


10 status bit is off. This status bit can also be turned
Part
Present

X1
S2
JMP

on or off by other instructions, such as the SET Part

11
Present S6
or RESET instructions. This allows you to easily X1
JMP

control stages throughout the program. SG


Clamp the part

12
S0002

Special Relays (SP Data Type) Clamp


SET
Special relays are discrete memory locations with S400

13
Part
Locked S3
pre-defined functionality. There are many different JMP
X2
types of special relays. For example, some aid in
14 program development, others provide system
operating status information, etc. Appendix D
provides a complete listing of the special relays.
A In this example, control relay C10 will energize for SP5 C10
50 ms and de-energize for 50 ms because SP5 is a OUT
B predefined relay that will be on for 50 ms and off
for 50 ms.
C SP4: 1 second clock
SP5: 100 ms clock
D SP6: 50 ms clock

3-28 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation
DL06 System V-memory
System Parameters and Default Data Locations (V Data Type)
The DL06 PLCs reserve several V-memory locations for storing system parameters or certain 1
types of system data. These memory locations store things like the error codes, High-Speed
I/O data, and other types of system setup information.
Read
2
System Default Values /
V-memory
Description of Contents
Ranges
Only
R/W
3
V700-V707 Sets the V-memory location for option card in slot 1 N/A R/W
V710-V717
V720-V727
Sets the V-memory location for option card in slot 2
Sets the V-memory location for option card in slot 3
N/A
N/A
R/W
R/W
4
V730-V737 Sets the V-memory location for option card in slot 4
V3630V3707 The default location for multiple preset values for UP/DWN and UP Counter 1 or pulse catch
function
N/A
N/A
R/W
R/W 5
V3710-V3767 The default location for multiple preset values for UP/DWN and UP Counter 2 N/A R/W
V7620 DV-1000 Sets the V-memory location that contains the value V0 V3760 R/W 6
V7621 DV-1000 Sets the V-memory location that contains the message V0 V3760 R/W
V7622
V7623
DV-1000 Sets the total number (1 32) of V-memory locations to be displayed
DV-1000 Sets the V-memory location containing the numbers to be displayed
1 - 32
V0 V3760
R/W
R/W
7
V7624
V7625
DV-1000 Sets the V-memory location that contains the character code to be displayed
DV-1000 Contains the function number that can be assigned to each key
V0 V3760
V-memory for X, Y, or C
R/W
R/W 8
V7626 DV-1000 Powerup operational mode 0,1, 2, 3, 12 R/W
V7627 Change preset value 0000 to 9999
Starting location for the multistep presets for channel 1. The default value is 3630, which Default: V3630
R/W
9
V7630 indicates the first value should be obtained from V3630. Since there are 24 presets available, Range: V0- V3710 R/W

V7631
the default range is V3630 V3707. You can change the starting point if necessary.
Starting location for the multistep presets for channel 2. The default value is 3710, which
indicates the first value should be obtained from V3710. Since there are 24 presets available, Default: V3710 R/W
10
the default range is V3710 V3767. You can change the starting point if necessary. Range: V0- V3710

V7632 Setup Register for Pulse Output N/A R/W 11


Default: 0060
Lower Byte Range: Range:
10 Counter 20 Quadrature
30 Pulse Out 40 Interrupt
12
V7633
Sets the desired function code for the high speed counter, interrupt, pulse catch, pulse train,
and input filter.
50 Pulse Catch 60 Filtered
discrete In. Upper Byte
Range: Bits 811, 14, 15:
R/W
13
This location can also be used to set the power-up in Run Mode option.
Unused, Bit 13: Powerup
in RUN, only if Mode Switch
is inTERM position. Bit 12 is
14
used to enable the low battery

V7634 X0 Setup Register for High-Speed I/O functions for input X0


indications.
Default: 1006 R/W
A
V7635
V7636
X1 Setup Register for High-Speed I/O functions for input X1
X2 Setup Register for High-Speed I/O functions for input X2
Default: 1006
Default: 1006
R/W
R/W B
V7637 X3 Setup Register for High-Speed I/O functions for input X3 Default: 1006 R/W
V7640 PID Loop table beginning address
V1200 - V7377
V10000-V17777
R/W C
V7641 Number of PID loops enabled 1-8 R/W
V7642
V7643-V7646
Error Code - PID Loop Table
DirectSoft I-Box instructions work area
R
R D
V7647 Timed Interrupt R/W
V7653 Port 2: Terminate code setting Non-procedure R/W
V7655 Port 2: Setup for the protocol, time-out, and the response delay time R/W

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-29


Chapter 3: CPU Specifications and Operation

Default Read
System
Description of Contents Values / Only
V-memory
Ranges R/W
1 V7656 Port 2: Setup for the station number, baud rate, STOP bit, and parity
0400h reset
R/W
V7657 Port 2: Setup completion code used to notify the completion of the parameter setup port 2 R/W

2 V7660
V7661
Scan control setup: Keeps the scan control mode
Setup timer over counter
R/W
R

3 V7662V7710
V7711-V7717
Reserved
DirectSOFT I-Box instructions work area
R/W
R
V7720V7722 Locations for DV1000 operator interface parameters R/W
4 V7720
V7721
location for DV-1000 operation interface Titled Timer preset value pointer
DV-1000: Title Counter preset value pointer
R/W
R/W

5 V7722
V7723V7725
DV-1000: Hibyte-Titled, Lobyte-Timer preset block size
DirectSOFT I-Box instructions work area
R/W
R
V7726 Reserved R/W

6 V7727
V7730-V7737
Version No
D0-DCM Module Slot0 Auto Reset Timeout
R
R/W
V7731 D0-DCM Module Slot1 Auto Reset Timeout R/W
7 V7732
V7733
D0-DCM Module Slot2 Auto Reset Timeout
D0-DCM Module Slot3 Auto Reset Timeout
R/W
R/W

8 V7734-V7737
V7740
Reserved
Port 2: Communication Auto Reset Timer Setup Default: 3030
R/W
R/W
V7741 Reserved R/W

9 V7742
V7743
LCD Various LCD setting flags
V Memory address in which the default display message is stored as set
R/W
R/W
V7744-V7746 Reserved R/W

10 V7747
V7750
Location contains a 10 ms counter (0-99). This location increments once every 10 ms
Reserved
R
R/W
V7751 Fault Message Error Code R
11 V7752 I/O Configuration Error: stores the module ID code for the module that does not the current
configuration R
V7753 I/O Configuration Error: stores the module ID code R

12 V7754
V7755
I/O Configuration Error: identifies the base and slot number
Error code stores the fatal error code
R
R
V7756 Error code stores the major error code R
13 V7757
V7760V7762
Error code stores the minor error code
Reserved
R
R/W
V7763 Program address where syntax error exists R
14 V7764 Syntax error code
Scan counter stores the total number of scan cycles that have occurred since the last Program
R
V7765 Mode to Run Mode transition (in decimal) R

A V7766
V7767
Contains the number of seconds on the clock (00-59)
Contains the number of minutes on the clock (00-59)
R
R

B V7770
V7771
Contains the number of hours on the clock (00-23)
Contains the day of the week (Mon., Tues., Wed., etc.)
R
R
V7772 Contains the day of the month (01, 02, etc.) R

C V7773
V7774
Contains the month (01 to 12)
Contains the year (00 to 99)
R
R
V7775 Scan stores the current scan time (milliseconds) R
D V7776 Scan stores the minimum scan time that has occurred since the last Program Mode to Run
Mode transition (milliseconds) R
V7777 Scan stores the maximum scan rate since the last power cycle (milliseconds) R

3-30 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

DL06 Aliases
An alias is an alternate way of referring to certain memory types, such as timer/counter
current values, V-memory locations for I/O points, etc., which simplifies understanding the
memory address. The use of the alias is optional, but some users may find the alias to be
1
helpful when developing a program. The table below shows how the aliases can be used.
2
DL06 Aliases
3
Address Start Alias Start Example
V0 is the timer accumulator value for timer 0, therefore, its
4
V0 TA0 alias is TA0. TA1 is the alias for V1, etc..
V1000 CTA0 V1000 is the counter accumulator value for counter 0,
therefore, its alias is CTA0. CTA1 is the alias for V1001, etc.
5
V40000 VGX
V40000 is the word memory reference for discrete bits GX0
through GX17, therefore, its alias is VGX0. V40001 is the
word memory reference for discrete bits GX20 through GX 37,
6
therefore, its alias is VGX20.
V40200 is the word memory reference for discrete bits GY0
through GY17, therefore, its alias is VGY0. V40201 is the
7
V40200 VGY word memory reference for discrete bits GY20 through GY 37,
therefore, its alias is VGY20.
V40400 is the word memory reference for discrete bits X0
8
through X17, therefore, its alias is VX0. V40401 is the word
V40400 VX0 memory reference for discrete bits X20 through X37, therefore,
its alias is VX20.
9
V40500 is the word memory reference for discrete bits Y0
V40500 VY0 through Y17, therefore, its alias is VY0. V40501 is the word
memory reference for discrete bits Y20 through Y37, therefore,
10
its alias is VY20.

V40600 VC0
V40600 is the word memory reference for discrete bits C0
through C17, therefore, its alias is VC0. V40601 is the word
11
memory reference for discrete bits C20 through C37, therefore,
its alias is VC20.
V41000 is the word memory reference for discrete bits S0
12
V41000 VS0 through S17, therefore, its alias is VS0. V41001 is the word
memory reference for discrete bits S20 through S37, therefore,
its alias is VS20. 13
V41100 is the word memory reference for discrete bits T0
V41100 VT0 through T17, therefore, its alias is VT0. V41101 is the word
memory reference for discrete bits T20 through T37, therefore,
its alias is VT20.
14
V41140 VCT0
V41140 is the word memory reference for discrete bits CT0
through CT17, therefore, its alias is VCT0. V41141 is the
word memory reference for discrete bits CT20 through CT37,
A
therefore, its alias is VCT20.
V41200 is the word memory reference for discrete bits SP0
through SP17, therefore, its alias is VSP0. V41201 is the
B
V41200 VSP0 word memory reference for discrete bits SP20 through SP37,
therefore, its alias is VSP20. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-31


Chapter 3: CPU Specifications and Operation

DL06 Memory Map


Discrete Memory Word Memory
1 Memory Type Reference
(octal)
Reference
(octal)
Decimal Symbol

2 Input Points X0 X777 V40400 - V40437 512


X0

3 Output Points Y0 Y777 V40500 V40537 512


Y0

4 Control Relays C0 C1777 V40600 - V40677 1024


C0 C0

5 Special Relays SP0 SP777 V41200 V41237 512


SP0

6 Timers T0 T377 V41100 V41117 256


TMR
K100
T0

7 Timer Current Values None V0 V377 256


V0 K100

8 Timer Status Bits T0 T377 V41100 V41117 256


T0

9 Counters CT0 CT177 V41140 V41147 128


CNT CT0
K10

10 Counter V1000 K100


None V1000 V1177 128
Current Values
11 CT0
Counter Status Bits CT0 CT177 V41140 V41147 128
12 Data Words
V400-V677 192
None specific, used with many
None V1200 V7377 3200
(See Appendix F) instructions.
13 V10000 - V17777 4096
None specific, used with many
Data Words instructions.
14 EEPROM
(See Appendix F)
None V7400 V7577 128 May be non-volatile if MOV inst. is used.
Data can be rewritten to EEPROM at least
100,000 times before it fails.
A Stages S0 S1777 V41000 V41077 1024
SG SP0
S001
B Remote I/O (future use) GX0-GX3777 V40000-V40177 2048
GX0 GY0
(See Note 1) GY0-GY3777 V40200-V40377 2048
C System parameters None
V700-V777
V7600 V7777
64
128 None specific, used for various purposes
V36000-V37777 1024
D NOTE1: This area can be used for additional Data Words.
NOTE 2: The DL06 systems have 20 fixed discrete inputs and 16 fixed discrete outputs, but the total
can be increased by up to 64 inputs or 64 outputs, or a combination of both.

3-32 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

X Input/Y Output Bit Map


This table provides a listing of individual input and output points associated with each
V-memory address bit for the DL06s twenty integrated physical inputs and 16 integrated 1
physical outputs in addition to up to 64 inputs and 64 outputs for option cards. Actual
available references are X0 to X777 (V40400 V40437) and Y0 to Y777 (V40500 -
V40537).
2
MSB DL06 Input (X) and Output (Y) Points LSB X Input Y Output 3
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Address Address
017
037
016
036
015
035
014
034
013
033
012
032
011
031
010
030
007
027
006
026
005
025
004
024
003
023
002
022
001
021
000
020
V40400
V40401
V40500
V40501
4
057
077
056
076
055
075
054
074
053
073
052
072
051
071
050
070
047
067
046
066
045
065
044
064
043
063
042
062
041
061
040
060
V40402
V40403
V40502
V40503 5
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V40404 V40504
137
157
136
156
135
155
134
154
133
153
132
152
131
151
130
150
127
147
126
146
125
145
124
144
123
143
122
142
121
141
120
140
V40405
V40406
V40505
V40506
6
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40407 V40507
7
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40410 V40510
237
257
236
256
235
255
234
254
233
253
232
252
231
251
230
250
227
247
226
246
225
245
224
244
223
243
222
242
221
241
220
240
V40411
V40412
V40511
V40512
8
277
317
276
316
275
315
274
314
273
313
272
312
271
311
270
310
267
307
266
306
265
305
264
304
263
303
262
302
261
301
260
300
V40413
V40414
V40513
V40514 9
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V40415 V40515
357
377
356
376
355
375
354
374
353
373
352
372
351
371
350
370
347
367
346
366
345
365
344
364
343
363
342
362
341
361
340
360
V40416
V40417
V40516
V40517
10
417
437
416
436
415
435
414
434
413
433
412
432
411
431
410
430
407
427
406
426
405
425
404
424
403
423
402
422
401
421
400
420
V40420
V40421
V40520
V40521
11
457
477
456
476
455
475
454
474
453
473
452
472
451
471
450
470
447
467
446
466
445
465
444
464
443
463
442
462
441
461
440
460
V40422
V40423
V40522
V40523 12
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40424 V40524
537
557
536
556
535
555
534
554
533
553
532
552
531
551
530
550
527
547
526
546
525
545
524
544
523
543
522
542
521
541
520
540
V40425
V40426
V40525
V40526
13
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40427 V40527
14
617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V40430 V40530
637
657
636
656
635
655
634
654
633
653
632
652
631
651
630
650
627
647
626
646
625
645
624
644
623
643
622
642
621
641
620
640
V40431
V40432
V40531
V40532
A
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40433 V40533
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V40434 V40534 B
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V40435 V40535
757
777
756
776
755
775
754
774
753
773
752
772
751
771
750
770
747
767
746
766
745
765
744
764
743
763
742
762
741
761
740
760
V40436
V40437
V40536
V40537
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-33


Chapter 3: CPU Specifications and Operation

Stage Control/Status Bit Map


This table provides a listing of individual Stage control bits associated with each V-memory
1 address bit.

2 MSB DL06 Stage (S) Control Bits LSB


Address
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3 017
037
016
036
015
035
014
034
013
033
012
032
011
031
010
030
007
027
006
026
005
025
004
024
003
023
002
022
001
021
000
020
V41000
V41001
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V41002
4 077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V41003
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V41004
5 137
157
136
156
135
155
134
154
133
153
132
152
131
151
130
150
127
147
126
146
125
145
124
144
123
143
122
142
121
141
120
140
V41005
V41006

6 177
217
176
216
175
215
174
214
173
213
172
212
171
211
170
210
167
207
166
206
165
205
164
204
163
203
162
202
161
201
160
200
V41007
V41010

7 237
257
236
256
235
255
234
254
233
253
232
252
231
251
230
250
227
247
226
246
225
245
224
244
223
243
222
242
221
241
220
240
V41011
V41012
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V41013
8 317
337
316
336
315
335
314
334
313
333
312
332
311
331
310
330
307
327
306
326
305
325
304
324
303
323
302
322
301
321
300
320
V41014
V41015

9 357
377
356
376
355
375
354
374
353
373
352
372
351
371
350
370
347
367
346
366
345
365
344
364
343
363
342
362
341
361
340
360
V41016
V41017

10 417
437
416
436
415
435
414
434
413
433
412
432
411
431
410
430
407
427
406
426
405
425
404
424
403
423
402
422
401
421
400
420
V41020
V41021
457 456 455 454 453 452 451 450 447 446 445 444 443 442 441 440 V41022
11 477
517
476
516
475
515
474
514
473
513
472
512
471
511
470
510
467
507
466
506
465
505
464
504
463
503
462
502
461
501
460
500
V41023
V41024

12 537
557
536
556
535
555
534
554
533
553
532
552
531
551
530
550
527
547
526
546
525
545
524
544
523
543
522
542
521
541
520
540
V41025
V41026
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V41027
13 617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V41030
637 636 635 634 633 632 631 630 627 626 625 624 623 622 621 620 V41031
14 657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V41032
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V41033
A 717
737
716
736
715
735
714
734
713
733
712
732
711
731
710
730
707
727
706
726
705
725
704
724
703
723
702
722
701
721
700
720
V41034
V41035
757 756 755 754 753 752 751 750 747 746 745 744 743 742 741 740 V41036
B 777 776 775 774 773 772 771 770 767 766 765 764 763 762 761 760 V41037

C
This table is continued on the next page.
D

3-34 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

1
MSB DL06 Stage (S) Control Bits (contd) LSB
Address 2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1017
1037
1016
1036
1015
1035
1014
1034
1013
1033
1012
1032
1011
1031
1010
1030
1007
1027
1006
1026
1005
1025
1004
1024
1003
1023
1002
1022
1001
1021
1000
1020
V41040
V41041
3
1057 1056 1055 1054 1053 1052 1051 1050 1047 1046 1045 1044 1043 1042 1041 1040 V41042
1077 1076 1075 1074 1073 1072 1071 1070 1067 1066 1065 1064 1063 1062 1061 1060 V41043 4
1117 1116 1115 1114 1113 1112 1111 1110 1107 1106 1105 1104 1103 1102 1101 1100 V41044
1137
1157
1136
1156
1135
1155
1134
1154
1133
1153
1132
1152
1131
1151
1130
1150
1127
1147
1126
1146
1125
1145
1124
1144
1123
1143
1122
1142
1121
1141
1120
1140
V41045
V41046
5
1177 1176 1175 1174 1173 1172 1171 1170 1167 1166 1165 1164 1163 1162 1161 1160 V41047

1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V41050
6
1237
1257
1236
1256
1235
1255
1234
1254
1233
1253
1232
1252
1231
1251
1230
1250
1227
1247
1226
1246
1225
1245
1224
1244
1223
1243
1222
1242
1221
1241
1220
1240
V41051
V41052 7
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V41053
1317
1337
1316
1336
1315
1335
1314
1334
1313
1333
1312
1332
1311
1331
1310
1330
1307
1327
1306
1326
1305
1325
1304
1324
1303
1323
1302
1322
1301
1321
1300
1320
V41054
V41055
8
1357
1377
1356
1376
1355
1375
1354
1374
1353
1373
1352
1372
1351
1371
1350
1370
1347
1367
1346
1366
1345
1365
1344
1364
1343
1363
1342
1362
1341
1361
1340
1360
V41056
V41057 9
1417
1437
1416
1436
1415
1435
1414
1434
1413
1433
1412
1432
1411
1431
1410
1430
1407
1427
1406
1426
1405
1425
1404
1424
1403
1423
1402
1422
1401
1421
1400
1420
V41060
V41061 10
1457 1456 1455 1454 1453 1452 1451 1450 1447 1446 1445 1444 1443 1442 1441 1440 V41062
1477
1517
1476
1516
1475
1515
1474
1514
1473
1513
1472
1512
1471
1511
1470
1510
1467
1507
1466
1506
1465
1505
1464
1504
1463
1503
1462
1502
1461
1501
1460
1500
V41063
V41064
11
1537
1557
1536
1556
1535
1555
1534
1554
1533
1553
1532
1552
1531
1551
1530
1550
1527
1547
1526
1546
1525
1545
1524
1544
1523
1543
1522
1542
1521
1541
1520
1540
V41065
V41066
12
1577 1576 1575 1574 1573 1572 1571 1570 1567 1566 1565 1564 1563 1562 1561 1560 V41067

1617 1616 1615 1614 1613 1612 1611 1610 1607 1606 1605 1604 1603 1602 1601 1600 V41070
13
1637 1636 1635 1634 1633 1632 1631 1630 1627 1626 1625 1624 1623 1622 1621 1620 V41071
1657 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V41072 14
1677 1676 1675 1674 1673 1672 1671 1670 1667 1666 1665 1664 1663 1662 1661 1660 V41073
1717
1737
1716
1736
1715
1735
1714
1734
1713
1733
1712
1732
1711
1731
1710
1730
1707
1727
1706
1726
1705
1725
1704
1724
1703
1723
1702
1722
1701
1721
1700
1720
V41074
V41075
A
1757 1756 1755 1754 1753 1752 1751 1750 1747 1746 1745 1744 1743 1742 1741 1740 V41076
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V41077 B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-35


Chapter 3: CPU Specifications and Operation

Control Relay Bit Map


1 This table provides a listing of the individual control relays associated with each V-memory
address bit.
2 MSB
15 14 13 12 11 10
DL06 Control Relays (C)
9 8 7 6 5 4 3 2 1
LSB
0
Address

3 017
037
016
036
015
035
014
034
013
033
012
032
011
031
010
030
007
027
006
026
005
025
004
024
003
023
002
022
001
021
000
020
V40600
V40601
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V40602
4 077
117
076
116
075
115
074
114
073
113
072
112
071
111
070
110
067
107
066
106
065
105
064
104
063
103
062
102
061
101
060
100
V40603
V40604

5 137
157
136
156
135
155
134
154
133
153
132
152
131
151
130
150
127
147
126
146
125
145
124
144
123
143
122
142
121
141
120
140
V40605
V40606
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40607
6 217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40610
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V40611
7 257
277
256
276
255
275
254
274
253
273
252
272
251
271
250
270
247
267
246
266
245
265
244
264
243
263
242
262
241
261
240
260
V40612
V40613

8 317
337
316
336
315
335
314
334
313
333
312
332
311
331
310
330
307
327
306
326
305
325
304
324
303
323
302
322
301
321
300
320
V40614
V40615
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V40616
9 377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40617

417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40620
10 437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V40621
457 456 455 454 453 452 451 450 447 446 445 444 443 442 441 440 V40622
11 477
517
476
516
475
515
474
514
473
513
472
512
471
511
470
510
467
507
466
506
465
505
464
504
463
503
462
502
461
501
460
500
V40623
V40624
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40625
12 557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40626
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40627
13 617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V40630
637 636 635 634 633 632 631 630 627 626 625 624 623 622 621 620 V40631
14 657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V40632
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40633
A 717
737
716
736
715
735
714
734
713
733
712
732
711
731
710
730
707
727
706
726
705
725
704
724
703
723
702
722
701
721
700
720
V40634
V40635

B 757
777
756
776
755
775
754
774
753
773
752
772
751
771
750
770
747
767
746
766
745
765
744
764
743
763
742
762
741
761
740
760
V40636
V40637

C This table is continued on the next page.

3-36 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

1
MSB
15 14 13 12 11
DL06 Control Relays (C) (contd)
10 9 8 7 6 5 4 3 2 1
LSB
0
Address 2
1017
1037
1016
1036
1015
1035
1014
1034
1013
1033
1012
1032
1011
1031
1010
1030
1007
1027
1006
1026
1005
1025
1004
1024
1003
1023
1002
1022
1001
1021
1000
1020
V40640
V40641
3
1057 1056 1055 1054 1053 1052 1051 1050 1047 1046 1045 1044 1043 1042 1041 1040 V40642
1077
1117
1076
1116
1075
1115
1074
1114
1073
1113
1072
1112
1071
1111
1070
1110
1067
1107
1066
1106
1065
1105
1064
1104
1063
1103
1062
1102
1061
1101
1060
1100
V40643
V40644
4
1137
1157
1136
1156
1135
1155
1134
1154
1133
1153
1132
1152
1131
1151
1130
1150
1127
1147
1126
1146
1125
1145
1124
1144
1123
1143
1122
1142
1121
1141
1120
1140
V40645
V40646
5
1177 1176 1175 1174 1173 1172 1171 1170 1167 1166 1165 1164 1163 1162 1161 1160 V40647
6
1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V40650
1237
1257
1236
1256
1235
1255
1234
1254
1233
1253
1232
1252
1231
1251
1230
1250
1227
1247
1226
1246
1225
1245
1224
1244
1223
1243
1222
1242
1221
1241
1220
1240
V40651
V40652
7
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V40653
1317 1316 1315 1314 1313 1312 1311 1310 1307 1306 1305 1304 1303 1302 1301 1300 V40654 8
1337 1336 1335 1334 1333 1332 1331 1330 1327 1326 1325 1324 1323 1322 1321 1320 V40655
1357
1377
1356
1376
1355
1375
1354
1374
1353
1373
1352
1372
1351
1371
1350
1370
1347
1367
1346
1366
1345
1365
1344
1364
1343
1363
1342
1362
1341
1361
1340
1360
V40656
V40657
9
1417
1437
1416
1436
1415
1435
1414
1434
1413
1433
1412
1432
1411
1431
1410
1430
1407
1427
1406
1426
1405
1425
1404
1424
1403
1423
1402
1422
1401
1421
1400
1420
V40660
V40661
10
1457
1477
1456
1476
1455
1475
1454
1474
1453
1473
1452
1472
1451
1471
1450
1470
1447
1467
1446
1466
1445
1465
1444
1464
1443
1463
1442
1462
1441
1461
1440
1460
V40662
V40663
11
1517 1516 1515 1514 1513 1512 1511 1510 1507 1506 1505 1504 1503 1502 1501 1500 V40664
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V40665 12
1557 1556 1555 1554 1553 1552 1551 1550 1547 1546 1545 1544 1543 1542 1541 1540 V40666
1577 1576 1575 1574 1573 1572 1571 1570 1567 1566 1565 1564 1563 1562 1561 1560 V40667
13
1617 1616 1615 1614 1613 1612 1611 1610 1607 1606 1605 1604 1603 1602 1601 1600 V40670
1637
1657
1636
1656
1635
1655
1634
1654
1633
1653
1632
1652
1631
1651
1630
1650
1627
1647
1626
1646
1625
1645
1624
1644
1623
1643
1622
1642
1621
1641
1620
1640
V40671
V40672
14
1677 1676 1675 1674 1673 1672 1671 1670 1667 1666 1665 1664 1663 1662 1661 1660 V40673
1717 1716 1715 1714 1713 1712 1711 1710 1707 1706 1705 1704 1703 1702 1701 1700 V40674 A
1737 1736 1735 1734 1733 1732 1731 1730 1727 1726 1725 1724 1723 1722 1721 1720 V40675
1757
1777
1756
1776
1755
1775
1754
1774
1753
1773
1752
1772
1751
1771
1750
1770
1747
1767
1746
1766
1745
1765
1744
1764
1743
1763
1742
1762
1741
1761
1740
1760
V40676
V40677
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-37


Chapter 3: CPU Specifications and Operation

Timer Status Bit Map


1 This table provides a listing of individual timer contacts associated with each V-memory
address bit.
2 MSB DL06 Timer (T) Contacts LSB
Address
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3 017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V41100
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V41101
4 057
077
056
076
055
075
054
074
053
073
052
072
051
071
050
070
047
067
046
066
045
065
044
064
043
063
042
062
041
061
040
060
V41102
V41103
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V41104
5 137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V41105
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V41106
6 177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V41107

217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V41110
7 237
257
236
256
235
255
234
254
233
253
232
252
231
251
230
250
227
247
226
246
225
245
224
244
223
243
222
242
221
241
220
240
V41111
V41112

8 277
317
276
316
275
315
274
314
273
313
272
312
271
311
270
310
267
307
266
306
265
305
264
304
263
303
262
302
261
301
260
300
V41113
V41114
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V41115
9 357
377
356
376
355
375
354
374
353
373
352
372
351
371
350
370
347
367
346
366
345
365
344
364
343
363
342
362
341
361
340
360
V41116
V41117

10
11 Counter Status Bit Map
12 MSB
15 14 13 12 11 10
DL06 Counter (CT) Contacts
9 8 7 6 5 4 3 2 1
LSB
0
Address

13 017
037
016
036
015
035
014
034
013
033
012
032
011
031
010
030
007
027
006
026
005
025
004
024
003
023
002
022
001
021
000
020
V41140
V41141
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V41142
14 077
117
076
116
075
115
074
114
073
113
072
112
071
111
070
110
067
107
066
106
065
105
064
104
063
103
062
102
061
101
060
100
V41143
V41144

A 137
157
136
156
135
155
134
154
133
153
132
152
131
151
130
150
127
147
126
146
125
145
124
144
123
143
122
142
121
141
120
140
V41145
V41146
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V41147
B This table provides a listing of individual counter contacts associated with each V-memory
C address bit.

3-38 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

GX and GY I/O Bit Map


This table provides a listing of the individual global I/O points associated with each
V-memory address bit.
1
MSB DL06 GX and GY I/O Points LSB GX GY 2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Address Address
017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V40000 V40200 3
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V40001 V40201
057
077
056
076
055
075
054
074
053
073
052
072
051
071
050
070
047
067
046
066
045
065
044
064
043
063
042
062
041
061
040
060
V40002
V40003
V40202
V40203
4
117
137
116
136
115
135
114
134
113
133
112
132
111
131
110
130
107
127
106
126
105
125
104
124
103
123
102
122
101
121
100
120
V40004
V40005
V40204
V40205 5
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V40006 V40206
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40007 V40207 6
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40010 V40210
237
257
236
256
235
255
234
254
233
253
232
252
231
251
230
250
227
247
226
246
225
245
224
244
223
243
222
242
221
241
220
240
V40011
V40012
V40211
V40212
7
277
317
276
316
275
315
274
314
273
313
272
312
271
311
270
310
267
307
266
306
265
305
264
304
263
303
262
302
261
301
260
300
V40013
V40004
V40213
V40214
8
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V40015 V40215
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V40016 V40216 9
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40007 V40217
417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40020 V40220 10
437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V40021 V40221
457
477
456
476
455
475
454
474
453
473
452
472
451
471
450
470
447
467
446
466
445
465
444
464
443
463
442
462
441
461
440
460
V40022
V40023
V40222
V40223
11
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40024 V40224
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40025 V40225 12
557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40026 V40226
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40027 V40227
13
617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V40030 V40230
637
657
636
656
635
655
634
654
633
653
632
652
631
651
630
650
627
647
626
646
625
645
624
644
623
643
622
642
621
641
620
640
V40031
V40032
V40231
V40232
14
677
717
676
716
675
715
674
714
673
713
672
712
671
711
670
710
667
707
666
706
665
705
664
704
663
703
662
702
661
701
660
700
V40033
V40034
V40233
V40234 A
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V40035 V40235
757
777
756
776
755
775
754
774
753
773
752
772
751
771
750
770
747
767
746
766
745
765
744
764
743
763
742
762
741
761
740
760
V40036
V40037
V40236
V40237
B
C
This table is continued on the next page.
D
NOTE: This memory area can be used for additional Data Words.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-39


Chapter 3: CPU Specifications and Operation

1 MSB
15 14 13 12 11
DL06 GX and GY I/O Points (contd)
10 9 8 7 6 5 4 3 2 1
LSB
0
GX GY
Address Address

2 1017
1037
1016
1036
1015
1035
1014
1034
1013
1033
1012
1032
1011
1031
1010
1030
1007
1027
1006
1026
1005
1025
1004
1024
1003
1023
1002
1022
1001
1021
1000
1020
V40040
V40041
V40240
V40241
1057 1056 1055 1054 1053 1052 1051 1050 1047 1046 1045 1044 1043 1042 1041 1040 V40042 V40242
3 1077
1117
1076
1116
1075
1115
1074
1114
1073
1113
1072
1112
1071
1111
1070
1110
1067
1107
1066
1106
1065
1105
1064
1104
1063
1103
1062
1102
1061
1101
1060
1100
V40043
V40044
V40243
V40244

4 1137
1157
1136
1156
1135
1155
1134
1154
1133
1153
1132
1152
1131
1151
1130
1150
1127
1147
1126
1146
1125
1145
1124
1144
1123
1143
1122
1142
1121
1141
1120
1140
V40045
V40046
V40245
V40246
1177 1176 1175 1174 1173 1172 1171 1170 1167 1166 1165 1164 1163 1162 1161 1160 V40047 V40247
5 1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V40050 V40250
1237 1236 1235 1234 1233 1232 1231 1230 1227 1226 1225 1224 1223 1222 1221 1220 V40051 V40251

6 1257
1277
1256
1276
1255
1275
1254
1274
1253
1273
1252
1272
1251
1271
1250
1270
1247
1267
1246
1266
1245
1265
1244
1264
1243
1263
1242
1262
1241
1261
1240
1260
V40052
V40053
V40252
V40253
1317 1316 1315 1314 1313 1312 1311 1310 1307 1306 1305 1304 1303 1302 1301 1300 V40054 V40254
7 1337 1336 1335 1334 1333 1332 1331 1330 1327 1326 1325 1324 1323 1322 1321 1320 V40055 V40255
1357 1356 1355 1354 1353 1352 1351 1350 1347 1346 1345 1344 1343 1342 1341 1340 V40056 V40256
8 1377 1376 1375 1374 1373 1372 1371 1370 1367 1366 1365 1364 1363 1362 1361 1360 V40057 V40257

1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V40060 V40260
9 1437
1457
1436
1456
1435
1455
1434
1454
1433
1453
1432
1452
1431
1451
1430
1450
1427
1447
1426
1446
1425
1445
1424
1444
1423
1443
1422
1442
1421
1441
1420
1440
V40061
V40062
V40261
V40262

10 1477
1517
1476
1516
1475
1515
1474
1514
1473
1513
1472
1512
1471
1511
1470
1510
1467
1507
1466
1506
1465
1505
1464
1504
1463
1503
1462
1502
1461
1501
1460
1500
V40063
V40064
V40263
V40264
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V40065 V40265
11 1557
1577
1556
1576
1555
1575
1554
1574
1553
1573
1552
1572
1551
1571
1550
1570
1547
1567
1546
1566
1545
1565
1544
1564
1543
1563
1542
1562
1541
1561
1540
1560
V40066
V40067
V40266
V40267

12 1617
1637
1616
1636
1615
1635
1614
1634
1613
1633
1612
1632
1611
1631
1610
1630
1607
1627
1606
1626
1605
1625
1604
1624
1603
1623
1602
1622
1601
1621
1600
1620
V40070
V40071
V40270
V40271

13 1657
1677
1656
1676
1655
1675
1654
1674
1653
1673
1652
1672
1651
1671
1650
1670
1647
1667
1646
1666
1645
1665
1644
1664
1643
1663
1642
1662
1641
1661
1640
1660
V40072
V40073
V40272
V40273
1717 1716 1715 1714 1713 1712 1711 1710 1707 1706 1705 1704 1703 1702 1701 1700 V40074 V40274
14 1737 1736 1735 1734 1733 1732 1731 1730 1727 1726 1725 1724 1723 1722 1721 1720 V40075 V40275
1757 1756 1755 1754 1753 1752 1751 1750 1747 1746 1745 1744 1743 1742 1741 1740 V40076 V40276

A 1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V40077 V40277

B This table is continued on the next page.

C NOTE: This memory area can be used for additional Data Words.

3-40 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 3: CPU Specifications and Operation

MSB DL06 GX and GY I/O Points (contd) LSB GX GY


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Address Address 1
2017 2016 2015 2014 2013 2012 2011 2010 2007 2006 2005 2004 2003 2002 2001 2000 V40100 V40300
2037 2036 2035 2034 2033 2032 2031 2030 2027 2026 2025 2024 2023 2022 2021 2020 V40101 V40301 2
2057 2056 2055 2054 2053 2052 2051 2050 2047 2046 2045 2044 2043 2042 2041 2040 V40102 V40302
2077
2117
2076
2116
2075
2115
2074
2114
2073
2113
2072
2112
2071
2111
2070
2110
2067
2107
2066
2106
2065
2105
2064
2104
2063
2103
2062
2102
2061
2101
2060
2100
V40103
V40104
V40303
V40304
3
2137 2136 2135 2134 2133 2132 2131 2130 2127 2126 2125 2124 2123 2122 2121 2120 V40105 V40305
2157 2156 2155 2154 2153 2152 2151 2150 2147 2146 2145 2144 2143 2142 2141 2140 V40106 V40306 4
2177 2176 2175 2174 2173 2172 2171 2170 2167 2166 2165 2164 2163 2162 2161 2160 V40107 V40307
2217 2216 2215 2214 2213 2212 2211 2210 2207 2206 2205 2204 2203 2202 2201 2200 V40110 V40310 5
2237 2236 2235 2234 2233 2232 2231 2230 2227 2226 2225 2224 2223 2222 2221 2220 V40111 V40311
2257
2277
2256
2276
2255
2275
2254
2274
2253
2273
2252
2272
2251
2271
2250
2270
2247
2267
2246
2266
2245
2265
2244
2264
2243
2263
2242
2262
2241
2261
2240
2260
V40112
V40113
V40312
V40313
6
2317 2316 2315 2314 2313 2312 2311 2310 2307 2306 2305 2304 2303 2302 2301 2300 V40114 V40314
2337 2336 2335 2334 2333 2332 2331 2330 2327 2326 2325 2324 2323 2322 2321 2320 V40115 V40315 7
2357 2356 2355 2354 2353 2352 2351 2350 2347 2346 2345 2344 2343 2342 2341 2340 V40116 V40316
2377 2376 2375 2374 2373 2372 2371 2370 2367 2366 2365 2364 2363 2362 2361 2360 V40117 V40317 8
2417 2416 2415 2414 2413 2412 2411 2410 2407 2406 2405 2404 2403 2402 2401 2400 V40120 V40320
2437
2457
2436
2456
2435
2455
2434
2454
2433
2453
2432
2452
2431
2451
2430
2450
2427
2447
2426
2446
2425
2445
2424
2444
2423
2443
2422
2442
2421
2441
2420
2440
V40121
V40122
V40321
V40322
9
2477
2517
2476
2516
2475
2515
2474
2514
2473
2513
2472
2512
2471
2511
2470
2510
2467
2507
2466
2506
2465
2505
2464
2504
2463
2503
2462
2502
2461
2501
2460
2500
V40123
V40124
V40323
V40324 10
2537 2536 2535 2534 2533 2532 2531 2530 2527 2526 2525 2524 2523 2522 2521 2520 V40125 V40325
2557
2577
2556
2576
2555
2575
2554
2574
2553
2573
2552
2572
2551
2571
2550
2570
2547
2567
2546
2566
2545
2565
2544
2564
2543
2563
2542
2562
2541
2561
2540
2560
V40126
V40127
V40326
V40327
11
2617
2637
2616
2636
2615
2635
2614
2634
2613
2633
2612
2632
2611
2631
2610
2630
2607
2627
2606
2626
2605
2625
2604
2624
2603
2623
2602
2622
2601
2621
2600
2620
V40130
V40131
V40330
V40331
12
2657 2656 2655 2654 2653 2652 2651 2650 2647 2646 2645 2644 2643 2642 2641 2640 V40132 V40332
2677 2676 2675 2674 2673 2672 2671 2670 2667 2666 2665 2664 2663 2662 2661 2660 V40133 V40333 13
2717 2716 2715 2714 2713 2712 2711 2710 2707 2706 2705 2704 2703 2702 2701 2700 V40134 V40334
2737
2757
2736
2756
2735
2755
2734
2754
2733
2753
2732
2752
2731
2751
2730
2750
2727
2747
2726
2736
2725
2735
2724
2734
2723
2733
2722
2732
2721
2731
2720
2730
V40135
V40136
V40335
V40336
14
2777 2776 2775 2774 2773 2772 2771 2770 2767 2766 2765 2764 2763 2762 2761 2760 V40137 V40337
A
This table is continued on the next page.
B
NOTE: This memory area can be used for additional Data Words. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 3-41


Chapter 3: CPU Specifications and Operation

MSB DL06 GX and GY I/O Points (contd) LSB GX GY


1 15
3017
14
3016
13
3015
12
3014
11
3013
10
3012
9
3011
8
3010
7
3007
6
3006
5
3005
4
3004
3
3003
2
3002
1
3001
0
3000
Address Address
V40140 V40340

2 3037
3057
3036
3056
3035
3055
3034
3054
3033
3053
3032
3052
3031
3051
3030
3050
3027
3047
3026
3046
3025
3045
3024
3044
3023
3043
3022
3042
3021
3041
3020
3040
V40141
V40142
V40341
V40342
3077 3076 3075 3074 3073 3072 3071 3070 3067 3066 3065 3064 3063 3062 3061 3060 V40143 V40343
3 3117 3116 3115 3114 3113 3112 3111 3110 3107 3106 3105 3104 3103 3102 3101 3100 V40144 V40344
3137 3136 3135 3134 3133 3132 3131 3130 3127 3126 3125 3124 3123 3122 3121 3120 V40145 V40345

4 3157
3177
3156
3176
3155
3175
3154
3174
3153
3173
3152
3172
3151
3171
3150
3170
3147
3167
3146
3166
3145
3165
3144
3164
3143
3163
3142
3162
3141
3161
3140
3160
V40146
V40147
V40346
V40347

5 3217
3237
3216
3236
3215
3235
3214
3234
3213
3233
3212
3232
3211
3231
3210
3230
3207
3227
3206
3226
3205
3225
3204
3224
3203
3223
3202
3222
3201
3221
3200
3220
V40150
V40151
V40350
V40351
3257 3256 3255 3254 3253 3252 3251 3250 3247 3246 3245 3244 3243 3242 3241 3240 V40152 V40352
6 3277 3276 3275 3274 3273 3272 3271 3270 3267 3266 3265 3264 3263 3262 3261 3260 V40153 V40353
3317 3316 3315 3314 3313 3312 3311 3310 3307 3306 3305 3304 3303 3302 3301 3300 V40154 V40354
7 3337
3357
3336
3356
3335
3355
3334
3354
3333
3353
3332
3352
3331
3351
3330
3350
3327
3347
3326
3346
3325
3345
3324
3344
3323
3343
3322
3342
3321
3341
3320
3340
V40155
V40156
V40355
V40356

8 3377

3417
3376

3416
3375

3415
3374

3414
3373

3413
3372

3412
3371

3411
3370

3410
3367

3407
3366

3406
3365

3405
3364

3404
3363

3403
3362

3402
3361

3401
3360

3400
V40157

V40160
V40357

V40360

9 3437
3457
3436
3456
3435
3455
3434
3454
3433
3453
3432
3452
3431
3451
3430
3450
3427
3447
3426
3446
3425
3445
3424
3444
3423
3443
3422
3442
3421
3441
3420
3440
V40161
V40162
V40361
V40362
3477 3476 3475 3474 3473 3472 3471 3470 3467 3466 3465 3464 3463 3462 3461 3460 V40163 V40363
10 3517 3516 3515 3514 3513 3512 3511 3510 3507 3506 3505 3504 3503 3502 3501 3500 V40164 V40364
3537 3536 3535 3534 3533 3532 3531 3530 3527 3526 3525 3524 3523 3522 3521 3520 V40165 V40365

11 3557
3577
3556
3576
3555
3575
3554
3574
3553
3573
3552
3572
3551
3571
3550
3570
3547
3567
3546
3566
3545
3565
3544
3564
3543
3563
3542
3562
3541
3561
3540
3560
V40166
V40167
V40366
V40367

12 3617 3616 3615 3614 3613 3612 3611 3610 3607 3606 3605 3604 3603 3602 3601 3600 V40170 V40370
3637 3636 3635 3634 3633 3632 3631 3630 3627 3626 3625 3624 3623 3622 3621 3620 V40171 V40371

13 3657
3677
3656
3676
3655
3675
3654
3674
3653
3673
3652
3672
3651
3671
3650
3670
3647
3667
3646
3666
3645
3665
3644
3664
3643
3663
3642
3662
3641
3661
3640
3660
V40172
V40173
V40372
V40373
3717 3716 3715 3714 3713 3712 3711 3710 3707 3706 3705 3704 3703 3702 3701 3700 V40174 V40374
14 3737 3736 3735 3734 3733 3732 3731 3730 3727 3726 3725 3724 3723 3722 3721 3720 V40175 V40375
3757 3756 3755 3754 3753 3752 3751 3750 3747 3746 3745 3744 3743 3742 3741 3740 V40176 V40376

A 3777 3776 3775 3774 3773 3772 3771 3770 3767 3766 3765 3764 3763 3762 3761 3760 V40177 V40377

NOTE: This memory area can be used for additional Data Words.
B
C
D

3-42 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


System design Chapter
4
and
configuration

In This Chapter
DL06 System Design Strategies......................................................... 42
Module Placement............................................................................ 43
Power Budgeting.............................................................................. 45
Configuring the DL06s Comm Ports................................................ 47
Connecting to MODBUS and DirectNET Networks............................ 49
NonSequence Protocol (ASCII In/Out and PRINT)......................... 411
Network Slave Operation................................................................ 412
Network Master Operation............................................................. 418
Network Master Operation (using MRX and MWX Instructions)..... 422
Chapter 4: System Design and Configuration

DL06 System Design Strategies


1 I/O System Configurations
The DL06 PLCs offer a number of different I/O configurations. Choose the configuration
2 that is right for your application, and keep in mind that the DL06 PLCs offer the ability to
add I/O with the use of option cards. Although remote I/O isnt available, there are many
option cards available. For instance:
3 Various A/C and D/C I/O modules
Combination I/O modules
4 Analog I/O modules
Combination Analog I/O modules
5 A DL06 system can be developed using several different arrangements using the option
modules. See our DL05/06 Options Modules User Manual (D0-OPTIONS-M) on the
6 website, www.automationdirect.com for detailed selection information.

Networking Configurations
7 The DL06 PLCs offers the following ways to add networking:
Ethernet Communications Module s connects a DL06 to high-speed peer-to-peer networks. Any
8 PLCcan initiate communications with any other PLC or operator interfaces, such as C-more, when
using the ECOM modules.
9 Data Communications Modules s connects a DL06 to devices using either DeviceNet or Profibus
to link to master controllers, as well as a D0-DCM.

10 Communications Port 1 s The DL06 has a 6-pin RJ12 connector on Port 1 that supports (as
slave) K-sequence, MODBUS RTU or DirectNET protocols.
Communications Port 2 s The DL06 has a 15-pin connector on Port 2 that supports either
11 master/slave MODBUS RTU or DirectNET protocols, or K-sequence protocol as slave. (MRX
and MWX instructions allow you to enter native MODBUS addressing in your ladder program
12 with no need to perform octal to decimal conversions). Port 2 can also be used for ASCII IN/OUT
communictions.

13
14
A
B
C
D

42 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

Module Placement
Slot Numbering 1
The DL06 has four slots, which are numbered as follows:
2
3
4
5
6
7
8
9
10
Slot 1

Slot 2 11
Slot 3
12
Slot 4

13
14
A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 43


Chapter 4: System Design and Configuration
Automatic I/O Configuration
The DL06 CPUs automatically detect any installed I/O modules (including specialty
modules) at powerup, and establish the correct I/O configuration and addresses. This applies
1 to modules located in the local base. For most applications, you will never have to change the
configuration.
2 I/O addresses use octal numbering, starting at X100 and Y100 in the slot next to the CPU.
The addresses are assigned in groups of 8, or 16 depending on the number of points for
3 the I/O module. The discrete input and output modules can be mixed in any order. The
following diagram shows the I/O numbering convention for an example system. Both
the Handheld Programmer and DirectSOFT 5 provide AUX functions that allow you
4 to automatically configure the I/O. For example, with the Handheld Programmer AUX
46 executes an automatic configuration, which allows the CPU to examine the installed
5 modules and determine the I/O configuration and addressing.With DirectSOFT 5, the PLC
Configure I/O menu option would be used.

6
7
8
9
10 Slot 1 Slot 2 Slot 3 Slot 4
Automatic 8pt. Input 16pt. Output 16pt. Input 8pt. Input
11 X100X107 Y100Y117 X110X127 X130X137

12 Manual Slot 1 Slot 2 Slot 3


8pt. Input 16pt. Output 16pt. Input
X100X107 Y100Y117 X200X217
Slot 4
8pt. Input
X120X127

13 Manual I/O Configuration


It may never become necessary, but DL06 CPUs allow manual I/O address assignments
14 for any I/O slot(s) . You can manually modify an auto configuration to match arbitrary
I/O numbering. For example, two adjacent input modules can have starting addresses at
A X100 and X200.Use DirectSOFT 5 PLC Configure I/O menu option to assign manual
I/O address. In automatic configuration, the addresses are assigned on 8-point boundaries.
Manual configuration, however, assumes that all modules are at least 16 points, so you can
B only assign addresses that are a multiple of 20 (octal). You can still use 8 point modules, but
16 addresses will be assigned and the upper eight addresses will be unused.
C WARNING: If you manually configure an I/O slot, the I/O addressing for the other modules
may change. This is because the DL06 CPUs do not allow you to assign duplicate I/O addresses.
D You must always correct any I/O configuration errors before you place the CPU in RUN mode.
Uncorrected errors can cause unpredictable machine operation that can result in a risk of personal
injury or damage to equipment.

44 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

Power Budgeting
The DL06 has four option card slots. To determine whether the combination of cards you
select will have sufficient power, you will need to perform a power budget calculation.
1
Power supplied 2
Power is supplied from two sources, the internal base unit power supply and, if required, an
external supply (customer furnished). The D0-06xx (AC powered) PLCs supply a limited 3
amount of 24VDC power. The 24VDC output can be used to power external devices.
For power budgeting, start by considering the power supplied by the base unit. All DL06
PLCs supply the same amount of 5VDC power. Only the AC units offer 24VDC auxiliary
4
power. Be aware of the trade-off between 5VDC power and 24VDC power. The amount
of 5VDC power available depends on the amount of 24VDC power being used, and the 5
amount of 24VDC power available depends on the amount of 5VDC power consumed.
Determine the amount of internally supplied power from the table on the following page. 6
Power required by base unit
Because of the different I/O configurations available in the DL06 family, the power 7
consumed by the base unit itself varies from model to model. Subtract the amount of power
required by the base unit from the amount of power supplied by the base unit. Be sure to 8
subtract 5VDC and 24VDC amounts.

Power required by option cards 9


Next, subtract the amount of power required by the option cards you are planning to use.
Again, remember to subtract both 5VDC and 24VDC. If your power budget analysis shows 10
surplus power available, you should have a workable configuration.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 45


Chapter 4: System Design and Configuration

DL06 Power Supplied by Base Units DL06 Power Consumed


Part Number 5 VDC (mA) 24 VDC (mA) by Option Cards

1 D0-06xx
<1500mA
<2000mA
300mA
200mA
Part Number
D0-07CDR
5 VDC (mA)
130mA
24 VDC (mA)
none
D0-06xx-D 1500mA none D0-08CDD1 100mA none
2 If the 5VDC loading is less than 2000mA, but more than
D0-08TR 280mA none
D0-10ND3 35mA none
1500mA, then available 24VDC supply current is 200mA.
3 If the 5VDC loading is less than 1500mA, then the
available 24VDC current is 300mA.
D0-10ND3F
D0-10TD1
35mA
150mA
none
none
D0-10TD2 150mA none
4 DL06 Base Unit Power Required D0-16ND3 35mA none
D0-16TD1 200mA none
Part Number 5 VDC (mA) 24 VDC (mA)
5 D0-06AA 800mA none
D0-16TD2
D0-DCM
200mA
250mA
none
none
D0-06AR 900mA none
D0-DEVNETS 45mA none
6 D0-06DA
D0-06DD1
800mA
600mA
none
280mA, note 1
F0-04TRS 250mA none
F0-08NA-1 5mA none
D0-06DD2
7 D0-06DR
600mA
950mA
none
none
F0-04AD-1
F0-04AD-2
50mA
75mA
none
none
D0-06DD1-D 600mA 280mA, note 1
F0-04DAH-1 25mA 150mA
8 D0-06DD2-D
D0-06DR-D
600mA
950mA
none
none
F0-04DAH-2 25mA 30mA
F0-08ADH-1 25mA 25mA

9 Power Budgeting Example


F0-08ADH-2
F0-08DAH-1
25mA
25mA
25mA
220mA
5VDC 24VDC
Power Source F0-08DAH-2 25mA 30mA
10 D0-06DD1 A
power (mA) power (mA)
1500mA 300mA
F0-2AD2DA-2 50mA 30mA
(select row F0-4AD2DA-1 100mA 40mA
11 A or row B) B 2000mA
5VDC
200mA
24VDC
F0-4AD2DA-2
F0-04RTD
100mA
70mA
none
none
Current Required F0-04THM 30mA none
12 D0-06DD1
power (mA) power (mA)
600mA 280mA, note 1 F0-CP128 150mA none
D0-16ND3 35mA 0 H0-CTRIO(2) 250mA none

13 D0-10TD1
D0-08TR
150mA
280mA
0
0
H0-ECOM
H0-ECOM100
250mA
300mA
none
none
H0-PSCM 530mA none
14 F0-4AD2DA-2
D0-06LCD
100mA
50mA
0
0
Total Used 1215mA 280mA DL06 Power Consumed by Other Devices
A Remaining
A
B
285mA
785mA
20mA
note 2
Part Number
D0-06LCD
5 VDC (mA)
50mA
24 VDC (mA)
none

B NOTE: See the DL05/DL06 OPTIONS


D2-HPP
DV-1000
200mA
150mA
none
none
manual for the module data for your project. EA1-S3ML 210mA none
C EA1-S3MLW 210mA none

D NOTE 1: Auxiliary 24VDC used to power V+ terminal of D0-06DD1/-D sinking outputs.


NOTE 2: If the PLCs auxiliary 24VDC power source is used to power the sinking outputs, use power
choice A, above.

46 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

Configuring the DL06s Comm Ports


This section describes how to configure the CPUs built-in networking ports for either
MODBUS or DirectNET. This will allow you to connect the DL06 PLC system directly to 1
MODBUS networks using the RTU protocol, or to other devices on a DirectNET network.
MODBUS masters on the network must be capable of issuing the MODBUS commands
to read or write the appropriate data. For details on the MODBUS protocol, please refer
2
to the Gould MODBUS Protocol reference Guide (P1MBUS300 Rev. B). In the event
a more recent version is available, check with your MODBUS supplier before ordering the 3
documentation. For more details on DirectNET, order our DirectNET manual, part number
DADNETM. 4
NOTE: For information about the MODBUS protocol see the Group Schneider Web site at: www.
schneiderautomation.com. At the main menu, select Support/Services, Modbus, Modbus Technical Manuals, 5
PI-MBUS-300 Modbus Protocol Reference Guide or search for PIMBUS300. For more information about
the DirectNET protocol, order our DirectNET user manual, part number DADNETM, or download it
free from our Web site: www.automationdirect.com. Select Documentation/Misc./DA-DNET-M.
6
DL06 Port Specifications
Communications Port 2 7
Connects to HPP, DirectSOFT 5, operator
Communications Port 1
Connects to HPP, DirectSOFT 5, operator
interfaces, etc.
15-pin, multifunction port, RS232C, RS422, RS485
8
interfaces, etc. Communication speed (baud): 300, 600, 1200,
6-pin, RS232C
Communication speed (baud): 9600 (fixed)
2400, 4800, 9600, 19200, 38400
Parity: odd (default), even, none
9
Parity: odd (fixed)
Port 2 Station Address: 1 (default)
Port 1 Station Address: 1 (fixed) 8 data bits 10
8 data bits 1 start, 1 stop bit
1 start, 1 stop bit
Asynchronous, half-duplex, DTE
Asynchronous, half-duplex, DTE
Protocol (auto-select): K-sequence (slave only),
11
Protocol (auto-select): K-sequence (slave only), DirectNET (master/slave), MODBUS (master/slave),
DirectNET (slave only), MODBUS (slave only) non-sequence/print/ASCII in/out
12
Port 2 Pin Descriptions
DL06 Port Pinouts 1 5V Power (+) connection 13
2 TXD Transmit data (RS-232C)

TERM
3 RXD
4 RTS
Receive data (RS-232C)
Ready to send (RS-232C)
14
Port 1 Pin Descriptions
PORT1 PORT2 RUN
R STOP 1
2
0V
5V
Power (-) connection (GND)
Power (+) connection
5 CTS
6 RXD-
Clear to send (RS232C)
Receive data (-) (RS-422/485) A
7 0V Power (-) connection (GND)
3
4
RXD
TXD
Receive data (RS-232C)
Transmit data (RS-232C)
8 0V
9 TXD+
Power (-) connection (GND)
Transmit data (+) (RS-422/485)
B
5 5V Power (+) connection
10 TXD- Transmit data (-) (RS-422/485)
C
5 4 3 2
6 1 5 1 6 0V Power (-) connection (GND)
10 6 11 RTS+ Ready to send (+) (RS-422/485)
15 11
12 RTS- Ready to send (-) (RS-422/485)
PORT1 PORT2 13 RXD+
14 CTS+
Receive data (+) (RS-422/485)
Clear to send (+) (RS-422/485)
D
15 CTS- Clear to send (-) (RS-422/485)

DL06 Micro PLC User Manual; 3rd Edition Rev. D 47


Chapter 4: System Design and Configuration

Choosing a Network Specification


The DL06 PLCs multi-function port gives you the option of using RS-232C, RS-422, or
1 RS-485 specifications. First, determine whether the network will be a 2-wire RS232C type,
a 4-wire RS422 type, or a 2-wire/4-wire RS-485 type.
The RS232C specification is simple to implement for networks of shorter distances (15
2 meters max) and where communication is only required between two devices. The RS422
and RS-485 signals are for networks that cover longer distances (1000 meters max.) and for
3 multi-drop networks (from 2 to 247 devices).

NOTE: Termination resistors are required at both ends of RS422 and RS-485 networks. It is necessary to
4 select resistors that match the impedance rating of the cable (between 100 and 500 ohms).

5 RS-232 Network

6
Point-to-point

11
1
DTE Device Signal GND
Normally, the RS-232 GND

6
RXD
1 0V Signal GND
TXD
signals are used for 3 RXD RXD
TXD
4 TXD TXD
RXD
shorter distances (15 CTS
RTS
meters maximum),
7 PORT1 RTS

10

15
6P6C CTS
for communications

5
Phone Jack
RTS
between two devices. OR

8
Loop
Connections on Port 1 Connections on Port 2 Back CTS

RS-422 Network
9 RS-422 signals are for RXD+
RXD
long distances ( 1000 TXD+

10 meters maximum). Use


terminator resistors at both
TXD
Signal GND
9 TXD+ Termination
10 TXD Resistor at

11 ends of RS-422 network


wiring, matching the
The recommended cable for RS422 is
AutomationDirect L19772 (Belden 8102)
or equivalent.
13 RXD+
6 RXD
11 RTS+
12 RTS
both ends of
network

PORT 2
impedence rating of the 14 CTS+

12 cable (between 100 and


15 CTS
7 0V
Master

500 ohms).
13 Termination
RS-485 Network Resistor

14
TXD+ / RXD+ TXD+ / RXD+
TXD+ / RXD+

RS-485 signals are for TXD / RXD TXD / RXD TXD / RXD
longer distances (1000
A meters max) and for
multi-drop networks.
Signal GND

RXD
Signal GND
Connect shield
to signal ground
Signal GND

RXD
Use termination resistors
B
6
6

11

11

at both ends of RS-485


1

0V
network wiring, matching RTS+ 0V RTS+

C the impedance rating of


the cable (between 100
TXD+ RXD+

CTS+
RTS TXD+
RXD+

CTS+
RTS

The recommended cable for

D and 500 ohms). RS422 is AutomationDirect L19954


CTS (Belden 9842) or equivalent. CTS
10

10

15
15
5

TXD TXD
DL06 CPU Port 2 DL06 CPU Port 2

48 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

Connecting to MODBUS and DirectNET Networks


MODBUS Port Configuration 1
In DirectSOFT 5, choose the PLC menu, then Setup, then Secondary Comm Port.
Port: From the port number list box at the top, choose Port 2. 2
Protocol: Check the box to the left of MODBUS (use AUX 56 on the HPP, and select
MBUS), and then youll see the box below. 3
4
5
6
7
8
9
T
 imeout: amount of time the port will wait after it sends a message to get a response before logging
an error. 10
RTS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send
the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the
DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a 11
multi-drop network, the RTS ON Delay time must be set to 5ms or more and the RTS OFF Delay time
must be set to 2ms or more. If you encounter problems, the time can be increased. 12
Station Number: For making the CPU port a MODBUS master, choose 1. The possible range
for MODBUS slave numbers is from 1 to 247, but the DL06 network instructions used in Master
mode will access only slaves 1 to 99. Each slave must have a unique number. At powerup, the port 13
is automatically a slave, unless and until the DL06 executes ladder logic network instructions which
use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the
port again.
14
B
 aud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400
baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors A
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value. Refer to the appropriate product manual for details.
Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
B
Parity: Choose none, even, or odd parity for error checking. C
Echo Suppression: Select the appropriate wiring configuration used on Port 2.
Then click the button indicated to send the Port configuration to the CPU, and click
Close.
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 49


Chapter 4: System Design and Configuration

DirectNET Port Configuration


In DirectSOFT 5, choose the PLC menu, then Setup, then Secondary Comm Port.
1 Port: From the port number list box, choose Port 2 .
Protocol: Check the box to the left of DirectNET (use AUX 56 on the HPP, then select
2 DNET), and then youll see the dialog below.

3
4
5
6
7
8
T
 imeout: Amount of time the port will wait after it sends a message to get a response before logging
9 an error.
R
 TS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send
10 the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the
DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a
multi-drop network, the RTS ON Delay time must be set to 5ms or more and the RTS OFF Delay time
11 must be set to 2ms or more. If you encounter problems, the time can be increased.
S
 tation Number: For making the CPU port a DirectNET master, choose 1. The allowable range
12 for DirectNET slaves is from 1 to 90 (each slave must have a unique number). At powerup, the port
is automatically a slave, unless and until the DL06 executes ladder logic instructions which attempt
to use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the
13 port again.
B
 aud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400
14 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value.
A Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
Parity: Choose none, even, or odd parity for error checking.
B Format: Choose between hex or ASCII formats.
Then click the button indicated to send the Port configuration to the CPU, and click
C Close.

410 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

NonSequence Protocol (ASCII In/Out and PRINT)


Non-Sequence Port Configuration
Configuring port 2 on the DL06 for NonSequence allows the CPU to use port 2 to
1
either read or write raw ASCII strings using the ASCII instructions. See the ASCII In/Out
instructions and the PRINT instruction in chapter 5. 2
In DirectSOFT 5, choose the PLC menu, then Setup, then Secondary Comm Port.
Port: From the port number list box at the top, choose Port 2. 3
Protocol: Check the box to the left of NonSequence.
Timeout: Amount of time the port will wait after it sends a 4
message to get a response before logging an error.
R
 TS On Delay Time: The amount of time between raising
the RTS line and sending the data.
5
R
 TS Off Delay Time: The amount of time between resetting
the RTS line after sending the data.
6
D
 ata Bits: Select either 7bits or 8bits to match the number
of data bits specified for the connected devices. 7
B
 aud Rate: The available baud rates include 300,
600, 900, 2400, 4800, 9600, 19200, and 38400
baud. Choose a higher baud rate initially, reverting to
8
lower baud rates if you experience data errors or noise
problems on the network. Important: You must configure the 9
baud rates of all devices on the network to the same value.
Refer to the appropriate product manual for details.
S
 top Bits: Choose 1 or 2 stop bits to match the number of stop bits specified for the connected
10
devices.
P
 arity: Choose none, even, or odd parity for error checking. Be sure to match the parity specified 11
for the connected devices.
E
 cho Suppression: Select the appropriate radio button based on the wiring configuration used on 12
port 2.
X
 on/Xoff Flow Control: Choose this selection if you have Port 2 wired for Hardware Flow Control
(Xon/Xoff) with RTS and CTS signal connected between all devices.
13
RTS Flow Control: Choose this selection if you have Port 2 RTS signal wired between all devices.
Click the button indicated to send the port configuration to the CPU, and click Close.
14
M
 emory Address: Please choose a memory address with 64 words of contiguous free memory for
use by Non-Sequence Protocol. A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 411


Chapter 4: System Design and Configuration

Network Slave Operation


1 This section describes how other devices on a network can communicate with a CPU port
that you have configured as a DirectNET slave or MODBUS slave (DL06). A MODBUS
2 host must use the MODBUS RTU protocol to communicate with the DL06 as a slave. The
host software must send a MODBUS function code and MODBUS address to specify a PLC
memory location the DL06 comprehends. The DirectNET host uses normal I/O addresses to
3 access applicable DL06 CPU and system. No CPU ladder logic is required to support either
MODBUS slave or DirectNET slave operation.
4 NOTE: For more intformation on DirectNET proprietary protocol, see the DirectNET reference
manual, DA-DNET-M, available on our website.
5
MODBUS Function Codes Supported
6 MODBUS Function Code Function DL06 Data Types Available
01 Read a group of coils Y, CR, T, CT
7 02
05
Read a group of inputs
Set / Reset a single coil
X, SP
Y, CR, T, CT

8 15
03, 04
Set / Reset a group of coils Y,
Read a value from one or more registers
CR, T, CT
V
06 Write a value into a single register V
9 16 Write a value into a group of registers V

10 The MODBUS function code determines whether the access is a read or a write, and whether
to access a single data point or a group of them. The DL06 supports the MODBUS function
11 codes described below.

Determining the MODBUS Address


12 There are typically two ways that most host software conventions allow you to specify a PLC
memory location. These are:
13 By specifying the MODBUS data type and address
By specifying a MODBUS address only
14
A
B
C
D

412 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

If Your Host Software Requires the Data Type and Address


Many host software packages allow you to specify the MODBUS data type and the
MODBUS address that corresponds to the PLC memory location. This is the easiest method, 1
but not all packages allow you to do it this way.
The actual equation used to calculate the address depends on the type of PLC data you are 2
using. The PLC memory types are split into two categories for this purpose.
Discrete X, SP, Y, CR, S, T, C (contacts) 3
Word V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the appropriate
MODBUS address (if required). The table below shows the exact equation used for each
4
group of data.
5
DL06 Memory Type
QTY PLC Range MODBUS Address
Range MODBUS Data Type
6
(Decimal) (Octal) (Decimal)
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type 7
Inputs (X) 512 X0 X777 2048 2559 Input
Special Relays(SP)
Outputs (Y)
512
512
SP0 SP777
Y0 Y777
3072 3583
2048 2559
Input
Coil
8
Control Relays (CR)
Timer Contacts (T)
1024
256
C0 C1777
T0 T377
3072 4095
6144 6399
Coil
Coil 9
Counter Contacts (CT) 128 CT0 CT177 6400 6527 Coil
Stage Status Bits(S) 1024 S0 S1777 5120 6143 Coil 10
For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V)
Counter Current Values (V)
256
128
V0 V377
V1000 V1177
0 255
512 639
Input Register
Input Register
11
3200 V1200 V7377 640 3839 Holding Register
V-Memory, user data (V)
4096 V10000 - V17777 4096 - 8191 Holding Register 12
V-Memory, non-volatile (V) 128 V7400 V7577 3840 3967 Holding Register
13
14
A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 413


Chapter 4: System Design and Configuration

The following examples show how to generate the MODBUS address and data type for hosts
which require this format.
1 Example 1: V2100
2 Find the MODBUS address for User V location V2100.
1. Find V-memory in the table.
Holding Reg 1088

3 2. Convert V2100 into decimal (1088).


3. Use the MODBUS data type from the table.

4 V-memory, user data (V) 3200 V1200 V7377 640 3839 Holding Register

5 Example 2: Y20
Find the MODBUS address for output Y20.
6 1. Find Y outputs in the table.
Coil 2064

2. Convert Y20 into decimal (16).


7 3. Add the starting address for the range (2048).
4. Use the MODBUS data type from the table.
8 Outputs (V) 256 Y0 Y377 2048 - 2303 Coil

9
Example 3: T10 Current Value
10 Find the MODBUS address to obtain the current value from Timer T10.
Input Reg. 8
1. Find Timer Current Values in the table.
11 2. Convert T10 into decimal (8).
3. Use the MODBUS data type from the table.
12 Timer Current Values (V) 128 V0 V177 0 - 127 Input Register

Example 4: C54
13 Find the MODBUS address for Control Relay C54.
1. Find Control Relays in the table.
14 2. Convert C54 into decimal (44).
Coil 3116

3. Add the starting address for the range (3072).


A 4. Use the MODBUS data type from the table.

B Control Relays (CR) 512 C0 C77 3072 3583 Coil

C
D

414 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

If Your MODBUS Host Software Requires an Address ONLY


Some host software does not allow you to specify the MODBUS data type and address.
Instead, you specify an address only. This method requires another step to determine the 1
address, but its still fairly simple. Basically, MODBUS also separates the data types by
address ranges as well. So this means an address alone can actually describe the type of
data and location. This is often referred to as adding the offset. One important thing to
2
remember here is that two different addressing modes may be available in your host software
package. These are: 3
484 Mode
584/984 Mode 4
We recommend that you use the 584/984 addressing mode if your host software allows
you to choose. This is because the 584/984 mode allows access to a higher number of 5
memory locations within each data type. If your software only supports 484 mode, then there
may be some PLC memory locations that will be unavailable. The actual equation used to
calculate the address depends on the type of PLC data you are using. The PLC memory types
6
are split into two categories for this purpose.
Discrete X, SP, Y, CR, S, T (contacts), C (contacts) 7
Word V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the appropriate
8
MODBUS addresses (as required). The table below shows the exact equation used for each
group of data. 9
Discrete Data Types
PLC Range Address (484 Address (584/984 MODBUS Data
10
DL06 Memory Type Mode)
Global Inputs (GX)
(Octal)
GX0-GX1746
Mode)
1001 - 1999 10001 - 10999
Type
Input 11
GX1747-GX3777 --- 11000 - 12048 Input
Inputs (X)
Special Relays (SP)
X0 X1777
SP0 SP777
---
---
12049 - 13072
13073 - 13584
Input
Input
12
Global Outputs (GY)
Outputs (Y)
GY0 - GY3777
Y0 Y1777
1 - 2048
2049 - 3072
1 - 2048
2049 - 3072
Output
Output 13
Control Relays (CR) C0 C3777 3073 - 5120 3073 - 5120 Output
Timer Contacts (T)
Counter Contacts (CT)
T0 T377
CT0 CT377
6145 - 6400
6401 - 6656
6145 - 6400
6401 - 6656
Output
Output
14
Stage Status Bits (S) S0 S1777 5121 - 6144 5121 - 6144 Output
A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 415


Chapter 4: System Design and Configuration

Example 1: V2100 584/984 Mode


Word Data Types
1 Registers PLC Range Input/Holding
(Octal)
Input/Holding
(484 Mode)* (584/984 Mode)*
V-memory (Timers) V0 - V377 3001/4001 30001/40001
2 V-memory (Counters) V1000 - V1177 3513/4513 30513/40513
V1200 - V1377 3641/4641 30641/40641
3 V-memory (Data Words)
V1400 - V1746
V1747 - V1777
3769/4769
---
30769/40769
31000/41000
V2000 - V7377 --- 41025
4 V10000 - V17777 --- 44097
*MODBUS: Function 04
5 1. Refer to your PLC user manual for the correct memory mapping size of your PLC. Some of
the addresses shown above might not pertain to your particular CPU.
6
2. For an automated MODBUS/Koyo address conversion utility, go to our
7 website, www.automationdirect.com, and down load download the EXCEL file
modbus_conversion.xls located at: Tech Support > Technical Support Home page.
8
Example 1: V2100 584/984 Mode
9 Find the MODBUS address for User V location V2100. PLC Address (Dec.) + Mode Address
1. Find V-memory in the table. V2100 = 1088 decimal
10 2. Convert V2100 into decimal (1088). 1088 + 40001 = 41089
3. Add the MODBUS starting address for the
11 mode (40001).

12 Example 2: Y20 584/984 Mode


For Word Data Types.... PLC Address (Dec.) + Appropriate Mode Address
13 Timer Current Values (V) 128 V0 V177 0 127 3001 30001 Input Register
Counter Current Values (V) 128 V1200 V7377 640 3839 3001 30001 Input Register
14 V-memory, user data (V) 1024 V2000 V3777 1024 2047 4001 40001 Holding Register

A Find the MODBUS address for output Y20. PLC Addr. (Dec.) + Start Address + Mode
1. Find Y outputs in the table. Y20 = 16 decimal
B 2. Convert Y20 into decimal (16). 16 + 2048 + 1 = 2065

C 3. Add the starting address for the range (2048).


4. Add the MODBUS address for the mode (1).

D Outputs (Y)
Control Relays (CR)
320
256
Y0 - Y477
C0 - C377
2048 2367
3072 3551
1
1
1
1
Coil
Coil
Timer Contacts (T) 128 T0 - T177 6144 6271 1 1 Coil

416 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration
Example 3: T10 Current Value 484 Mode
Find the MODBUS address to obtain the PLC Address (Dec.) + Mode Address
current value from Timer T10. TA10 = 8 decimal
1. Find Timer Current Values in the table.
=
8 + 3001 3009 1
2. Convert T10 into decimal (8).
3. Add the MODBUS starting address for the mode (3001).
2
For Word Data Types.... PLC Address (Dec.) + Appropriate Mode Address 3
Timer Current Values (V) 128 V0 V177 0 127 3001 30001 Input Register
Counter Current Values (V) 128 V1200 V7377 512 639 3001 30001 Input Register 4
V-memory, user data (V) 1024 V2000 V3777 1024 2047 4001 40001 Holding Register

5
Example 4: C54 584/984 Mode
Find the MODBUS address for Control Relay C54. PLC Addr. (Dec.) + Start Address + Mode 6
1. Find Control Relays in the table. C54 = 44 decimal
2. Convert C54 into decimal (44). 44 + 3072 + 1 3117
7
=
3. Add the starting address for the range (3072). 8
4. Add the MODBUS address for the mode (1).
Outputs (Y) 320 Y0 Y477 2048 2367 1 1 Coil 9
Control Relays (CR) 256 C0 C377 3072 3551 1 1 Coil
Timer Contacts (T) 128 T0 T177 6144 6271 1 1 Coil 10
Network Master Operation 11
This section describes how the DL06 can communicate on a MODBUS or DirectNET
network as a master. For MODBUS networks, it uses the MODBUS RTU protocol, which 12
must be interpreted by all the slaves on the network. Both MODBUS and DirectNet are
single master/multiple slave networks. The master is the only member of the network that can
initiate requests on the network. This section teaches you how to design the required ladder
13
logic for network master operation.
14
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
A
LOGIC

C0
X0
X1
06
K oyo

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.

PORT1 PORT2
TERM

RUN STOP
B
Master
MODBUS RTU Protocol,, or DirectNET
C
D
Slave #1 Slave #2 Slave #3

DL06 Micro PLC User Manual; 3rd Edition Rev. D 417


Chapter 4: System Design and Configuration

When using the DL06 PLC as the master station, simple RLL instructions are used to initiate
the requests. The WX instruction initiates network write operations, and the RX instruction
1 initiates network read operations. Before executing either the WX or RX commands, we will
need to load data related to the read or write operation onto the CPUs accumulator stack.
2 When the WX or RX instruction executes, it uses the information on the stack combined with
data in the instruction box to completely define the task, which goes to the port.

3 OUTPUT: 6-240V
Y
0 1 2
G

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

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
TX2

4
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
K oyo

5
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

PORT1 PORT2 RUN STOP

Master
6 WX (write)
Network

7 RX (read)

Slave

8
The following step-by-step procedure will provide you the information necessary to set up
9 your ladder program to receive data from a network slave.

10 Step 1: Identify Master Port # and Slave #


The first Load (LD) instruction identifies the
F 2 0 1

11 communications port number on the network


master (DL06) and the address of the slave Slave address (BCD)
station. This instruction can address up to 99 Port number (BCD)
12 MODBUS slaves, or 90 DirectNET slaves. Internal port (hex)
The format of the word is shown to the right.
13 The F2 in the upper byte indicates the use of
the right port of the DL06 PLC, port number
LD
KF201
2. The lower byte contains the slave address
14 number in BCD (01 to 99).
6 4 (BCD)
A Step 2: Load Number of Bytes to Transfer
The second Load (LD) instruction determines
B the number of bytes which will be transferred
between the master and slave in the subsequent
# of bytes to transfer

LD
C WX or RX instruction. The value to be loaded
is in BCD format (decimal), from 1 to 128
K64

bytes.
D

418 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

The number of bytes specified also depends on the type of data you want to obtain. For
example, the DL06 Input points can be accessed by V-memory locations or as X input
locations. However, if you only want X0 X27, youll have to use the X input data type
because the V-memory locations can only be accessed in 2-byte increments. The following 1
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 5
Diagnostic Status 8 1

DL330 / 340 Memory Bits per unit Bytes


6
Data registers
T / C accumulator
8
16
1
2 7
I/O, internal relays, shift register bits, T/C
bits, stage bits
Scratch Pad Memory
1
8 1
1
8
Diagnostic Status(5 word R/W) 16 10
9
Step 3: Specify Master Memory Area
The third instruction in the RX or WX sequence
4 0 6 0 0 (octal) 10
is a Load Address (LDA) instruction. Its purpose
is to load the starting address of the memory area Starting address of
master transfer area
11
to be transferred. Entered as an octal number, the
LDA instruction converts it to hex and places the
result in the accumulator. LDA
12
O40600
For a WX instruction, the DL06 CPU sends
the number of bytes previously specified from V40600
13
its memory area beginning at the LDA address MSB LSB
specified.
15 0
14
For an RX instruction, the DL06 CPU reads the V40601
number of bytes previously specified from the
MSB LSB
A
slave, placing the received data into its memory 15 0
area beginning at the LDA address specified.
B
NOTE: Since V-memory words are always 16 bits, you may not always use the whole word. For example, C
if you only specify 3 bytes and you are reading Y outputs from the slave, you will only get 24 bits of data. In
this case, only the 8 least significant bits of the last word location will be modified. The remaining 8 bits are
not affected.
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 419


Chapter 4: System Design and Configuration

1 The DL05/06, DL250-1/260, DL350 and DL450 will support function 04, read input

2 register (Address 30001). To use function 04, put the number 4 into the most significant
position (4xxx). Four digits must be entered for the intruction to work properly with this
mode.
3
4 LD
K101

5 LD
The Maximum constant possible is 4128. This
is due to the 128 maximum number of Bytes
K4128
that the RX/WX instruction can allow. The
6 LDA
value of 4 in the most significant position of
O4000 the word will cause the RX to use function 04
7 (30001 range).
RX
8 V0

9 Step 4: Specify Slave Memory Area


The last instruction in our sequence is the WX or RX SP116
LD
10 instruction itself. Use WX to write to the slave, and
RX to read from the slave. All four of our instructions KF201
are shown to the right. In the last instruction, you
11 must specify the starting address and a valid data type LD
K64
for the slave.
12 D
 irectNET slaves specify the same address in the WX
and RX instruction as the slaves native I/O address
LDA
O40600
13 MODBUS DL405, DL205, or DL06 slaves specify
the same address in the WX and RX instruction as the RX
slaves native I/O address Y0
14 MODBUS 305 slaves use the following table to
convert DL305 addresses to MODBUS addresses
A
DL305 Series CPU Memory TypetoMODBUS Cross Reference (excluding 350 CPU)
B PLC Memory Type PLC Base
Address
MODBUS PLC Memory
Base Address Type
PLC Base
Address
MODBUS
Base Address
C TMR/CNT Current Values R600 V0
TMR/CNT Status
Bits
CT600 GY600

I/O Points IO 000 GY0 Control Relays CR160 GY160


D Data Registers
Stage Status Bits (D3-330P only)
R401,R400
S0
V100
GY200
Shift Registers SR400 GY400

420 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

Communications from a Ladder Program


Typically network communications will last
longer than 1 scan. The program must wait
SP117 Y1
SET
1
for the communications to finish before
starting the next transaction.
Port 2, which can be a master, has two Port Communication Error
SP116
LD
KF201 2
Special Relay contacts associated with it (see
Appendix D for comm port special relays).
Port Busy
LD
K0003 3
One indicates Port busy(SP116), and
the other indicates Port Communication
LDA
O40600
4
Error(SP117). The example above shows the RX
use of these contacts for a network master that
only reads a device (RX). The Port Busy
Y0
5
bit is on while the PLC communicates with
the slave. When the bit is off the program can 6
initiate the next network request.
The Port Communication Error bit turns
on when the PLC has detected an error. Use
7
of this bit is optional. When used, it should
be ahead of any network instruction boxes 8
since the error bit is reset when an RX or WX Interlocking Relay
instruction is executed SP116 C100
LD
9
KF201

LD
K0003
10
Multiple Read and Write Interlocks
If you are using multiple reads and writes LDA
O40600
11
in the RLL program, you have to interlock
the routines to make sure all the routines are
executed. If you dont use the interlocks, then Interlocking
RX
VY0
12
the CPU will only execute the first routine.
This is because each port can only handle one
Relay C100
SET
13
transaction at a time.
In the example to the right, after the RX
SP116 C100
LD
KF201 14
instruction is executed, C100 is set. When the
port has finished the communication task, the
second routine is executed and C100 is reset.
LD
K0003 A
If youre using RLLPLUS Stage Programming,
you can put each routine in a separate program
LDA
O40400 B
stage to ensure proper execution and switch
from stage to stage allowing only one of them
WX
VY0 C
to be active at a time. C100
RST D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 421


Chapter 4: System Design and Configuration

Network Master Operation (using MRX and MWX


1 Instructions)
2 This section describes how the DL06 can communicate on a MODBUS RTU network as a
master using the MRX and MWX read/write instructions. These instructions allow you to
enter native MODBUS addressing in your ladder logic program with no need to perform
3 octal to decimal conversions. MODBUS is a single master/multiple slave network. The
master is the only member of the network that can initiate requests on the network. This
4 section teaches you how to design the required ladder logic for network master operation.

5 OUTPUT: 6-240V
Y
0 1 2
G

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

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

6
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

LOGIC 06
K oyo

7
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

PORT1 PORT2 RUN STOP

8 Master
MODBUS RTU Protocol,, or DirectNET

9
Slave #1 Slave #2 Slave #3
10
11 MODBUS Function Codes Supported
The MODBUS function code determines whether the access is a read or a write, and whether
12 to access a single data point or a group of them. The DL06 supports the MODBUS function
codes described below.

13 MODBUS Function Code


01 Read a group of coils
Function DL06 Data Types Available
Y, CR, T, CT

14 02
05
Read a group of inputs
Set / Reset a single coil (slave only)
X, SP
Y, CR, T, CT
15 Set / Reset a group of coils Y, CR, T, CT
A 03, 04
06
Read a value from one or more registers
Write a value into a single register (slave only)
V
V

B 07
08
Read Exception Status
Diagnostics
V
V
16 Write a value into a group of registers V
C
D

422 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

MODBUS Read from Network(MRX)


The MODBUS Read from Network (MRX) instruction is used by the DL06 network master
to read a block of data from a connected slave device and to write the data into Vmemory 1
addresses within the master. The instruction allows the user the to specify the MODBUS
Function Code, slave station address, starting master and slave memory addresses, number of
elements to transfer, MODBUS data format and the Exception Response Buffer.
2
3
4
5
6
7
8
Port Number: must be DL06 Port 2 (K2)
9
Slave Address: specify a slave station address (0247)
Function Code: The following MODBUS function codes are supported by the MRX
10

instruction:
01 Read a group of coils
11
02 Read a group of inputs 12
03 Read holding registers
04 Read input registers 13
07 Read Exception status
08 Diagnostics 14
Start Slave Memory Address: specifies the starting slave memory address of the data to be
read. See the table on the following page. A
Start Master Memory Address: specifies the starting memory address in the master where
the data will be placed. See the table on the following page. B
Number of Elements: specifies how many coils, input, holding registers or input register
will be read. See the table on the following page. C
MODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used
Exception Response Buffer: specifies the master memory address where the Exception
Response will be placed. See the table on the following page.
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 423


Chapter 4: System Design and Configuration

MRX Slave Memory Address


MRX Slave Address Ranges
1 Function Code MODBUS Data Format Slave Address Range(s)
01 Read Coil 484 Mode 1999
2 01 Read Coil
02 Read Input Status
584/984 Mode
484 Mode
165535
10011999
1000119999 (5 digit) or 100001165535
3 02 Read Input Status
03 Read Holding Register
584/984 Mode
484 Mode
(6 digit)
40014999

4 03 Read Holding Register


04 Read Input Register
584/984
484 Mode
4000149999 (5 digit) or 4000001465535
(6 digit)
30013999

5 04 Read Input Register 584/984 Mode 3000139999 (5 digit) or 3000001365535


(6 digit)
07 Read Exception Status 484 and 584/984 Mode n/a

6 08 Diagnostics 484 and 584/984 Mode 065535

7 MRX Master Memory Addresses


MRX Master Memory Address Ranges
8 Inputs X
Operand Data Type
01777
DL06 Range

Outputs Y 01777
9 Control Relays C 03777
Stage Bits S 01777
10 Timer Bits T
Counter Bits CT
0377
0377

11 Special Relays SP
Vmemory V
0777
All
Global Inputs GX 03777
12 Global Outputs GY 03777

13 MRX Number of Elements


MRX Number of Elements
14 Operand Data Type
Vmemory V All
DL06 Range

A Constant K 12000

MRX Exception Response Buffer


B MRX Exception Response Buffer
Operand Data Type DL06 Range
C Vmemory V All

424 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

MODBUS Write to Network (MWX)


The MODBUS Write to Network (MWX) instruction is used to write a block of data from
the network masterss (DL06) memory to MODBUS memory addresses within a slave device 1
on the network. The instruction allows the user to specify the MODBUS Function Code,
slave station address, starting master and slave memory addresses, number of elements to
transfer, MODBUS data format and the Exception Response Buffer.
2
3
4
5
6
7
8
Port Number: must be DL06 Port 2 (K2)
Slave Address: specify a slave station address (0247)
9
Function Code: The following MODBUS function codes are supported by the MWX
instruction:
10


05 Force Single coil
06 Preset Single Register
11
08 Diagnostics 12
15 Force Multiple Coils
16 Preset Multiple Registers 13
Start Slave Memory Address: specifies the starting slave memory address where the data
will be written. 14
Start Master Memory Address: specifies the starting address of the data in the master that is
to written to the slave.
Number of Elements: specifies how many consecutive coils or registers will be written to.
A
This field is only active when either function code 15 or 16 is selected.
MODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used.
B
Exception Response Buffer: specifies the master memory address where the Exception
Response will be placed.
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 425


Chapter 4: System Design and Configuration

MWX Slave Memory Address


1 Function Code
MWX Slave Address Ranges
MODBUS Data Format Slave Address Range(s)
05 Force Single Coil 484 Mode 1999
2 05 Force Single Coil 584/984 Mode 165535
06 Preset Single Register 484 Mode 40014999
3 06 Preset Single Register 84/984 Mode 4000149999 (5 digit) or 400001
465535 (6 digit)
08 Diagnostics 484 and 584/984 Mode 065535
4 15 Force Multiple Coils
15 Force Multiple Coils
484
585/984 Mode
1999
165535

5 16 Preset Multiple Registers


16 Preset Multiple Registers
484 Mode
584/984 Mode
40014999
4000149999 (5 digit) or 4000001
465535 (6 digit)

6
MWX Master Memory Addresses
7 MWX Master Memory Address Ranges
8 Inputs
Operand Data Type
X 0777
DL06 Range

Outputs Y 0777
9 Control Relays C 01777
Stage Bits S 01777

10 Timer Bits
Counter Bits
T
CT
0377
0177
Special Relays SP 0777
11 Vmemory V All
Global Inputs GX 03777

12 Global Outputs GY 03777

MWX Number of Elements


13
MWX Number of Elements
14 Vmemory
Operand Data Type
V All
DL06 Range

A Constant K 12000

B MWX Exception Response Buffer

C Operand Data Type


MWX Exception Response Buffer
DL06 Range

D Vmemory V All

426 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Chapter 4: System Design and Configuration

MRX/MWX Example in DirectSOFT 5


DL06 port 2 has two Special Relay contacts associated with it (see Appendix D for comm
port special relays). One indicates Port busy(SP116), and the other indicates Port 1
Communication Error(SP117). The Port Busy bit is on while the PLC communicates
with the slave. When the bit is off the program can initiate the next network request. The
Port Communication Error bit turns on when the PLC has detected an error and use
2
of this bit is optional. When used, it should be ahead of any network instruction boxes
since the error bit is reset when an MRX or MWX instruction is executed. Typically 3
network communications will last longer than 1 CPU scan. The program must wait for the
communications to finish before starting the next transaction. 4
The Port Communication Error bit turns on when the PLC has detected an error. Use of
this bit is optional. When used, it should be ahead of any network instruction boxes since the
error bit is reset when an RX or WX instruction is executed.
5
Multiple Read and Write Interlocks 6
If you are using multiple reads and writes in the RLL program, you have to interlock the
routines to make sure all the routines are executed. If you dont use the interlocks, then
the CPU will only execute the first routine. This is because each port can only handle one
7
transaction at a time. In the example below, after the MRX instruction is executed, C100
is set. When the port has finished the communication task, the second routine is executed 8
and C100 is reset. If youre using RLLplus Stage Programming, you can put each routine in
a separate program stage to ensure proper execution and switch from stage to stage allowing
only one of them to be active at a time.
9
See example on the next page. 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual; 3rd Edition Rev. D 427


Chapter 4: System Design and Configuration
_1Minute Pulse/Minute
SP3 C20
1
( PD )

Calculation of communication transfer quantity per minute between PLC and device.

1 2
Pulse/Minute
C20 LD
CTA1

2 OUT
Transactions/Min
V3600

3 LD
CTA2

4 OUT
Errors/Minute
V3601

5
SP116 pulses on every transaction - CT1 counts the transactions per minute.
The counter is reset every minute.
Port 2 busy bit
3 SP116 CNT

6
Number of
transactions per
Pulse/Minute
C20 minute
CT1

7
K9999

SP117 pulses on every transaction - CT2 counts the errors per minute.

8
The counter is reset every minute.
Port 2 error bit
SP117
CNT
4
Number of errors

9 per minute
Pulse/Minute
C20
CT2
K9999

10 This rung does a MODBUS write to the first holding register 40001 of slave address number one.
It writes the values over that reside in V2000. This particular function code only writes to one
register. Use function code 16 to write to multiple registers. Only one Network Instruction

11 (WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using
many network instructions on the same port, use the Shift Register instruction.

Port 2 busy bit


MWX
SP116 C100

12 3 Port Number:
Slave Address:
K2
K1
Function Code: 06 - Preset Single Register
Start Slave Memory Address: 40001

13
Number of Elements: n/a
Modbus Data Type: 584/984 Mode
Exception Response Buffer: V400

14 Instruction interlock bit


C100
( SET )

A This rung does a MODBUS read from the first 32 coils of slave address number one.
It will place the values into 32 bits of the master starting at C0.
Port 2 busy bit
MRX
4 SP116 C100
Port Number: K2

B Slave Address:
Function Code:
K1
01 - Read Coil Status
Start Slave Memory Address: 1
Start Master Memory Address: C0

C Number of Elements:
Modbus Data Type:
Exception Response Buffer:
32
584/984 Mode
V400

D Instruction interlock bit


C100
( RST )

428 DL06 Micro PLC User Manual; 3rd Edition Rev. D


Standard RLL Chapter
Instructions
5
In This Chapter
Introduction...................................................................................... 52
Using Boolean Instructions................................................................ 55
Boolean Instructions ....................................................................... 510
Comparative Boolean...................................................................... 526
Immediate Instructions.................................................................... 532
Timer, Counter and Shift Register Instructions................................ 539
Accumulator/Stack Load and Output Data Instructions................... 552
Logical Instructions (Accumulator).................................................. 569
Math Instructions............................................................................ 586
Transcendental Functions.............................................................. 5118
Bit Operation Instructions............................................................. 5120
Number Conversion Instructions (Accumulator)............................ 5127
Table Instructions.......................................................................... 5141
Clock/Calendar Instructions.......................................................... 5171
CPU Control Instructions............................................................... 5173
Program Control Instructions........................................................ 5175
Interrupt Instructions.................................................................... 5183
Message Instructions..................................................................... 5186
Intelligent I/O Instructions............................................................ 5194
Network Instructions..................................................................... 5196
MODBUS RTU Instructions ........................................................... 5204
ASCII Instructions.......................................................................... 5210
Intelligent Box (IBox) Instructions................................................. 5230
Chapter 5: Standard RLL Instructions

Introduction
1 DL06 Micro PLCs offer a wide variety of instructions to perform many different types of
operations. This chapter shows you how to use each standard Relay Ladder Logic (RLL)
2 instruction. In addition to these instructions, you may also need to refer to the Drum
instruction in Chapter 6, the Stage programming instructions in Chapter 7, PID in Chapter
8, LCD in Chapter 10 and programming for analog modules in D0-OPTIONS-M.
3 There are two ways to quickly find the instruction you need.
If you know the instruction category (Boolean, Comparative Boolean, etc.), just use the title at the
4 top of the page to find the pages that discuss the instructions in that category.
If you know the individual instruction name, use the following table to find the page(s) that
5 Instruction
discusses the instruction.
Page Instruction Page

6 Accumulating Fast Timer (TMRAF)


Accumulating Timer (TMRA)
542
542
And Store (AND STR)
And with Stack (ANDS)
516
572
Add (ADD) 586 Arc Cosine Real (ACOSR) 5119
7 Add Binary (ADDB) 599 Arc Sine Real (ASINR) 5118
Add Binary Double (ADDBD) 5100 Arc Tangent Real (ATANR) 5119
8 Add Binary Top of Stack (ADDBS) 5114 ASCII Clear Buffer (ACRB) 5228
Add Double (ADDD) 587 ASCII Compare (CMPV) 5220
9 Add Formatted (ADDF) 5106 ASCII Constant (ACON) 5187
Add Real (ADDR) 588 ASCII Extract (AEX) 5219
10 Add to Top (ATT)
Add Top of Stack (ADDS)
5162
5110
ASCII Find (AFIND)
ASCII Input (AIN)
5216
5212

11 And (AND)
And Bit-of-Word (AND)
514
515
ASCII Print from Vmemory (PRINTV)
ASCII Print to Vmemory (VPRINT)
5226
5221

12 And (AND)
AND (AND logical)
531
569
ASCII Swap Bytes (SWAPB)
ASCII to HEX (ATH)
5227
5134

13 And Double (ANDD)


And Formatted (ANDF)
570
571
Binary (BIN)
Binary Coded Decimal (BCD)
5127
5128
And If Equal (ANDE) 528 Binary to Real Conversion (BTOR) 5131
14 And If Not Equal (ANDNE) 528 Compare (CMP) 581
And Immediate (ANDI) 533 Compare Double (CMPD) 582
A AND Move (ANDMOV) 5167 Compare Formatted (CMPF) 583
And Negative Differential (ANDND) 522 Compare Real Number (CMPR) 585
B And Not (ANDN)
And Not Bit-of-Word (ANDN)
514
515
Compare with Stack (CMPS)
Cosine Real (COSR)
584
5118

C And Not (ANDN)


And Not Immediate (ANDNI)
531
533
Counter (CNT)
Data Label (DLBL)
545
5187

D And Positive Differential (ANDPD) 522 Date (DATE) 5171

5-2 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions

Instruction Page Instruction Page


Decode (DECO) 5126 Load Accumulator Indexed from Data Constants (LDSX) 562
Decrement (DEC) 598 Load Address (LDA) 560 1
Decrement Binary (DECB) 5105 Load Double (LDD) 558
Degree Real Conversion (DEGR)
Disable Interrupts (DISI)
5133
5184
Load Formatted (LDF)
Load Immediate (LDI)
559
537
2
Divide (DIV)
Divide Binary (DIVB)
595
5104
Load Immediate Formatted (LDIF)
Load Label (LDLBL)
538
5142
3
Divide Binary by Top OF Stack (DIVBS)
Divide by Top of Stack (DIVS)
5117
5113
Load Real Number (LDR)
Master Line Reset (MLR)
563
5181
4
Divide Double (DIVD)
Divide Formatted (DIVF)
596
5109
Master Line Set (MLS)
MODBUS Read from Network (MRX)
5181
5204 5
Divide Real (DIVR) 597 MODBUS Write to Network (MWX) 5207
Enable Interrupts (ENI) 5183 Move Block (MOVBLK) 5-189 6
Encode (ENCO) 5125 Move (MOV) 5141
End (END) 5173 Move Memory Cartridge (MOVMC) 5142 7
Exclusive Or (XOR) 577 Multiply (MUL) 592
Exclusive Or Double (XORD)
Exclusive Or Formatted (XORF)
578
579
Multiply Binary (MULB)
Multiply Binary Top of Stack (MULBS)
5103
5116
8
Exclusive OR Move (XORMOV)
Exclusive Or with Stack (XORS)
5167
580
Multiply Double (MULD)
Multiply Formatted (MULF)
593
5108
9
Fault (FAULT)
Fill (FILL)
5186
5146
Multiply Real (MULR)
Multiply Top of Stack (MULS)
594
5112
10
Find (FIND)
Find Block (FINDB)
5147
5169
No Operation (NOP)
Not (NOT)
5173
519 11
Find Greater Than (FDGT) 5148 Numerical Constant (NCON) 5187
For / Next (FOR) (NEXT) 5176 Or (OR) 512 12
Goto Label (GOTO) (LBL) 5175 Or (OR) 530
Goto Subroutine (GTS) (SBR) 5178 Or (OR logical) 573 13
Gray Code (GRAY) 5138 Or Bit-of-Word (OR) 513
HEX to ASCII (HTA) 5135 Or Double (ORD) 574 14
Increment (INC) 598 Or Formatted (ORF) 575
Increment Binary (INCB)
Interrupt (INT)
5105
5183
Or If Equal (ORE)
Or If Not Equal (ORNE)
527
527
A
Interrupt Return (IRT)
Interrupt Return Conditional (IRTC)
5183
5183
Or Immediate (ORI)
OR Move (ORMOV)
532
5167
B
Invert (INV)
LCD
5129
5200
Or Negative Differential (ORND)
Or Not (ORN)
521
512
C
Load (LD) 557 Or Not (ORN) 530
Load Accumulator Indexed (LDX) 561 Or Not Bit-of-Word (ORN) 513 D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-3


Chapter 5: Standard RLL Instructions
Instruction Page Instruction Page
Or Not Immediate (ORNI) 532 Shuffle Digits (SFLDGT) 5139
Or Out (OROUT) 517 Sine Real (SINR) 5118
1 Or Out Immediate (OROUTI) 534 Source to Table (STT) 5156
Or Positive Differential (ORPD) 521 Square Root Real (SQRTR) 5119
2 Or Store (ORSTR) 516 Stage Counter (SGCNT) 547
Or with Stack (ORS) 576 Stop (STOP) 5173
3 Out (OUT) 517 Store (STR) 510
Out Bit-of-Word (OUT) 518 Store (STR) 529

4 Out (OUT)
Out Double (OUTD)
564
564
Store Bit-of-Word (STRB)
Store If Equal (STRE)
511
526

5 Out Formatted (OUTF)


Out Immediate (OUTI)
565
534
Store If Not Equal (STRNE)
Store Immediate (STRI)
526
532

6 Out Immediate Formatted (OUTIF)


Out Indexed (OUTX)
535
567
Store Negative Differential (STRND)
Store Not (STRN)
520
529
Out Least (OUTL) 568 Store Not (STRN) 510
7 Out Most (OUTM) 568 Store Not Bit-of-Word (STRNB) 511
Pause (PAUSE) 525 Store Not Immediate (STRNI) 532
8 Pop (POP) 565 Store Positive Differential (STRPD) 520
Positive Differential (PD) 519 Subroutine Return (RT) 5178
9 Print Message (PRINT) 5190 Subroutine Return Conditional (RTC) 5178
Radian Real Conversion (RADR) 5133 Subtract (SUB) 589
10 Read from Intelligent I/O Module (RD)
Read from Network (RX)
5-194
5196
Subtract Binary (SUBB)
Subtract Binary Double (SUBBD)
5101
5102

11 Real to Binary Conversion (RTOB)


Remove from Bottom (RFB)
5132
5153
Subtract Binary Top of Stack (SUBBS)
Subtract Double (SUBD)
5115
590

12 Remove from Table (RFT)


Reset (RST)
5159
523
Subtract Formatted (SUBF)
Subtract Real (SUBR)
5107
591
Reset Bit-of-Word (RST) 524 Subtract Top of Stack (SUBS) 5111
13 Reset Immediate (RSTI) 536 Sum (SUM) 5120
Reset Watch Dog Timer (RSTWT) 5174 Swap (SWAP) 5170
14 Rotate Left (ROTL) 5123 Table Shift Left (TSHFL) 5165
Rotate Right (ROTR) 5124 Table Shift Right (TSHFR) 5165
A RSTBIT 5144 Table to Destination (TTD) 5150
Segment (SEG) 5137 Tangent Real (TANR) 5118
B Set (SET)
Set Bit-of-Word (SET)
523
524
Tens Complement (BCDCPL)
Time (TIME)
5130
5172

C Set Immediate (SETI)


SETBIT 5144
536 Timer (TMR) and Timer Fast (TMRF)
Up Down Counter (UDC)
540
549

D Shift Left (SHFL)


Shift Register (SR)
5121
551
Write to Intelligent I/O Module (WT)
Write to Network (WX)
5-195
5198
Shift Right (SHFR) 5122

5-4 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Using Boolean Instructions


Do you ever wonder why so many PLC manufacturers always quote the scan time for a 1K
Boolean program? Simple. Most programs utilize many Boolean instructions. These are
1
typically very simple instructions designed to join input and output contacts in various series
and parallel combinations. Our DirectSOFT software is a similar program. It uses graphic 2
symbols to develop a program; therefore, you dont necessarily have to know the instruction
mnemonics in order to develop your program. 3
Many of the instructions in this chapter are not program instructions used in DirectSOFT,
but are implied. In other words, they are not actually keyboard commands, however, they
can be seen in a Mnemonic View of the program once the DirectSOFT program has been
4
developed and accepted (compiled). Each instruction listed in this chapter will have a small
chart to indicate how the instruction is used with DirectSOFT and the HPP. 5
DS
HPP
Implied
Used 6
The following paragraphs show how these instructions are used to build simple ladder
programs. 7
END Statement 8
All DL06 programs require an END statement as the last instruction. This tells the CPU that
this is the end of the program. Normally, any instructions placed after the END statement
will not be executed. There are exceptions to this, such as interrupt routines, etc. This chapter
9
will discuss the instruction set in detail.
X0
DirectSOFT32 Example
DirectSOFT
Y0
10
All programs must have
an END statement
OUT
11
END 12
Simple Rungs 13
You use a contact to start rungs that contain both contacts and coils. The boolean instruction
that does this is called a Store or, STR instruction. The output point is represented by the
Output or, OUT instruction. The following example shows how to enter a single contact and
14
a single output coil.
A
DirectSOFT32 Example
DirectSOFT Handheld Mnemonics
X0 Y0
OUT STR X0
B
OUT Y0
END
C
END

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-5


Chapter 5: Standard RLL Instructions - Boolean Instructions

Normally Closed Contact


Normally closed contacts are also very common. This is accomplished with the Store Not,
1 or STRN instruction. The following example shows a simple rung with a normally closed
contact.
2 DirectSOFT
DirectSOFT Example Handheld Mnemonics
X0 Y0 STRN X0
3 OUT OUT Y0
END

4 END

5 Contacts in Series
Use the AND instruction to join two or more contacts in series. The following example
6 shows two contacts in series and a single output coil. The instructions used would be STR
X0, AND X1, followed by OUT Y0.

7 DirectSOFT
Direct SOFT32 Example Handheld Mnemonics

8 X0 X1 Y0
OUT
STR X0
AND X1
OUT Y0

9
END

END

10 Midline Outputs
Sometimes, it is necessary to use midline outputs to get additional outputs that are
11 conditional on other contacts. The following example shows how you can use the AND
instruction to continue a rung with more conditional outputs.
12 DirectSOFT
Direct SOFT32 Example Handheld Mnemonics

13 X0 X1 Y0
OUT
STR X0
AND X1
OUT Y0

14 X2 Y1
AND X2
OUT Y1
AND X3
OUT
A X3 Y2
OUT Y2
END

B OUT

C END

5-6 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions
Parallel Elements
You may also have to join contacts in parallel. The OR instruction allows you to do this. The
following example shows two contacts in parallel and a single output coil. The instructions
would be STR X0, OR X1, followed by OUT Y0. 1
DirectSOFT

X0
Direct SOFT32 Example
Y0
Handheld Mnemonics
STR X0
2
OUT OR X1

X1
OUT Y0
END 3
END
4
5
Joining Series Branches in Parallel
Quite often, it is necessary to join several groups of series elements in parallel. The Or Store 6
(ORSTR) instruction allows this operation. The following example shows a simple network
consisting of series elements joined in parallel.
DirectSOFT
Direct SOFT32 Example Handheld Mnemonics
7
X0 X1 Y0
OUT
STR X0
AND X1 8
STR X2
X2 X3 AND X3
ORSTR
OUT Y0
9
END END

Joining Parallel Branches in Series 10


You can also join one or more parallel branches in series. The And Store (ANDSTR)
instruction allows this operation. The following example shows a simple network with 11
contact branches in series with parallel contacts.
DirectSOFT
Direct SOFT32 Example Handheld Mnemonics
12
X0 X1
OUT
Y0 STR X0
STR X1 13
OR X2
X2 ANDSTR
OUT Y0
END
14
Combination Networks
END
A
X0 X2 X5 Y0
You can combine the various types
of series and parallel branches
OUT B
X1 X3 X4
to solve almost any application
problem.The following example
X6
C
shows a simple combination
network.
END
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-7


Chapter 5: Standard RLL Instructions - Boolean Instructions

Comparative Boolean
Some PLC manufacturers make it really difficult to do a simple comparison of two numbers.
1 Some of them require you to move the data all over the place before you can actually perform
the comparison. The DL06 Micro PLCs provide Comparative Boolean instructions that
2 allow you to quickly and easily solve this problem. The Comparative Boolean provides
evaluation of two BCD values using boolean contacts. The valid evaluations are: equal to, not
equal to, equal to or greater than, and less than.
3 In the example, when the BCD value in V-memory
V1400 K1234 Y3
OUT
location V1400 is equal to the constant value 1234, Y3
4 will energize.

Boolean Stack
5 There are limits to how many elements you can include in a rung. This is because the DL06
PLCs use an 8-level boolean stack to evaluate the various logic elements. The boolean
6 stack is a temporary storage area that solves the logic for the rung. Each time the program
encounters a STR instruction, the instruction is placed on the top of the stack. Any other
7 STR instructions already on the boolean stack are pushed down a level. The ANDSTR, and
ORSTR instructions combine levels of the boolean stack when they are encountered. An
error will occur during program compilation if the CPU encounters a rung that uses more
8 than the eight levels of the boolean stack.
The following example shows how the boolean stack is used to solve boolean logic.
9
AND X4
10 ORSTR
X0 X1 Y0
STR
STR OUT Output

11 STR
X2 AND X3
ANDSTR

12 X5 OR

13 STR X0
1 STR X0
STR X1
1 STR X1
STR X2
1 STR X2
AND X3
1 X2 AND X3
2 2 STR X0 2 STR X1 2 STR X1

14 3
4
3
4
3
4
STR X0 3
4
STR X0

A ORSTR
1 X1 or (X2 AND X3)
AND X4
1 X4 AND {X1 or (X2 AND X3)}
ORNOT X5
1 NOT X5 OR X4 AND {X1 OR (X2 AND X3)}

B
2 STR X0 2 STR X0 2
STR X0
3 3 3

C ANDSTR
1
2
XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)}

D 3

5-8 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Immediate Boolean
The DL06 Micro PLCs can usually complete an operation cycle in a matter of milliseconds.
However, in some applications you may not be able to wait a few milliseconds until the
1
next I/O update occurs. The DL06 PLCs offer Immediate input and outputs which are
special boolean instructions that allow reading directly from inputs and writing directly to 2
outputs during the program execution portion of the CPU cycle. You may recall that this is
normally done during the input or output update portion of the CPU cycle. The immediate 3
instructions take longer to execute because the program execution is interrupted while the
CPU reads or writes the I/O point. This function is not normally done until the read inputs
or the write outputs portion of the CPU cycle.
4
NOTE: Even though the immediate input instruction reads the most current status from the input
point, it only uses the results to solve that one instruction. It does not use the new status to update
5
the image register. Therefore, any regular instructions that follow will still use the image register
values. Any immediate instructions that follow will access the I/O again to update the status. The 6
immediate output instruction will write the status to the I/O and update the image register.
7
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
PWR
RUN
CPU
TX1
RX1
TX2
8
RX2

9
LOGIC 06
10
K oyo

TERM

PORT1 PORT2 RUN STOP

11
CPU Scan

Read Inputs
The CPU reads the inputs from the local
base and stores the status in an input
12
image register
.

X11
OFF
...
...
X2 X1
ON OFF OFF
Input Image Register,
X0
OFF
OFF
X0 13
X1

Read Inputs from Specialty I/O


14
Solve the Application Program
Immediate instruction does not use the
input image register, but instead reads
the status from the module immediately.
A
X0 Y0
I
I/O Point X0 Changes B
C
ON X0
Write Outputs OFF X1

Write Outputs to Specialty I/O

Diagnostics D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-9


Chapter 5: Standard RLL Instructions - Boolean Instructions

Boolean Instructions
Store (STR)
1 DS Used The Store instruction begins a new rung or an additional branch Aaaa
HPP Used in a rung with a normally open contact. Status of the contact will
2 be the same state as the associated image register point or memory
location.
3 Store Not (STRN)
DS Used The Store Not instruction begins a new rung or an additional
4 HPP Used branch in a rung with a normally closed contact. Status of the
contact will be opposite the state of the associated image register
Aaaa

5 point or memory location.

6
Operand Data Type DL06 Range
7
Inputs X
A aaa
0777

8 Outputs Y
Control Relays C
0777
01777
Stage S 01777
9 Timer
Counter C
T
CT
0377
0177

10 Special Relay SP 0777

11 In the following Store example, when input X1 is on, output Y2 will energize.
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

12 X1 Y2 $
STR
B
1
ENT
OUT

13
GX C ENT
OUT 2

14
A In the following Store Not example, when input X1 is off output Y2 will energize.
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

B X1 Y2

OUT
SP
STRN
B
1
ENT

GX C

C OUT 2
ENT

5-10 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions
Store Bit-of-Word (STRB)
DS Used
The Store Bit-of-Word instruction begins a new rung or an additional
Aaaa.bb
branch in a rung with a normally open contact. Status of the contact
HPP Used
will be the same state as the bit referenced in the associated memory
location.
1
Store Not Bit-of-Word (STRNB)
Aaaa.bb
2
The Store Not instruction begins a new rung or an additional branch in a
DS
HPP
Used
Used
rung with a normally closed contact. Status of the contact will be opposite
the state of the bit referenced in the associated memory location.
3
Operand Data Type DL06 Range
4

V-memory
A
B
aaa
See memory map
bb
0 to 15
5
Pointer PB See memory map 0 to 15

These instructions look like the STR and STRN instructions only the address is different.
6
Take note how the address is set up in the following Store Bit-of-Word example.
When bit 12 of V-memory location V1400 is on, output Y2 will energize.
7
DirectSOFT
DirectSOFT32
8
B1400.12 Y2

OUT
9
10
Handheld Programmer Keystrokes
11
STR SHFT B V 1 4 0 0

K 1 2 ENT 12
OUT 2 ENT

In the following Store Not Bit-of-Word example, when bit 12 of V-memory location V1400
13
is off, output Y2 will energize.
DirectSOFT
DirectSOFT32
14
A
B1400.12 Y2

OUT

B
C
Handheld Programmer Keystrokes

STRN SHFT B V 1 4 0 0

OUT
K 1

2
2

ENT
ENT
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-11


Chapter 5: Standard RLL Instructions - Boolean Instructions
Or (OR)
DS Implied
The Or instruction will logically OR a normally open contact in
parallel with another contact in a rung. The status of the contact will
1 HPP Used
be the same state as the associated image register point or memory
location.
Aaaa

2 Or Not (ORN)
The Or Not instruction will logically OR a normally closed contact
3 DS
HPP
Implied
Used
in parallel with another contact in a rung. The status of the contact
will be opposite the state of the associated image register point or
Aaaa

4 memory location.

Operand Data Type DL06 Range


5 A aaa
Inputs X 0-777
6 Outputs
Control Relays
Y
C
0-777
01777
Stage S 01777
7 Timer T 0377
Counter CT 0177
8 Special Relay SP 0-777

9 In the following Or example, when input X1 or X2 is on, output Y5 will energize.

10 DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

X1 Y5 $ B

11
ENT
STR 1
OUT
Q C ENT
OR 2
X2
12 GX
OUT
F
5
ENT

13
14
In the following Or Not example, when input X1 is on or X2 is off, output Y5 will energize.
A
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

B X1 Y5 $
STR
B
1
ENT
OUT

C X2
R
ORN
C
2
ENT

GX F ENT

D
OUT 5

5-12 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Or Bit-of-Word (OR)
The Or Bit-of-Word instruction will logically OR a normally
DS
HPP
Implied
Used
open contact in parallel with another contact in a rung. Status
Aaaa.bb
1
of the contact will be the same state as the bit referenced in the
associated memory location. 2
Or Not Bit-of-Word (ORN)
DS Implied The Or Not Bit-of-Word instruction will logically OR a 3
HPP Used normally closed contact in parallel with another contact in a Aaaa.bb
rung. Status of the contact will be opposite the state of the bit
referenced in the associated memory location.
4
Operand Data Type DL06 Range
5
A aaa bb
V-memory B See memory map 0 to 15 6
Pointer PB See memory map 0 to 15

In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400 is on, output Y5
7
will energize.
DirectSOFT
DirectSOFT32
8
X1 Y7

OUT
9
B1400.7

Handheld Programmer Keystrokes


10
STR

OR SHFT
1

B
ENT

V 1 4 0 0
11
OUT
K 7

7
ENT

ENT
12
In the following Or Bit-of-Word example, when input X1 is on or bit 7 of V1400 is off, 13
output Y7 will energize.
DirectSOFT
DirectSOFT32
14
A
X1 Y7

OUT

B
B1400.7

Handheld Programmer Keystrokes

C
STR 1 ENT

ORN SHFT B V 1 4 0 0

K 7

D
ENT

OUT 7 ENT

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-13


Chapter 5: Standard RLL Instructions - Boolean Instructions
AND (AND)
The AND instruction logically ands a normally open
Aaaa
DS Implied contact in series with another contact in a rung. The
1 HPP Used status of the contact will be the same state as the
associated image register point or memory location.
2 AND NOT (ANDN)
DS Implied The AND NOT instruction logically ands a normally
3 HPP Used closed contact in series with another contact in a rung.
The status of the contact will be opposite the state of the
Aaaa

4 associated image register point or memory location.

5 Operand Data Type DL06 Range


A aaa
6 Inputs
Outputs
X
Y
0777
0777

7 Control Relays
Stage
C
S
01777
01777
Timer T 0377
8 Counter
Special Relay
CT
SP
0177
0777

9 In the following And example, when input X1 and X2 are on output Y5 will energize.

10
Direct SOFT32 Handheld Programmer Keystrokes
DirectSOFT
11 X1 X2 Y5 $
STR
B
1
ENT
OUT

12 V
AND
GX
C

F
2
ENT

ENT

13
OUT 5

In the following And Not example, when input X1 is on and X2 is off output Y5 will
14 energize.

A DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

X1 X2 Y5 $ B

B
ENT
OUT STR 1
W C ENT
ANDN 2

C GX
OUT
F
5
ENT

5-14 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

AND Bit-of-Word (AND)


The And Bit-of-Word instruction logically ands a Aaaa.bb
DS
HPP
Implied
Used
normally open contact in series with another contact in
a rung. The status of the contact will be the same state as
1
the bit referenced in the associated memory location.
2
AND Not Bit-of-Word (ANDN)
DS Implied
The And Not Bit-of-Word instruction logically ands a
normally closed contact in series with another contact in
Aaaa.bb
3
HPP Used
a rung. The status of the contact will be opposite the state
of the bit referenced in the associated memory location. 4
A
Operand Data Type DL06 Range
aaa bb
5
V-memory B
Pointer PB
See memory map
See memory map
0 to 15
0 to 15
6
In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on output
7
Y5 will energize.
8
DirectSOFT
DirectSOFT32

X1 B1400.4 Y5

OUT
9
Handheld Programmer Keystrokes
10
STR 1 ENT
11
AND SHFT

K
B

4 ENT
V 1 4 0 0
12
13
OUT 5 ENT

In the following And Not Bit-of-Word example, when input X1 is on and bit 4 of V1400 is
off output Y5 will energize. 14
DirectSOFT
DirectSOFT32

X1 B1400.4
OUT
Y5 A
B
C
Handheld Programmer Keystrokes

STR 1 ENT

ANDN SHFT V 1 4 0 0

D
B

K 4 ENT

OUT 5 ENT

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-15


Chapter 5: Standard RLL Instructions - Boolean Instructions
And Store (ANDSTR)
DS Implied
The And Store instruction logically ands two branches OUT
of a rung in series. Both branches must begin with the
1 HPP Used
Store instruction. 1 2

2 OR Store (ORSTR) 1

3 DS
HPP
Implied
Used
The Or Store instruction logically ORs two branches
of a rung in parallel. Both branches must begin with OUT
the Store instruction.
4 2

5 In the following And Store example, the branch consisting of contacts X2, X3, and X4 have
been anded with the branch consisting of contact X1.
6
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes
7 X1 X2 X3 Y5 $ B ENT
STR 1

8
OUT
$ C ENT
STR 2
X4
V D

9 Q
AND
E
3
ENT

ENT
OR 4

10 L
ANDST
ENT

GX F

11 OUT 5
ENT

12 In the following Or Store example, the branch consisting of X1 and X2 have been ored with
the branch consisting of X3 and X4.
13 DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

14 X1 X2 Y5 $
STR
B
1
ENT
OUT

A
V C
ENT
AND 2
X3 X4
$ D ENT
STR 3

B V
AND
E
4
ENT

C M
ORST
GX
ENT

F ENT
OUT 5
D

5-16 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Out (OUT)
Aaaa
The Out instruction reflects the status of the rung (on/off) and outputs
DS
HPP
Used
Used
the discrete (on/off) state to the specified image register point or memory OUT 1
location.
Multiple Out instructions referencing the same discrete location should not be used since only 2
the last Out instruction in the program will control the physical output point. Instead, use the
next instruction, the Or Out.
Operand Data Type DL06 Range
3

Inputs
A
X
aaa
0777
4
Outputs Y 0777
Control Relays C 01777 5
In the following Out example, when input X1 is on, output Y2 and Y5 will energize.
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes
6
X1 Y2

OUT
$
STR
B
1
ENT 7
GX C

8
ENT
OUT 2
Y5
GX F ENT
OUT OUT 5

Or Out (OROUT) 9
The Or Out instruction allows more than one rung of discrete logic to
DS
HPP
Usied
Used control a single output. Multiple Or Out instructions referencing the same A aaa
OROUT
10
output coil may be used, since all contacts controlling the output are logically
ORd together. If the status of any rung is on, the output will also be on. 11
Operand Data Type DL06 Range 12
A aaa
Inputs X 0777 13
Outputs Y 0-777
Control Relays C 01777 14
In the following example, when X1 or X4 is on, Y2 will energize. A
Direct SOFT32
DirectSOFT Handheld Programmer Keystrokes

X1 Y2

OR OUT
$
STR
B
1
ENT
B
C
O D F ENT ENT C ENT
INST# 3 5 2
$ E ENT
STR 4
X4 Y2

OR OUT
O
INST#
D
3
F
5
ENT ENT C
2
ENT D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-17


Chapter 5: Standard RLL Instructions - Boolean Instructions
Out Bit-of-Word (OUT)
The Out Bit-of-Word instruction reflects the status of the rung
(on/off) and outputs the discrete (on/off) state to the specified bit Aaaa.bb
1 DS
HPP
Used
Used
in the referenced memory location. Multiple Out Bit-of-Word OUT
instructions referencing the same bit of the same word generally
2 should not be used since only the last Out instruction in the
program will control the status of the bit.

3 Operand Data Type DL06 Range


A aaa bb
4 V-memory B
Pointer PB
See memory map
See memory map
0 to 15
0 to 15

5 NOTE: If the Bit-of-Word is entered as V1400.3 in DirectSOFT, it will be converted to B1400.3. Bit-of-
6 Word can also be entered as B1400.3.

DirectSOFT
DirectSOFT32

7 X1 B1400.3

OUT

8 Handheld Programmer Keystrokes


B1401.6

OUT

9 STR 1 ENT

OUT SHFT B V 1 4 0 0

10 K 3 ENT

OUT SHFT B V 1 4 0 1

11 K 6 ENT

12 In the following Out Bit-of-Word example, when input X1 is on, bit 3 of V1400 and bit 6 of
V1401 will turn on.
13 The following Out Bit-of-Word example contains two Out Bit-of-Word instructions
using the same bit in the same memory word. The final state bit 3 of V1400 is ultimately
controlled by the last rung of logic referencing it. X1 will override the logic state controlled
14 by X0. To avoid this situation, multiple outputs using the same location must not be used in
programming.
A X0 B1400.3

OUT

B
C
X1 B1400.3

D OUT

5-18 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Not (NOT)
The Not instruction inverts the status of the rung at the point
DS
HPP
Used
Used
of the instruction. 1
In the following example, when X1 is off, Y2 will energize. This is because the Not instruction
inverts the status of the rung at the Not instruction. 2
DirectSOFT
3
DirectSOFT32 Handheld Programmer Keystrokes

X1 Y2 $ B ENT
STR 1

4
OUT
SHFT N O T ENT
TMR INST# MLR
GX C ENT
OUT 2
5
NOTE: DirectSOFT Release 1.1i and later supports the use of the NOT instruction. The above example
rung is merely intended to show the visual representation of the NOT instruction. The NOT instruction
can only be selected in DirectSOFT from the Instruction Browser. The rung cannot be created or
6
displayed in DirectSOFT versions earlier than 1.1i.
7
Positive Differential (PD)
The Positive Differential instruction is typically
8
DS Used known as a one shot. When the input logic A aaa
HPP Used produces an off to on transition, the output will PD 9
energize for one CPU scan.
10

Operand Data Type
A
DL06 Range
aaa
11
Inputs X 0777
Outputs Y 0777 12
Control Relays C 01777
13
In the following example, every time X1 makes an Off-to-On transition, C0 will energize for
one scan. 14
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes A
X1 C0 $ B ENT
PD
SHFT
STR
P
CV
SHFT
1
D
3
A
0
B
ENT

C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-19


Chapter 5: Standard RLL Instructions - Boolean Instructions
Store Positive Differential (STRPD)
The Store Positive Differential instruction begins a new rung
or an additional branch in a rung with a contact. The contact Aaaa
1 DS Used closes for one CPU scan when the state of the associated image
HPP Used register point makes an Off-to-On transition. Thereafter, the
2 contact remains open until the next Off-to-On transition (the
symbol inside the contact represents the transition). This function
is sometimes called a one-shot. This contact will also close on a
3 program-to-run transition if it is within a retentative range.

4 Store Negative Differential (STRND)


The Store Negative Differential instruction begins a new rung
Aaaa

or an additional branch in a rung with a contact. The contact


5 DS
HPP
Used
Used
closes for one CPU scan when the state of the associated image
register point makes an On-to-Off transition. Thereafter, the
6 contact remains open until the next On-to-Off transition (the
symbol inside the contact represents the transition).
7 NOTE: When using DirectSOFT, these instructions can only be entered from the Instruction
Browser.
8 Operand Data Type DL06 Range
9
Inputs
A
X
aaa
0777
Outputs Y 0777
10 Control Relays C 01777
Stage S 01777

11 Timer
Counter
T
CT
0377
0177

12 In the following example, each time X1 makes an Off-to-On transition, Y4 will energize for
one scan.
13 DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
$ P D B
X1 Y4 SHFT ENT

14
STR CV 3 1
OUT GX E ENT
OUT 4

A
In the following example, each time X1 makes an On-to-Off transition, Y4 will energize for
B one scan.
DirectSOFT
C DirectSOFT32
X1 Y4
Handheld Programmer Keystrokes
$
STR
SHFT N
TMR
D
3
B
1
ENT

OUT

D
GX E
ENT
OUT 4

5-20 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Or Positive Differential (ORPD)


The Or Positive Differential instruction logically ors a
DS Implied contact in parallel with another contact in a rung. The
Aaaa
1
HPP Used status of the contact will be open until the associated
image register point makes an Off-to-On transition,
closing it for one CPU scan. Thereafter, it remains
2
open until another Off-to-On transition.

Or Negative Differential (ORND)


3
DS Implied
The Or Negative Differential instruction logically
ors a contact in parallel with another contact in a
4
HPP Used rung. The status of the contact will be open until the
associated image register point makes an On-to-Off Aaaa 5
transition, closing it for one CPU scan. Thereafter, it
remains open until another On-to-Off transition. 6

Operand Data Type
A
DL06 Range
aaa
7
Inputs
Outputs
X
Y
0777
0777
8
Control Relays C 01777
Stage S 01777 9
Timer T 0377
Counter CT 0177
10
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2
transitions from Off to On. 11
DirectSOFT
DirectSOFT32

X1
Handheld Programmer Keystrokes
$ B ENT
12
Y5 STR 1
OUT Q
OR
SHFT P
CV
D
3
C
2
ENT 13
X2 GX F

14
ENT
OUT 5

In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2
transitions from On to Off.
A
DirectSOFT
DirectSOFT32

Y5
Handheld Programmer Keystrokes
$ B ENT
B
X1 STR 1
OUT Q
OR
SHFT N
TMR
D
3
C
2
ENT C
X2 GX F
ENT
OUT 5
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-21


Chapter 5: Standard RLL Instructions - Boolean Instructions
And Positive Differential (ANDPD)
The And Positive Differential instruction logically ands
a normally open contact in series with another contact
1 DS
HPP
Implied
in a rung. The status of the contact will be open until
Used the associated image register point makes an Off-to-On Aaaa

2 transition, closing it for one CPU scan. Thereafter, it


remains open until another Off-to-On transition.

3 And Negative Differential (ANDND)


The And Negative Differential instruction logically ands
4 DS Implied
a normally open contact in series with another contact
5-22in a rung.The status of the contact will be open
Aaaa

HPP Used
until the associated image register point makes an On-to-
5 Off transition, closing it for one CPU scan. Thereafter, it
remains open until another On-to-Off transition.
6
7 Operand Data Type DL06 Range
A aaa
8 Inputs
Outputs
X
Y
0777
0777

9 Control Relays
Stage
C
S
01777
01777
Timer T 0377
10 Counter CT 0177
In the following example, Y5 will energize for one CPU scan whenever X1 is on and
11 X2 transitions from Off to On.

12 DirectSOFT
DirectSOFT32

X1 X2 Y5
Handheld Programmer Keystrokes
$
STR
B
1
ENT

13 OUT Q

GX
OR
SHFT P

F
CV
D
3
C
2
ENT

ENT
OUT 5

14
In the following example, Y5 will energize for one CPU scan whenever X1 is on and
A X2 transitions from On to Off.

B DirectSOFT
DirectSOFT32

X1 X2 Y5
Handheld Programmer Keystrokes
$ B ENT
STR 1

C OUT Q
OR
SHFT N
TMR
D
3
C
2
ENT

GX F
ENT

D OUT 5

5-22 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions
Set (SET)
The Set instruction sets or turns on an image register point/ Optional
memory range
memory location or a consecutive range of image register points/
DS Used memory locations. Once the point/location is set it will remain
A aaa
SET
aaa 1
HPP Used on until it is reset using the Reset instruction. It is not necessary
for the input controlling the Set instruction to remain on. 2
Reset (RST)
The Reset instruction resets or turns off an image register point/
Optional
3
memory location or a range of image registers points/memory Memory. range

DS Used
locations. Once the point/location is reset, it is not necessary for
the input to remain on.
A aaa aaa 4
HPP Used RST

5
Operand Data Type DL06 Range 6
A aaa
Inputs
Outputs
X
Y
0777
0777
7
Control Relays
Stage
C
S
01777
01777 8
Timer T 0377
Counter CT 0177 9
In the following example when X1 is on, Y2 through Y5 will energize. 10
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
11
X1
Y2
SET
Y5 $
STR
B
1
ENT
12
X C F ENT
SET 2 5
13
14
In the following example when X1 is on, Y2 through Y5 will be reset or deenergized.
A
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
B
X2
Y2
RST
Y5 $
STR
B
1
ENT
C
S C F ENT

D
RST 2 5

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-23


Chapter 5: Standard RLL Instructions - Boolean Instructions

Set Bit-of-Word (SET)


The Set Bit-of-Word instruction sets or turns on a bit in a
1 DS
HPP
Used
Used
V-memory location. Once the bit is set, it will remain on Aaaa.bb
SET
until it is reset using the Reset Bit-of-Word instruction. It is
2 not necessary for the input controlling the Set Bit-of-Word
instruction to remain on.

3 Reset Bit-of-Word (RST)


A aaa.bb
DS Used The Reset Bit-of-Word instruction resets or turns off a bit in a
RST
4 HPP Used V-memory location. Once the bit is reset. it is not necessary for
the input to remain on.

5
Operand Data Type
A
DL06 Range
aaa bb

6 V-memory
Pointer
B
PB
See memory map
See memory map
0 to 15
0 to 15

7 In the following example. when X1 turns on, bit 1 in V1400 is set to the on state.

8 DirectSOFT
DirectSOFT32

X1
B1400.1

9 SET

10 Handheld Programmer Keystrokes

11 STR 1 ENT

SET SHFT B V 1 4 0 0

12 K 1 ENT

13 In the following example, when X2 turns on, bit 1 in V1400 is reset to the off state.

14 DirectSOFT
DirectSOFT32

X2
B1400.1
A RST

B
Handheld Programmer Keystrokes

C STR 2 ENT

RST SHFT B V 1 4 0 0

D K 1 ENT

5-24 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Boolean Instructions

Pause (PAUSE)
The Pause instruction disables the output update on a
DS
HPP
Used
Used
range of outputs. The ladder program will continue to
run and update the image register. However, the outputs
Y aaa
PAUSE
aaa 1
in the range specified in the Pause instruction will be
turned off at the output points. 2
Operand Data Type DL06 Range 3
A aaa
Outputs Y 0777 4
In the following example, when X1 is ON, Y5Y7 will be turned OFF. The execution of the
ladder program will not be affected. 5
DirectSOFT
DirectSOFT32

X1 Y5 Y7
6
PAUSE
7
8
Since the D2HPP Handheld Programmer does not have a specific Pause key, you can use
the corresponding instruction number for entry (#960), or type each letter of the command.
9
Handheld Programmer Keystrokes
10
$
STR
B
1
ENT 11
O
INST#
J
9
G
6
A
0
ENT ENT D
3
F
5
ENT
12
In some cases, you may want certain output points in the specified pause range to operate 13
normally. In that case, use Aux 58 to over-ride the Pause instruction.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-25


Chapter 5: Standard RLL Instructions - Comparative Boolean

Comparative Boolean
1 Store If Equal (STRE)
The Store If Equal instruction begins a new rung or
2 DS
HPP
Implied
Used
additional branch in a rung with a normally open V aaa B bbb
comparative contact. The contact will be on when Vaaa
3 equals Bbbb .

Store If Not Equal (STRNE)


4 DS Implied
The Store If Not Equal instruction begins a new rung V aaa B bbb
or additional branch in a rung with a normally closed
5 HPP Used comparative contact. The contact will be on when Vaaa
does not equal Bbbb.

6 Operand Data Type DL06 Range


B aaa bbb
7 V-memory
Pointer
V
P
See memory map
See memory map
See memory map
See memory map
Constant K 09999
8
In the following example, when the BCD value in V-memory location V2000 = 4933, Y3
9 will energize.

10 DirectSOFT
DirectSOFT32

V2000 K4933 Y3
Handheld Programmer Keystrokes

$ SHFT E C A A A
STR 4 2 0 0 0

11 OUT
E
4
J
9
D
3
D
3
ENT

GX D ENT

12
OUT 3

In the following example, when the value in V-memory location V2000 =/ 5060, Y3 will
13 energize.

14 DirectSOFT
DirectSOFT32

V2000 K5060 Y3
Handheld Programmer Keystrokes

SP
STRN
SHFT E
4
C
2
A
0
A
0
A
0
OUT

A
F A G A ENT
5 0 6 0
GX D ENT
OUT 3

B
C
D

5-26 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Comparative Boolean

Or If Equal (ORE)
The Or If Equal instruction connects a normally
DS
HPP
Implied
Used
open comparative contact in parallel with another
contact. The contact will be on when Vaaa = V aaa B bbb 1
Bbbb.
2
Or If Not Equal (ORNE)
DS
HPP
Implied
Used
The Or If Not Equal instruction connects a
normally closed comparative contact in parallel V aaa B bbb
3
with another contact. The contact will be on
when Vaaa does not equal Bbbb. 4

Operand Data Type
B aaa
DL06 Range
bbb
5
V-memory V See memory map See memory map
Pointer P See memory map See memory map 6
Constant K 09999

In the following example, when the BCD value in V-memory location V2000 = 4500 or
7
V2002 =/ 2500, Y3 will energize.
8
DirectSOFT
DirectSOFT32

V2000 K4500 Y3
Handheld Programmer Keystrokes

$
STR
SHFT E
4
C
2
A
0
A
0
A
0
9
OUT

10
E F A A ENT
4 5 0 0

V2002 K2500 Q SHFT E C A A C


OR 4 2 0 0 2
C

GX
2
D
3
E

D
4
F

ENT
5
ENT
11
OUT 3

12
In the following example, when the BCD value in V-memory location V2000 = 3916 or
V2002 =/ 2500, Y3 will energize. 13
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
14
$ E C A A A

A
V2000 K3916 Y3 SHFT
STR 4 2 0 0 0
OUT D J B G ENT
3 9 1 6

B
V2002 K2500 R SHFT E C A A C
ORN 4 2 0 0 2
C F A A ENT
2 5 0 0
GX
OUT
D
3
ENT
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-27


Chapter 5: Standard RLL Instructions - Comparative Boolean
And If Equal (ANDE)
The And If Equal instruction connects a
normally open comparative contact in series with
1 DS
HPP
Implied
Used
another contact. The contact will be on when
Vaaa = Bbbb.
V aaa B bbb

2 And If Not Equal (ANDNE)


The And If Not Equal instruction connects a V aaa B bbb
3 DS
HPP
Implied
Used
normally closed comparative contact in series
with another contact. The contact will be on
4 when Vaaa does not equal Bbbb

5 Operand Data Type DL06 Range


6
V-memory
B
V
aaa
See memory map
bbb
See memory map
Pointer P See memory map See memory map
7 Constant K 09999

8 In the following example, when the BCD value in V-memory location V2000 = 5000 and
V2002 = 2345, Y3 will energize.

9 DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

10
V2000 K5000 V2002 K2345 Y3 $ SHFT E C A A A
STR 4 2 0 0 0
OUT
F A A A ENT
5 0 0 0

11 V

C
AND
SHFT

D
E

E
4
F
C

ENT
2
A
0
A
0
C
2

2 3 4 5

12 GX
OUT
D
3
ENT

In the following example, when the BCD value in V-memory location V2000 = 5000 and
13 V2002 =/ 2345, Y3 will energize.

14 DirectSOFT
DirectSOFT32

V2000 K5000 V2002 K2345 Y3


Handheld Programmer Keystrokes

$
STR
SHFT E
4
C
2
A
0
A
0
A
0
OUT

A F

V
5
A

SHFT
0
A

E
0
A
0
ENT

C A A C
AND 4 2 0 0 2

B C

GX
2
D
3
E

D
4
F

ENT
5
ENT

OUT 3

C
D

5-28 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Comparative Boolean

Store (STR)
The Comparative Store instruction begins a new rung or A aaa B bbb
DS
HPP
Implied
Used
additional branch in a rung with a normally open comparative
contact. The contact will be on when Aaaa is equal to or
1
greater than Bbbb.
2
Store Not (STRN) A aaa B bbb
DS Implied
The Comparative Store Not instruction begins a new rung
or additional branch in a rung with a normally closed
3
HPP Used
comparative contact. The contact will be on when Aaaa <
Bbbb 4
A/B
Operand Data Type
aaa
DL06 Range
bbb
5
V-memory
Pointer p
V See memory map
See memory map
See memory map
See memory map 6
Constant K 09999
Timer
Counter
TA
CTA
0377
0177
7
8
In the following example, when the BCD value in V-memory location V2000 M 1000, Y3
will energize.
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
9
V2000 K1000 Y3
OUT
$
STR
B
SHFT

A
V

A
AND
C

A
2
A
0
A
0
A
0 10
ENT

11
1 0 0 0
GX D ENT
OUT 3

12
In the following example, when the value in V-memory location V2000 < 4050, Y3 will
13
energize.
14
DirectSOFT
A
DirectSOFT32 Handheld Programmer Keystrokes

V2000 K4050 Y3 SP SHFT V C A A A


STRN AND 2 0 0 0
OUT

GX
E
4
A

D
0
F

ENT
5
A
0
ENT
B
OUT 3

C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-29


Chapter 5: Standard RLL Instructions - Comparative Boolean

Or (OR)
1 DS
HPP
Implied
Used
The Comparative Or instruction connects a
normally open comparative contact in parallel A aaa B bbb
with another contact. The contact will be on
2 when Aaaa is equal to or greater than Bbbb.
Or Not (ORN)
3 DS Implied
The Comparative Or Not instruction connects a
HPP Used
normally closed comparative contact in parallel A aaa B bbb
4 with another contact. The contact will be on when
Aaaa < Bbbb.

5 Operand Data Type DL06 Range


A/B aaa bbb
6 V-memory V See memory map See memory map
Pointer p See memory map See memory map

7 Constant
Timer
K
TA

0377
09999

Counter CTA 0177


8
In the following example, when the BCD value in V-memory location V2000 = 6045 or
9 V2002 M 2345, Y3 will energize.

10 DirectSOFT
DirectSOFT32

V2000 K6045 Y3
Handheld Programmer Keystrokes

$ SHFT E C A A A
STR 4 2 0 0 0

11 OUT G

Q
6
A
0
E
4
F

V
5
C
ENT

A A C
V2002 K2345 SHFT
OR AND 2 0 0 2

12 C
2
D
3
E
4
F
5
ENT

GX D ENT

13
OUT 3

14 In the following example when the BCD value in V-memory location V2000 = 1000 or
A V2002 < 2500, Y3 will energize.
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
$ E C A A A

B
SHFT
V2000 K1000 Y3 STR 4 2 0 0 0
OUT B A A A ENT
1 0 0 0

C
R SHFT V C A A C
V2002 K2500 ORN AND 2 0 0 2
C F A A ENT
2 5 0 0

D GX
OUT
D
3
ENT

5-30 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Comparative Boolean

And (AND)
The Comparative And instruction connects a normally A aaa B bbb
DS
HPP
Implied
Used
open comparative contact in series with another contact.
The contact will be on when Aaaa is equal to or greater 1
than Bbbb.

And Not (ANDN) A aaa B bbb


2
DS Implied
The Comparative And Not instruction connects a
normally closed comparative contact in series with another 3
HPP Used contact. The contact will be on when Aaaa < Bbbb.
4
Operand Data Type DL06 Range

V-memory
A/B
V
aaa
See memory map
bbb
See memory map
5
Pointer p
Constant K
See memory map

See memory map
09999 6
Timer TA 0377
Counter CTA 0177 7
In the following example, when the value in BCD V-memory location V2000 = 5000, and
V2002 M 2345, Y3 will energize. 8
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
9
V2000 K5000 V2002 K2345 Y3
OUT
$

F
STR
SHFT

A
E

A
4
A
C

ENT
2
A
0
A
0
A
0 10
5 0 0 0
V

C
AND
D
SHFT

E
V

F
AND
C
2
A
0
A
0
C
2 11
ENT

12
2 3 4 5
GX D ENT
OUT 3

13
In the following example, when the value in V-memory location V2000 = 7000 and
V2002 < 2500, Y3 will energize. 14
DirectSOFT
A
DirectSOFT32 Handheld Programmer Keystrokes

$ SHFT E C A A A
V2000 K7000 V2002 K2500 Y3 STR 4 2 0 0 0
OUT H A A A

B
ENT
7 0 0 0
W SHFT V C A A C
ANDN AND 2 0 0 2

C
C F A A ENT
2 5 0 0
GX SHFT Y D ENT
OUT AND 3

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-31


Chapter 5: Standard RLL Instructions - Immediate Instructions

Immediate Instructions
Store Immediate (STRI)
1 The Store Immediate instruction begins a new rung or
DS Implied additional branch in a rung. The status of the contact will be X aaa
2 HPP Used the same as the status of the associated input point at the time
the instruction is executed. The image register is not updated.
3 Store Not Immediate (STRNI)
DS Implied The Store Not Immediate instruction begins a new rung or
4 HPP Used additional branch in a rung. The status of the contact will be
opposite the status of the associated input point at the time the
X aaa

5 instruction is executed. The image register is not update

6
7 Operand Data Type DL06 Range
aaa

8 Inputs X 0777

9 In the following example, when X1 is on, Y2 will energize.


DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

X1 Y2 $ SHFT I B ENT

10 OUT
GX
OUT
STR
C
8

2
ENT
1

11 In the following example, when X1 is off, Y2 will energize.


DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

12 X1 Y2
OUT
SP
STRN
SHFT I
8
B
1
ENT

GX C ENT

13
OUT 2

Or Immediate (ORI)
14 DS Implied The Or Immediate connects two contacts in parallel.
X aaa
HPP Used The status of the contact will be the same as the status
A of the associated input point at the time the instruction is
executed. The image register is not updated.
B Or Not Immediate (ORNI)
DS Implied The Or Not Immediate connects two contacts in parallel. X aaa
C HPP Used The status of the contact will be opposite the status of
the associated input point at the time the instruction is
D executed. The image register is not updated.

5-32 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Immediate Instructions

Operand Data Type DL06 Range


aaa
Inputs X 0777
1
In the following example, when X1 or X2 is on, Y5 will energize.
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
2
X1 Y5 $ B

3
ENT
OUT STR 1
Q SHFT I C ENT
X2 OR 8 2
GX F

4
ENT
OUT 5

In the following example, when X1 is on or X2 is off, Y5 will energize.


DirectSOFT32
DirectSOFT Y5
Handheld Programmer Keystrokes 5
X1 $ B ENT

6
OUT STR 1
R SHFT I C ENT
X2 ORN 8 2
GX F ENT

7
OUT 5

And Immediate (ANDI)


The And Immediate instruction connects two contacts 8
in series. The status of the contact will be the same as
DS
HPP
Implied
Used
the status of the associated input point at the time the
instruction is executed. The image register is not updated.
X aaa 9
And Not Immediate (ANDNI) 10
The And Not Immediate instruction connects two
DS Implied contacts in series. The status of the contact will be
opposite the status of the associated input point at the
X aaa 11
HPP Used
time the instruction is executed. The image register is not
updated. 12
Operand Data Type DL06 Range
aaa
13
Inputs X 0777
14
In the following example, when X1 and X2 are on, Y5 will energize.
DirectSOFT
DirectSOFT32
X1 X2 Y5
Handheld Programmer Keystrokes

$ B
A
ENT
STR 1

B
OUT
V SHFT I C ENT
AND 8 2
GX F ENT
OUT 5

In the following example, when X1 is on and X2 is off, Y5 will energize. C


DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

X1 X2 Y5

OUT
$

W
STR
B

I
1
ENT

C
D
SHFT ENT
ANDN 8 2
GX F ENT
OUT 5

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-33


Chapter 5: Standard RLL Instructions - Immediate Instructions

Out Immediate (OUTI)


The Out Immediate instruction reflects the status of the
1 DS
HPP
Used
Used
rung (on/off) and outputs the discrete (on/off) status to the
specified module output point and the image register at the
time the instruction is executed. If multiple Out Immediate
2 instructions referencing the same discrete point are used, it
Y aaa
OUTI
is possible for the module output status to change multiple
3 times in a CPU scan. See Or Out Immediate.

Or Out Immediate (OROUTI)


4 DS Used
The Or Out Immediate instruction has been designed to use
more than 1 rung of discrete logic to control a single output.
5 HPP Used
Multiple Or Out Immediate instructions referencing the
same output coil may be used, since all contacts controlling
Y aaa
6 the output are ored together. If the status of any rung is on
at the time the instruction is executed, the output will also be OROUTI
on.
7
8 Operand Data Type DL06 Range
aaa

9 Outputs Y 0777

In the following example, when X1 is on, output point Y2 on the output module will turn
10 on. For instruction entry on the Handheld Programmer, you can use the instruction number
(#350) as shown, or type each letter of the command.
11 DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

Y2
12
X1 $ B ENT
STR 1
OUTI
O D F A ENT ENT
INST# 3 5 0

13 C
2
ENT

14 In the following example, when X1 or X4 is on, Y2 will energize.


DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

A X1 Y2
$
STR
B
1
ENT

OR OUTI

B
O D F A ENT ENT
INST# 3 5 0
C ENT
X4 Y2 2

C OR OUTI $
STR
E
4
ENT

O D F A ENT ENT

D
INST# 3 5 0
C ENT
2

5-34 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Immediate Instructions

Out Immediate Formatted (OUTIF)


The Out Immediate Formatted instruction outputs a 132
DS
HPP
Used
Used
bit binary value from the accumulator to specified output
points at the time the instruction is executed. Accumulator
OUTIF
K bbb
Y aaa
1
bits that are not used by the instruction are set to zero.
2
Operand Data Type DL06 Range
aaa 3
Outputs Y 0-777
Constant K 1-32
4
In the following example, when C0 is on,the binary pattern for X10 X17 is loaded into the 5
accumulator using the Load Immediate Formatted instruction. The binary pattern in the
accumulator is written to Y30Y37 using the Out Immediate Formatted instruction. This
technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU
6
scan).
DirectSOFT
DirectSOFT 5
7
C0
LDIF
K8

Load the value of 8


X10 Location
X10
Constant
K8
X17 X16 X15 X14 X13 X12 X11 X10
ON OFF ON ON OFF ON OFF ON 8
Unused accumulator bits
consecutive locations into the

9
are set to zero
accumulator, starting with X10.

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1

OUTIF Y30
10
K8

Copy the value in the lower


8 bits of the accumulator to
Y30-Y37
Location
Y30
Constant
K8
Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
ON OFF ON ON OFF ON OFF ON
11
12
Handheld Programmer Keystrokes
13
$
STR
L
NEXT

D
NEXT

I
NEXT

F
NEXT A

B
0
ENT

A I
14
SHFT ENT

A
ANDST 3 8 5 1 0 8
GX SHFT I F D A I ENT
OUT 8 5 3 0 8

B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-35


Chapter 5: Standard RLL Instructions - Immediate Instructions

Set Immediate (SETI)


The Set Immediate instruction immediately sets, or
1 DS
HPP
Used
Used
turns on an output or a range of outputs in the image
register and the corresponding output point(s) at the
Y aaa aaa
time the instruction is executed. Once the outputs are
2 set, it is not necessary for the input to remain on. The SETI
Reset Immediate instruction can be used to reset the
3 outputs.

Reset Immediate (RSTI)


4 The Reset Immediate instruction immediately resets,
DS Used or turns off, an output or a range of outputs in the
5 HPP Used image register and the output point(s) at the time the
instruction is executed. Once the outputs are reset, it is
Y aaa
RSTI
aaa

not necessary for the input to remain on.


6
Operand Data Type DL06 Range
7 Ouputs Y
aaa
0777

8 In the following example, when X1 is on, Y2 through Y5 will be set on in the image register
9 and on the corresponding output points.

10 DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

$ B
X1 Y2 Y5 ENT
STR 1

11 SETI X
SET
SHFT I
8
C
2
F
5
ENT

12
13
In the following example, when X1 is on, Y5 through Y22 will be reset (off) in the image
14 register and on the corresponding output module(s).

A DirectSOFT
DirectSOFT32
Handheld Programmer Keystrokes
X1 Y5 Y22

B RSTI
$

S
STR

SHFT
B

I
1
ENT

F C C ENT
RST 8 5 2 2

C
D

5-36 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Immediate Instructions

Load Immediate (LDI)


The Load Immediate instruction loads a 16-bit V-memory value
DS
HPP
Used
Used
into the accumulator. The valid address range includes all input 1
point addresses on the local base. The value reflects the current LDI
status of the input points at the time the instruction is executed. This
instruction may be used instead of the LDIF instruction, which
V aaa
2
requires you to specify the number of input points.
3
Operand Data Type DL06 Range
aaa
4
Inputs V 40400-40437
5
In the following example, when C0 is on, the binary pattern of X0X17 will be loaded into
the accumulator using the Load Immediate instruction. The Out Immediate instruction
could be used to copy the 16 bits in the accumulator to output points, such as Y40Y57.
6
This technique is useful to quickly copy an input pattern to output points (without waiting
for a full CPU scan to occur). 7
8
DirectSOFT
DirectSOFT32
9
10
C0 LDI Location
X17 X16 X15 X14 X13 X12 X11 X10 X7 X6 X5 X4 X3 X2 X1 X0
V40400 V40400 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON

Load the inputs from X0 to


X17 into the accumulator,
immediately Unused accumulator bits
are set to zero
11
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

OUTI
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1
12
13
V40502

Output the value in the


accumulator to output points
Y40 to Y57 Location Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40
V40502 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
14
A
Handheld Programmer Keystrokes

$ NEXT NEXT NEXT NEXT A ENT


B
STR 0

SHFT L
ANDST
D
3
I
8
E
4
A
0
E
4
A
0
A
0
ENT C
GX I E A F A C

D
SHFT NEXT ENT
OUT 8 4 0 5 0 2

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-37


Chapter 5: Standard RLL Instructions - Immediate Instructions

Load Immediate Formatted (LDIF)


The Load Immediate Formatted instruction loads a 132 bit
1 DS
HPP
Used
Used
binary value into the accumulator. The value reflects the current LDIF
K bbb
X aaa
status of the input module(s) at the time the instruction is executed.
2 Accumulator bits that are not used by the instruction are set to zero.
Operand Data Type DL06 Range
3 aaa bbb
Inputs X 0-777 --

4 Constant K -- 1-32

5 In the following example, when C0 is on, the binary pattern of X10X17 will be loaded
into the accumulator using the Load Immediate Formatted instruction. The Out Immediate
Formatted instruction could be used to copy the specified number of bits in the accumulator
6 to the specified outputs on the output module, such as Y30Y37. This technique is useful to
quickly copy an input pattern to outputs (without waiting for the CPU scan).
7 DirectSOFT
DirectSOFT32

8 C0 LDIF
K8
X10
Location
X10
Constant

K8
X17 X16 X15 X14 X13 X12 X11 X10
ON OFF ON ON OFF ON OFF ON

Load the value of 8

9 consecutive location into the


accumulator starting with
X10
Unused accumulator bits
are set to zero
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

10
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1

OUTIF Y30

11 K8

Copy the value of the lower


Location Constant Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
ON OFF ON ON OFF ON OFF ON
8 bits of the accumulator to Y30 K8

12 Y30 - Y37

13 Handheld Programmer Keystrokes

14 $
STR
NEXT NEXT NEXT NEXT A
0
ENT

SHFT L D I F B A I ENT

A GX
OUT
ANDST

SHFT I
3

8
F
8

5
5
D
3
A
1

0
0
I
8
8

ENT

B
C
D

5-38 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Timer, Counter and Shift Register Instructions


Using Timers 1
Timers are used to time an event for a desired period. The single input timer will time as long
as the input is on. When the input changes from on to off, the timer current value is reset to 2
0. There is a tenth of a second and a hundredth of a second timer available with a maximum
time of 999.9 and 99.99 seconds respectively. There is a discrete bit associated with each
timer to indicate that the current value is equal to or greater than the preset value. The timing
3
diagram below shows the relationship between the timer input, associated discrete bit, current
value and timer preset. 4
5
Seconds
0 1 2 3 4 5 6 7 8 X1
TMR T1
X1 K30

T1
Timer Preset
6
T1 Y0

Current
Value
0 10 20 30
1/10 Seconds
40 50 60 0
OUT
7
There are those applications that need an accumulating timer, meaning it has the ability
to time, stop, and then resume from where it previously stopped. The accumulating timer
8
works similarly to the regular timer, but two inputs are required. The enable input starts and
stops the timer. When the timer stops, the elapsed time is maintained. When the timer starts 9
again, the timing continues from the elapsed time. When the reset input is turned on, the
elapsed time is cleared and the timer will start at 0 when it is restarted. There is a tenth of a
second and a hundredth of a second timer available with a maximum time of 9999999.9 and
10
999999.99 seconds respectively. The timing diagram below shows the relationship between
the timer input, timer reset, associated discrete bit, current value and timer preset. 11
0 1 2 3
Seconds
4 5 6 7 8 X1
TMRA T0
12
13
K30
X1 Enable

X2
X2

Reset Input
14
T0

Current
Value
0 10 10 20 30 40 50 0
A
1/10 Seconds

NOTE: Decimal points are not used in these timers, but the decimal point is implied. The preset and
B
current value for all four timers is in BCD format.
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-39


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Timer (TMR) and Timer Fast (TMRF)


The Timer instruction is a 0.1 second single input timer that times to a maximum of 999.9
1 DS
HPP
Used
Used
seconds. The Timer Fast instruction is a 0.01 second single
input timer that times up to a maximum of 99.99 seconds.
TMR
B bbb
T aaa

These timers will be enabled if the input logic is true (on) and
2 will be reset to 0 if the input logic is false (off). Both timers
use single word BCD values for the preset and current value. Preset Timer#

3 The decimal place is implied.


Instruction Specifications
4 Timer Reference (Taaa): Specifies the timer number.
TMRF T aaa
Preset Value (Bbbb): Constant value (K) or a V-memory B bbb
5 location specified in BCD.
Current Value: Timer current values, in BCD format,
6 are accessed by referencing the associated V or T memory
location*. For example, the timer current value for T3
Preset Timer#

physically resides in V-memory location V3.


7 Discrete Status Bit: The discrete status bit is referenced by the associated T memory location.
Operating as a timer done bit, it will be on if the current value is equal to or greater than
8 the preset value. For example, the discrete status bit for Timer 2 is T2.

9 NOTE: A V-memory preset is required only if the ladder program or an Operator Interface unit must
change the preset.

10 Operand Data Type DL06 Range


A/B aaa bbb
11 Timers T 0777
400-677
12007377
12 V-memory for preset values V 74007577
10000-17777

13 Pointers (preset only) P


400-677
12007377
74007577*
10000-17777
14 Constants (preset only) K 09999
Timer discrete status bits T/V 0377 or V4110041117

A Timer current values V /T** 0377

NOTE: *May be non-volatile if MOV instruction is used.


B ** With the HPP, both the Timer discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as T2 for discrete status bit for Timer
C T2, and TA2 for the current value of Timer T2.

You can perform functions when the timer reaches the specified preset using the discrete
D status bit. Or, use comparative contacts to perform functions at different time intervals, based
on one timer. The examples on the following page show these two methods of programming
timers.

5-40 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Timer Example Using Discrete Status Bits


In the following example, a single input timer is used with a preset of 3 seconds. The timer
discrete status bit (T2) will turn on when the timer has timed for 3 seconds. The timer is reset 1
when X1 turns off, turning the discrete status bit off and resetting the timer current value to
0. 2
Timer Example Using Comparative Contacts
DirectSOFT
Direct SOFT32
In the following example, a single input timer is used with a preset of 4.5 seconds.
Timing Diagram
3
4
X1 Seconds
TMR T2 0 1 2 3 4 5 6 7 8
K30

X1
T2 Y0

OUT
T2
5
6
Y0
Handheld Programmer Keystrokes
Current 0 10 20 30 40 50 60 0
$ B ENT Value
STR 1
N C D A
1/10th Seconds
7
ENT
TMR 2 3 0
$ SHFT T C ENT
STR MLR 2
GX A

8
ENT
OUT 0

Comparative contacts are used to energize Y3, Y4, and Y5 at one second intervals respectively.
When X1 is turned off, the timer will be reset to 0 and the comparative contacts will turn off
Y3, Y4, and Y5. 9
10
DirectSOFT
11
Direct SOFT32 Timing Diagram
X1 Seconds
TMR T20
K45 0 1 2 3 4 5 6 7 8

12
Y3 X1
TA20 K10
OUT
Y3

13
TA20 K20 Y4 Y4
OUT
Y5

Y5

14
TA20 K30
T2
OUT
Current 0 10 20 30 40 50 60 0
Value

1/10th Seconds
A
Handheld Programmer Keystrokes

$ B ENT
STR 1

B
N C A E F ENT
TMR 2 0 4 5
$ SHFT T C A B A ENT
STR MLR 2 0 1 0
GX D

C
ENT
OUT 3
$ SHFT T C A C A ENT
STR MLR 2 0 2 0
GX E ENT

D
OUT 4
$ SHFT T C A D A ENT
STR MLR 2 0 3 0
GX F ENT
OUT 5

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-41


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions
Accumulating Timer (TMRA)
DS Used
The Accumulating Timer is a 0.1 second two input timer that Enable TMRA T aaa
will time to a maximum of 9999999.9. The TMRA uses two timer
1 HPP Used
registers in V-memory. Reset
B bbb

2 DS
Accumulating Fast Timer (TMRAF)
Used
The Accumulating Fast Timer is a 0.01 second two-input timer thatPreset Timer#
will time to a maximum of 99999.99. The TMRA uses two timer
3 HPP Used
registers in V-memory.
Each timer uses two timer registers in V-memory. The preset and Enable TMRAF T aaa

4 current values are in double word BCD format, and the decimal B bbb

point is implied. These timers have two inputs, an enable and a Reset

5 reset. The timer starts timing when the enable is on and stops when
the enable is off (without resetting the count). The reset will reset
Preset Timer#
the timer when on and allow the timer to time when off.
6 Timer Reference (Taaa): Specifies the timer number.

7 Preset Value (Bbbb): Constant value (K) or V-memory.


Current Value: Timer current values are accessed by referencing the associated V or T
memory location*. For example, the timer current value for T3 resides in V-memory, V3.
8 Discrete Status Bit: The discrete status bit is accessed by referencing the associated T
memory location. Operating as a timer done bit, it will be on if the current value is equal to
9 or greater than the preset value. For example, the discrete status bit for timer 2 would be T2.

10 NOTE: The accumulating timer uses two consecutive V-memory locations for the 8-digit value,
therefore two consecutive timer locations. For example, if TMRA T1 is used, the next available timer
number is T3.
11 NOTE: A V-Memory preset is required if the ladder program or an OIP must be used to change the
preset.
12
Operand Data Type DL06 Range
13
Timers
A/B
T
aaa
0777
bbb

14 V-memory for preset values V


400-677
12007377
74007577
10000-17777
A Pointers (preset only) P
400-677
12007377
74007577*
B Constants (preset only) K
10000-17777
099999999
Timer discrete status bits T/V 0377 or V4110041117
C Timer current values V /T** 0377

D NOTE: *May be non-volatile if MOV instruction is used.


** With the HPP, both the Timer discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as T2 for discrete status bit for Timer
T2, and TA2 for the current value of Timer T2.

5-42 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Accumulating Timer Example using Discrete Status Bits


In the following example, a two input timer (accumulating timer) is used with a preset of
3 seconds. The timer discrete status bit (T6) will turn on when the timer has timed for 3 1
seconds. Notice, in this example, that the timer times for 1 second, stops for one second, then
resumes timing. The timer will reset when C10 turns on, turning the discrete status bit off
and resetting the timer current value to 0.
2
Direct SOFT32 Timing Diagram
3
4
X1 Seconds
0 1 2 3 4 5 6 7 8
TMRA T6

X1
K30
C10

5
C10

Y7 T6
T6
OUT Current 0 10 10 20 30 40 50 0

6
Value

Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)

$ B ENT D A ENT

7
STR 1 3 0
$ SHFT C B A ENT $ SHFT T G ENT
STR 2 1 0 STR MLR 6
N SHFT A G GX B A ENT
TMR 0 6 OUT 1 0

8
Accumulator Timer Example Using Comparative Contacts
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energized Y3, Y4, and Y5 at one second intervals
9
respectively. The comparative contacts will turn off when the timer is reset.
DirectSOFT
Contacts
10
Timing Diagram

11
X1
Seconds
TMRA T20 0 1 2 3 4 5 6 7 8

K45 X1
C10

TA20 K10 TA21 K0 Y3


C10

Y3
12
OUT

TA21 K1
Y4

Y5
13
Y4

14
TA20 K20 TA21 K0 T20
OUT
Current 0 10 10 20 30 40 50 0
TA21 K1 Value
1/10 Seconds

TA20 K30 TA21 K1 Y5

OUT
A
Handheld Programmer Keystrokes

$
STR
B
1
ENT
Handheld Programmer Keystrokes (contd)

$
STR
SHFT T
MLR
C
2
A
0
C
2
A
0
ENT
B
C
$ C B A V E T C B A
SHFT ENT SHFT SHFT ENT
STR 2 1 0 AND 4 MLR 2 1 0
N A C A E F Q E T C B B
SHFT ENT SHFT SHFT ENT
TMR 0 2 0 4 5 OR 4 MLR 2 1 1
$ T C A B A GX E

D
SHFT ENT ENT
STR MLR 2 0 1 0 OUT 4
V E T C B A $ T C A D A
SHFT SHFT ENT SHFT ENT
AND 4 MLR 2 1 0 STR MLR 2 0 3 0
Q E T C B B V E T C B B
SHFT SHFT ENT SHFT SHFT ENT
OR 4 MLR 2 1 1 AND 4 MLR 2 1 1
GX D ENT GX F ENT
OUT 3 OUT 5

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-43


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Using Counters
Counters are used to count events . The counters available are up counters, up/down
1 counters, and stage counters (used with RLLPLUS programming).
The up counter (CNT) has two inputs, a count input and a reset input. The maximum count
2 value is 9999. The timing diagram below shows the relationship between the counter input,
counter reset, associated discrete bit, current value, and counter preset. The CNT counter
3 preset and current value are bothe single word BCD values.
X1
CNT CT1

4 X1

X2
X2
Up K3

5 CT1
Reset

Current 1 2 3 4 0 Counter preset


6 alue
Counts

The up down counter (UDC) has three inputs, a count up input, count down input and
7 reset input. The maximum count value is 99999999. The timing diagram below shows the
relationship between the counter up and down inputs, counter reset, associated discrete
8 bit, current value, and counter preset. The UDC counter preset and current value are both
double word BCD values.

9 NOTE: The UDC uses two consecutive V-memory locations for the 8-digit value, therefore, two
consecutive timer locations. For example, if UDC CT1 is used, the next available counter number is
10 CT3.
X1
UDC CT2

11
X1
Up K3

X2 X2

12 X3
X3
Down

CT2
Reset
13 Current
Value
1 2 1
Counts
2 3 0

Counter Preset

14 The stage counter (SGCNT) has a count input and is reset by the RST instruction. This
instruction is useful when programming using the RLLPLUS structured programming. The
A maximum count value is 9999. The timing diagram below shows the relationship between
the counter input, associated discrete bit, current value, counter preset and reset instruction.
B
X1 X1

C
SGCNT CT2
K3
CT2

D Current
Value
RST
1 2
Counts
3 4 0
Counter preset

CT2

5-44 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions
Counter (CNT)
The Counter is a two-input counter that increments when the
DS
HPP
Used
Used
count input logic transitions from Off to On. When the counter
reset input is On, the counter resets to 0. When the current value 11
equals the preset value, the counter status bit comes On and the Counter#
counter continues to count up to a maximum count of 9999. The
maximum value will be held until the counter is reset.
22
Count CNT CT aaa
Instruction Specifications B bbb
33
Counter Reference (CTaaa): Specifies the counter number. Reset
Preset Value (Bbbb): Constant value (K) or a V-memory location. 44
Current Values: Counter current values are accessed by Preset
referencing the associated V or CT memory locations.* The
V-memory location is the counter location + 1000. For example,
55
the counter current value for CT3 resides in V-memory location
V1003. 66
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT
memory location. It will be On if the value is equal to or greater than the preset value. For
77
example the discrete status bit for counter 2 would be CT2.
88
99
NOTE: A V-memory preset is required if the ladder program or OIP must change the preset. 10
10
Operand Data Type DL06 Range
11
11
aaa bbb

Counters
A/B
CT 0177 12
400-677
V-memory (preset only) V 12007377
74007577 13
10000-17777

Pointers (preset only) P


400-677
12007377
14
14
74007577*

Constants (preset only) K


10000-17777
09999
AA
Counter discrete status bits CT/V 0177 or V4114041147
Counter current values V /CT** 1000-1177 BB
NOTE: *May be non-volatile if MOV instruction is used. CC
** With the HPP, both the Counter discrete status bits and current value are accessed with the
same data reference. DirectSOFT uses separate references, such as CT2 for discrete status bit for
Counter CT2, and CTA2 for the current value of Counter CT2.
DD

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-45


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Counter Example Using Discrete Status Bits


In the following example, when X1 makes an Off-to-On transition, counter CT2 will
1 increment by one. When the current value reaches the preset value of 3, the counter status bit
CT2 will turn on and energize Y7. When the reset C10 turns on, the counter status bit will
turn off and the current value will be 0. The current value for counter CT2 will be held in
2 V-memory location V1002.

3 DirectSOFT
DirectSOFT32

X1
Counting diagram

CNT CT2

4 C10
K3
X1

C10

5 CT2 Y7

OUT
CT2 or
Y7
Current Value 1 2 3 4 0

6 Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)

$ B ENT $ SHFT C SHFT T C ENT

7
STR 1 STR 2 MLR 2
$ SHFT C B A ENT GX B A ENT
STR 2 1 0 OUT 1 0
GY C D

8
ENT
CNT 2 3

Counter Example Using Comparative Contacts


9 In the following example, when X1 makes an Off-to-On transition, counter CT2 will
increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at different
10 counts. When the reset C10 turns on, the counter status bit will turn off and the counter
current value will be 0, and the comparative contacts will turn off.

11 DirectSOFT
DirectSOFT32 Counting diagram

12 X1
CNT CT2
X1
K3

13
C10
C10

CTA2 K1 Y3 Y3

14
OUT
Y4

CTA2 K2 Y4
Y5
OUT

A CTA2 K3 Y5

OUT
Current
Value
1 2 3 4 0

B Handheld Programmer Keystrokes

$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)

$
STR
SHFT C
2
SHFT T
MLR
C
2

C $

GY
CNT
STR
C
SHFT

2
C
2
B

D
1

3
A

ENT
0
ENT

GX
OUT
C
2
ENT

E
4
ENT

D
$ SHFT C SHFT T C $ SHFT C SHFT T C
STR 2 MLR 2 STR 2 MLR 2
B ENT D ENT
1 3
GX D ENT GX F ENT
OUT 3 OUT 5

5-46 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions
Stage Counter (SGCNT)
The Stage Counter is a single input counter that
increments when the input logic transitions from off
DS
HPP
Used
Used
to on. This counter differs from other counters since
Counter#
1
it will hold its current value until reset using the RST SGCNT CT aaa
instruction. The Stage Counter is designed for use in
RLLPLUS programs but can be used in relay ladder
B bbb 2
logic programs. When the current value equals the
preset value, the counter status bit turns on and the
Preset
3
counter continues to count up to a maximum count
of 9999. The maximum value will be held until the
counter is reset.
4
Instruction Specifications
Counter Reference (CTaaa): Specifies the counter number.
5
Preset Value (Bbbb): Constant value (K) or a V-memory location.
Current Values: Counter current values are accessed by referencing the associated V or CT
6
memory locations*. The V-memory location is the counter location + 1000. For example, the
counter current value for CT3 resides in V-memory location V1003. 7
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT
memory location. It will be on if the value is equal to or greater than the preset value. For 8
example, the discrete status bit for counter 2 would be CT2.

NOTE: In using a counter inside a stage, the stage must be active for one scan before the input to the
9
counter makes a 0-1 transition. Otherwise, there is no real transition and the counter will not count.
10
NOTE: A V-memory preset is required only if the ladder program or an Operator Interface unit must
change the preset. 11

Operand Data Type
A/B aaa
DL06 Range
bbb
12
Counters CT 0177
400-677
12007377
13
V-memory (preset only) V 74007577
10000-17777
400-677
14
12007377
Pointers (preset only) P 74007577*
10000-17777
A
Constants (preset only) K 09999
Counter discrete status bits CT/V 0177 or V4114041147 B
Counter current values V /CT** 1000-1177
C
NOTE: *May be non-volatile if MOV instruction is used.
** With the HPP, both the Counter discrete status bits and current value are accessed with the
same data reference. DirectSOFT uses separate references, such as CT2 for discrete status bit for
D
Counter CT2, and CTA2 for the current value of Counter CT2.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-47


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions
Stage Counter Example Using Discrete Status Bits
In the following example, when X1 makes an off-to-on transition, stage counter CT7 will
increment by one. When the current value reaches 3, the counter status bit CT7 will turn on
1 and energize Y7. The counter status bit CT7 will remain on until the counter is reset using
the RST instruction. When the counter is reset, the counter status bit will turn off and the
2 counter current value will be 0. The current value for counter CT7 will be held in V-memory
location V1007.

3
DirectSOFT
DirectSOFT32 Counting diagram
X1
SGCNT CT7
X1
K3

4 CT7 Y7

OUT
Y7
Current
Value
1 2 3 4 0

C5 CT7 RST

5 Handheld Programmer Keystrokes


RST CT7

Handheld Programmer Keystrokes (cont)

6
$ B ENT GX B A ENT
STR 1 OUT 1 0

SHFT S SHFT G SHFT GY $ SHFT C F ENT


RST 6 CNT STR 2 5

7
H D ENT S SHFT C SHFT T H ENT
7 3 RST 2 MLR 7
$ SHFT C SHFT T H ENT
STR 2 MLR 7

8
9
10 Stage Counter Example Using Comparative Contacts
In the following example, when X1 makes an off-to-on transition, counter CT2 will
increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at different
11 counts. Although this is not shown in the example, when the counter is reset using the Reset
instruction, the counter status bit will turn off and the current value will be 0. The current
12 DirectSOFT
DirectSOFT32 value for counter CT2 will be held in V-memory
X1
location
Counting

SGCNT
diagram V1002 (CTA2).

CT2

13
K10
X1

CTA2 K1 Y3
Y3
OUT

14 CTA2 K2 Y4

OUT
Y4

Y5

A CTA2 K3 Y5

OUT
Current
Value

RST
1 2 3 4 0

CT2

B Handheld Programmer Keystrokes

$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)

$
STR
SHFT C
2
SHFT T
MLR
C
2

C SHFT

C
2
S
RST
G

B
6

1
SHFT

A
0
GY
CNT

ENT GX
OUT
C
2
E
ENT

4
ENT

D
$ SHFT C SHFT T C $ SHFT C SHFT T C
STR 2 MLR 2 STR 2 MLR 2
B ENT D ENT
1 3
GX D ENT GX F ENT
OUT 3 OUT 5

5-48 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions
Up Down Counter (UDC)
CT aaa
This Up/Down Counter counts up on each off to on Up UDC
B bbb
transition of the Up input and counts down on each
DS
HPP
Used
Used
off-to-on transition of the Down input. The counter is
reset to 0 when the Reset input is on. The count range is
Down
Counter # 1
099999999. The count input not being used must be
off in order for the active count input to function.
Reset
Preset 2
Instruction Specification
Counter Reference (CTaaa): Specifies the counter
Caution:
Caution:TheThe
locations
V memory
UDCUDCuses uses
for locations
two V-memory
the 8 digit for
two
current
the value.
8 digit
3
number. This means
current that the
value. ThisUDC usesthat
means two the
Preset Value (Bbbb): Constant value (K) or two
consecutive
UDC uses counter
CT1 is used
counter
locations. If UDC
two consecutive
in the program,
locations. If UDCtheCT1nextis
4
consecutive V-memory locations, in BCD. used in counter
available the program,
is CT3.the next
Current Values: Current count is a double word value available counter is CT3. 5
accessed by referencing the associated V or CT memory
locations* in BCD. The V-memory location is the counter location + 1000. For example, the
counter current value for CT5 resides in V-memory location V1005 and V1006.
6
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT
memory location. Operating as a counter done bit it will be on if the value is equal to or
7
greater than the preset value. For example the discrete status bit for counter 2 would be CT2.
8
9
NOTE: The UDC uses two consecutive V-memory locations for the 8-digit value, therefore two
consecutive timer locations. For example, if UDC CT1 is used, the next available counter number is
CT3.
10
NOTE: A V-memory preset is required only if the ladder program or an Operator Interface unit must
change the preset. 11
Operand Data Type DL06 Range 12
A/B aaa bbb
Counters CT 0177 13
400-677
V-memory (preset only) V 12007377
74007577
10000-17777
14
Pointers (preset only) P
400-677
12007377*
74007577
A
10000-17777
Constants (preset only) K 099999999 B
Counter discrete status bits CT/V 0177 or V4114041147
Counter current values V /CT** 1000-1177 C
NOTE: *May be non-volatile if MOV instruction is used.
** With the HPP, both the Counter discrete status bits and current value are accessed with the D
same data reference. DirectSOFT uses separate references, such as CT2 for discrete status bit for
Counter CT2, and CTA2 for the current value of Counter CT2.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-49


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Up / Down Counter Example Using Discrete Status Bits


In the following example, if X2 and X3 are off, the counter will increment by one when X1
1 toggles from Off to On . If X1 and X3 are off, the counter will decrement by one when X2
toggles from Off to On. When the count value reaches the preset value of 3, the counter
status bit will turn on. When the reset X3 turns on, the counter status bit will turn off and
2 the current value will be 0.

3 DirectSOFT
DirectSOFT32
X1
Counting Diagram

UDC CT2

4 X2
K3 X1

X2

5
X3
X3

CT2
CT2 Y7

6 OUT
Current
Value
1 2 1 2 3 0

Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)

7 $

$
STR
B

C
1
ENT

ENT $
D
3

SHFT
ENT

C SHFT T C ENT
STR 2 STR 2 MLR 2

8 $

SHFT
STR
U
ISG
D

D
3

3
ENT

C
2
C
2
GX
OUT
B
1
A
0
ENT

9 Up / Down Counter Example Using Comparative Contacts


10 In the following example, when X1 makes an off-to-on transition, counter CT2 will
increment by one. Comparative contacts are used to energize Y3 and Y4 at different counts.
When the reset (X3) turns on, the counter status bit will turn off, the current value will be 0,
11 and the comparative contacts will turn off.
DirectSOFT
DirectSOFT32 Counting Diagram

12
X1
UDC CT2
V2000 X1
X2

13
X2

X3
X3

14 CTA2 K1 Y3 Y3
OUT

Y4
Y4

A
CTA2 K2 Current 1 2 3 4 0
Value
OUT

Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)

B $

$
STR

STR
B

C
1

2
ENT

ENT GX
OUT
B
1
ENT

D
3
ENT

C
$ D ENT $ SHFT C SHFT T C
STR 3 STR 2 MLR 2

SHFT U D C C C ENT
ISG 3 2 2 2
V C A A A GX E

D
SHFT ENT ENT
AND 2 0 0 0 OUT 4
$ SHFT C SHFT T C
STR 2 MLR 2

5-50 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions

Shift Register (SR)


The Shift Register instruction shifts data through a
DS
HPP
Used
Used predefined number of control relays. The control ranges in DATA SR 1
the shift register block must start at the beginning of an 8 bit
boundary and must use 8-bit blocks.
CLOCK
From A aaa 2
The Shift Register has three contacts.
Data determines the value (1 or 0) that will enter the register To B bbb 3
Clock shifts the bits one position on each low to high RESET
transition
Reset resets the Shift Register to all zeros.
4
With each off-to-on transition of the clock input, the bits which make up the shift register
5
block are shifted by one bit position and the status of the data input is placed into the starting
bit position in the shift register. The direction of the shift depends on the entry in the From 6
and To fields. From C0 to C17 would define a block of sixteen bits to be shifted from left to
right. From C17 to C0 would define a block of sixteen bits to be shifted from right to left.
The maximum size of the shift register block depends on the number of available control
7
relays. The minimum block size is 8 control relays.
8
Operand Data Type DL06 Range

Control Relay
A/B
C
aaa
01777
bbb
01777
9
DirectSOFT
Direct SOFT 5 Handheld Programmer Keystrokes
10
X1
Data Input SR
$

$
STR
B

C
1
ENT

ENT
11
STR 2

12
From C0
X2 $ D
Clock Input ENT
STR 3

SHFT S SHFT R SHFT A


To C17

13
X3 RST ORN 0
Reset Input
B H ENT
1 7

Inputs on Successive Scans


Data Clock Reset
Shift Register Bits 14
C0 C17
1 0-1-0 0
A
0 0-1-0 0
0 0-1-0 0 B
1 0-1-0 0
0 0-1-0 0 C
0 0 1
Indicates Indicates
D
ON OFF

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-51


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Accumulator/Stack Load and Output Data Instructions


1 Using the Accumulator
The accumulator in the DL06 internal CPUs is a 32-bit register which is used as a temporary
2 storage location for data that is being copied or manipulated in some manner. For example,
you have to use the accumulator to perform math operations such as add, subtract, multiply,
3 etc. Since there are 32 bits, you can use up to an 8-digit BCD number. The accumulator is
reset to 0 at the end of every CPU scan.

4 Copying Data to the Accumulator


The Load and Out instructions and their variations are used to copy data from a V-memory
5 location to the accumulator, or to copy data from the accumulator to V-memory. The
following example copies data from V-memory location V2000 to V-memory location
V2010.
6 X1 LD
V2000
8 9 3 5

7 V2000

Copy data from V2000 to the


Unused accumulator bits
are set to zero
lower 16 bits of the accumu-

8 lator
Acc. 0 0 0 0 88 99 33 55

9 OUT
V2010 8 9 3 5

10 Copy data from the lower 16 bits


of the accumulator to V2010
V2010

11 Since the accumulator is 32 bits and V-memory locations are 16 bits, the Load Double and
Out Double (or variations thereof) use two consecutive V-memory locations or 8 digit BCD
12 constants to copy data either to the accumulator from a V-memory address or from a
V-memory address to the accumulator. For example, if you wanted to copy data from V2000
13 and V2001 to V2010 and V2011 the most efficient way to perform this function would be as
follows:

14 X1
LDD V2001 V2000
V2000 6 7 3 9 5 0 2 6

A Copy data from V2000 and


V2001 to the accumulator

B Acc. 6 7 3 9 55 00 22 66

C OUTD
V2010 6 7 3 9 5 0 2 6

D
Copy data from the accumulator to
V2010 and V2011 V2011 V2010

5-52 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Changing the Accumulator Data


Instructions that manipulate data also use the accumulator. The result of the manipulated
data resides in the accumulator. The data that was being manipulated is cleared from the 1
accumulator. The following example loads the constant value 4935 into the accumulator,
shifts the data right 4 bits, and outputs the result to V2010. 2
X1 LD Constant 4 9 3 5
3
4
K4935

Load the value 4935 into the


accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0

The upper 16 bits of the accumulator


will be set to 0
0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1
5
Shifted out of
accumulator
6
SHFR
K4 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
8
0
7
1
6 5
0 0
4 3
1 0
2
0
1
1
0
1 7
Shift the data in the accumulator
4 bits (K4) to the right
8
OUT
V2010

Output the lower 16 bits of the ac-


cumulator to V2010
0 4 9 3 9
V2010

10
Some of the data manipulation instructions use 32 bits. They use two consecutive V-memory 11
locations or an 8 digit BCD constant to manipulate data in the accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into 12
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
13
X1
LDD 6
V2001
7 3 9 5
V2000
0 2 6
14
V2000

Load the value in V2000 and


V2001 into the accumulator
A
(Accumulator)

B
6 7 3 9 5 0 2 6
ADDD
+ 2 0 0 0 4 0 4 6 (V2006&V2007)
V2006
Acc. 8 7 3 9 9 0 7 2
Add the value in the
accumulator with the value
in V2006 and V2007 C
OUTD
V2010

Copy the value in the


accumulator to V2010 and
8 7 3

V2011
9 9 0

V2010
7 2
D
V2011

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-53


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Using the Accumulator Stack


The accumulator stack is used for instructions that require more than one parameter to
1 execute a function or for user-defined functionality. The accumulator stack is used when
more than one Load instruction is executed without the use of an Out instruction. The first
2 load instruction in the scan places a value into the accumulator. Every Load instruction
thereafter without the use of an Out instruction places a value into the accumulator and
the value that was in the accumulator is placed onto the accumulator stack. The Out
3 instruction nullifies the previous load instruction and does not place the value that was in the
accumulator onto the accumulator stack when the next load instruction is executed. Every
4 time a value is placed onto the accumulator stack the other values in the stack are pushed
down one location. The accumulator is eight levels deep (eight 32-bit registers). If there is a
5 value in the eighth location when a new value is placed onto the stack, the value in the eighth
location is pushed off the stack and cannot be recovered.

6 X1 LD
K3245
Constant

Current Acc. value


3 2 4 5

Accumulator Stack

7
Load the value 3245 into the accumu- Acc. 0 0 0 0 3 2 4 5
lator Level 1 X X X X X X X X
Previous Acc. value X X X X X X X
Level 2 X X X X X X X X
X X X X X X X
Acc. X X X X X
X X X X
Level 3 X X X X X X X X

8 Level 4
Level 5
Level 6
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

9
Constant 5 1 5 1 Level 7 X X X X X X X X
LD
K5151 Level 8 X X X X X X X X
Current Acc. value

Load the value 5151 into the accumu- Acc. 0 0 0 0 55 1 5 1


Bucket

10
lator, pushing the value 3245 onto the Accumulator Stack
stack Previous Acc. value

Acc. 0 0 0 0 33 22 44 55 Level 1 0 0 0 0 3 2 4 5
Level 2 X X X X X X X X
Level 3 X X X X X X X X

11 Level 4
Level 5
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Level 6 X X X X X X X X

12 LD
K6363
Constant

Current Acc. value


6 3 6 3 Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

Acc. 0 0 0 0 66 33 66 33

13 Load the value 6363 into the accumu-


lator, pushing the value 5151 to the 1st
stack location and the value 3245 to
the 2nd stack location
Previous Acc. value

Acc. 0 0 0 0 55 1 5 1 Level 1 0
Accumulator Stack

0 0 0 5 1 5 1
Bucket

Level 2 0 0 0 0 3 2 4 5

14
0 0 0 0
Level 3 X X X X X X X X
Level 4 X X X X X X X X
Level 5 X X X X X X X X

A Level 6
Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

B Bucket

The POP instruction rotates values upward through the stack into the accumulator. When a
C POP is executed, the value which was in the accumulator is cleared and the value that was on
top of the stack is in the accumulator. The values in the stack are shifted up one position in
D the stack.

5-54 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

1
X1 POP Previous Acc. value

Acc. X X X X XX XX XX X

Current Acc. value Accumulator Stack


POP the 1st value on the stack into the

2
accumulator and move stack values Level 1 0 0 0 0 3 7 9 2
Acc. 0 0 0 0 44 55 4 5
up one location
Level 2 0 0 0 0 7 9 3 0
Level 3 X X X X X X X X

3
Level 4 X X X X X X X X
Level 5 X X X X X X X X
OUT
V2000 4 5 4 5 Level 6 X X X X X X X X
V2000

4
Level 7 X X X X X X X X
Copy data from the accumulator to Level 8 X X X X X X X X
V2000

5
POP Previous Acc. value

Acc. 0 0 0 0 44 55 44 55

Current Acc. value Accumulator Stack


POP the 1st value on the stack into the
accumulator and move stack values
up one location
Acc. 0 0 0 0 33 77 99 22 Level 1
Level 2
Level 3
0
X
X
0
X
X
0
X
X
0
X
X
7
X
X
9
X
X
3
X
X
0
X
X
6
7
Level 4 X X X X X X X X
Level 5 X X X X X X X X
OUT
V2001 3 7 9 2 Level 6 X X X X X X X X
V2001
Level 7 X X X X X X X X
Copy data from the accumulator to
V2001.
Level 8 X X X X X X X X
8
Previous Acc. value
POP
Acc. 0 0 0

Current Acc. value


0 33 47 69 02

Accumulator Stack
9
POP the 1st value on the stack into the
Acc. X X X X 77 99 33 00 Level 1 X X X X X X X X

10
accumulator and move stack values
up one location Level 2 X X X X X X X X
Level 3 X X X X X X X X
Level 4 X X X X X X X X

OUT
V2002
V2002 7 9 3 0
Level 5
Level 6
Level 7
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
11
12
Copy data from the accumulator to Level 8 X X X X X X X X
V2002

Using Pointers 13
Many of the DL06 series instructions will allow V-memory pointers as operands
(commonly known as indirect addressing). Pointers allow instructions to obtain data from 14
V-memory locations referenced by the pointer value.

NOTE: DL06 V-memory addressing is in octal. However, the pointers reference a V-memory
A
location with values viewed as HEX. Use the Load Address (LDA) instruction to move an
address into the pointer location. This instruction performs the Octal to Hexadecimal conversion B
automatically.

In the following example we are using a pointer operand in a Load instruction. V-memory C
location 2000 is being used as the pointer location. V2000 contains the value 440 which
the CPU views as the Hex equivalent of the Octal address V-memory location V2100. The D
CPU will copy the data from V2100, which (in this example) contains the value 2635, into
the lower word of the accumulator.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-55


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

1 X1 LD
P2000
V2076
V2077
X
X
X
X
X
X
X
X

2
V2100 2 6 3 5
V2000 (P2000) contains the value 440 V2101 X X X X
HEX. 440 HEX. = 2100 Octal which
contains the value 2635. V2102 X X X X

3
V2000 V2103 X X X X
Accumulator
0 4 4 0 V2104 X X X X
2 6 3 5
V2105 X X X X

4
OUT
V2200

Copy the data from the lower 16 bits of

5 the accumulator to V2200. V2200 2 6 3 5


V2201 X X X X

6
7 The following example is identical to the one above, with one exception. The LDA (Load
Address) instruction automatically converts the Octal address to Hex.

8
9
X1 LDA Load the lower 16 bits of the

10
accumulator with Hexadecimal
O 2100 equivalent to Octal 2100 (440) 2 1 0 0

2100 Octal is converted to Hexadecimal


Unused accumulator bits 440 and loaded into the accumulator
are set to zero

11 Acc. 0 0 0 0 00 44 44 00

12 OUT
V 2000
Copy the data from the lower 16 bits of
the accumulator to V2000 0 4
V2000
4 0

13
V2076 X X X X

14 LD V2000 (P2000) contains the value 440


Hex. 440 Hex. = 2100 Octal which
V2077
V2100
X
2
X
6
X
3
X
5

P 2000 V2101 X X X X

A
contains the value 2635
V2102 X X X X
V2100 V2103 X X X X
Accumulator
0 4 4 0 V2104 X X X X

B V2105 X X X X 0 0 0 0 22 66 33 55

Copy the data from the lower 16 bits of

C
OUT
the accumulator to V2200 V2200 2 6 3 5
V 2200
V2201 X X X X

5-56 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Load (LD)
The Load instruction is a 16 bit instruction that loads the
DS
HPP
Used
Used
value (Aaaa), which is either a V-memory location or a 4 digit LD
A aaa
1
constant, into the lower 16 bits of the accumulator. The upper
16 bits of the accumulator are set to 0. 2
Operand Data Type DL06 Range

V-memory
A
V
aaa
See memory map
3
Pointer
Constant
P
K
See memory map
0FFFF
4
Discrete Bit Flags
SP53
Description
On when the pointer is outside of the available range.
5
SP70
SP76
On anytime the value in the accumulator is negative.
On when any instruction loads a value of zero into the accumulator. 6
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the 7
accumulator stack.

In the following example, when X1 is on, the value in V2000 will be loaded into the 8
accumulator and output to V2010.
DirectSOFT
Direct SOFT32
9
V2000
X1 LD
V2000
8 9 3 5
10
Load the value in V2000 into The unused accumulator
the lower 16 bits of the
accumulator
bits are set to zero

Acc. 0 0 0 0 88 99 33 55 11
OUT
V2010 12
8 9 3 5

13
Copy the value in the lower
16 bits of the accumulator to V2010
V2010

Handheld Programmer Keystrokes

$ B X
14
STR 1 SET

SHFT L
ANDST
D
3 A
C A A A

GX
2 0

SHFT
0
V
0
C
ENT

A B A ENT
B
OUT AND 2 0 1 0

C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-57


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Load Double (LDD)


The Load Double instruction is a 32-bit instruction that loads the
value (Aaaa), which is either two consecutive V-memory locations LDD
1 DS
HPP
Used
Used
or an 8 digit constant value, into the accumulator. A aaa

2 Operand Data Type DL06 Range


A aaa
3 V-memory
Pointer
V
P
See memory map
See memory map

4 Constant K 0FFFFFFFF

Discrete Bit Flags Description


5 SP53 On when the pointer is outside of the available range.
SP70 On anytime the value in the accumulator is negative.
6 SP76 On when any instruction loads a value of zero into the accumulator.

NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
7 accumulator stack.

8 In the following example, when X1 is on, the 32-bit value in V2000 and V2001 will be
loaded into the accumulator and output to V2010 and V2011.

9
DirectSOFT
10 Direct SOFT32
X1 LDD
6
V2001
7 3 9 5
V2000
0 2 6
V2000

11 Load the value in V2000 and


V2001 into the 32 bit
accumulator
Acc. 6 7 3 9 65 00 22 66

12
13 OUTD
V2010
6 7 3

V2011
9 5 0 2

V2010
6

14 Copy the value in the 32 bit


accumulator to V2010 and
V2011

A Handheld Programmer Keystrokes

$ B ENT
STR 1

B SHFT L
ANDST
D
3
D
3
C A A A

C
ENT
2 0 0 0
GX SHFT D
OUT 3

D C
2
A
0
B
1
A
0
ENT

5-58 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Load Formatted (LDF)


The Load Formatted instruction loads 132
DS
HPP
Used
Used
consecutive bits from discrete memory locations into LDF
K bbb
A aaa 1
the accumulator. The instruction requires a starting
location (Aaaa) and the number of bits (Kbbb) to be
loaded. Unused accumulator bit locations are set to zero.
2
Operand Data Type DL06 Range
3

Inputs
A
X
aaa
0777
bbb

4
Outputs Y 0777
Control Relays C 01777 5
Stage Bits S 01777
Timer Bits
Counter Bits
T
CT
0377
0177


6
Special Relays SP 0777
Constant K 132 7
Discrete Bit Flags
SP70 On anytime the value in the accumulator is negative.
Description
8
SP76 On when any instruction loads a value of zero into the accumulator.
9
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
10
In the following example, when C0 is on, the binary pattern of C10C16 (7 bits) will be
loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the
accumulator are output to Y0Y6 using the Out Formatted instruction.
11
DirectSOFT
Direct SOFT32
C0 Location Constant
12
LDF C10 C16 C15 C14 C13 C12 C11 C10
K7

Load the status of 7


consecutive bits (C10C16)
into the accumulator
C10 K7

The unused accumulator bits are set to zero


OFF OFF OFF ON ON ON OFF

13
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 1
2
1
1
1
0
0 14
OUTF
K7
Y0

Copy the value from the


Location Constant Y6 Y5 Y4 Y3 Y2 Y1 Y0
A
specified number of bits in Y0 K7 OFF OFF OFF ON ON ON OFF

B
the accumulator to Y0 Y6
Handheld Programmer Keystrokes

$ SHFT C A ENT
STR 2 0

SHFT

SHFT
L
ANDST
C
2
D

B
3

1
F

A
5

0
H
7
ENT
C
D
GX SHFT F
OUT 5
A H ENT
0 7

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-59


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Load Address (LDA)


The Load Address instruction is a 16-bit instruction. It converts LDA
any octal value or address to the HEX equivalent value and loads O aaa
1 DS
HPP
Used
Used
the HEX value into the accumulator. This instruction is useful
when an address parameter is required, since all addresses for the DL06 system are in octal.
2
3 Operand Data Type DL06 Range
aaa
4 Octal Address O See memory map

Discrete Bit Flags Description


5 SP70
SP76
On anytime the value in the accumulator is negative.
On when any instruction loads a value of zero into the accumulator.

6
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
7 accumulator stack.

In the following example, when X1 is on, the octal number 40400 will be converted to a
8 HEX 4100 and loaded into the accumulator using the Load Address instruction. The value in
the lower 16 bits of the accumulator is copied to V2000 using the Out instruction.
9 DirectSOFT
Direct SOFT32

10 X1 LDA
O 40400 4 0
Octal
4 0 0
Hexadecimal
4 1 0 0

11 Load The HEX equivalent to


the octal number into the
lower 16 bits of the
The unused accumulator
bits are set to zero
accumulator

12 Acc. 0 0 0 0 4 1 0 0

13 OUT
4 1 0 0

V2000
14
V2000

Copy the value in lower 16


bits of the accumulator to
V2000
A Handheld Programmer Keystrokes

B $
STR
B
1
ENT

SHFT L D A

C E
4
ANDST
A
0
E
3

4
A
0

0
A
0
ENT

D GX
OUT
SHFT V
AND
C
2
A
0
A
0
A
0
ENT

5-60 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Load Accumulator Indexed (LDX)
Load Accumulator Indexed is a 16-bit instruction that specifies
a source address (V-memory) which will be offset by the value LDX
DS
HPP
Used
Used
in the first stack location. This instruction interprets the value
in the first stack location as HEX. The value in the offset
A aaa 1
address (source address + offset) is loaded into the lower 16 bits
of the accumulator. The upper 16 bits of the accumulator are 2
set to 0.
Helpful Hint: The Load Address instruction can be used to convert an octal address to a 3
HEX address and load the value into the accumulator.

Operand Data Type DL06 Range


4
V-memory
A
V See memory map
aaa aaa
See memory map
5
Pointer P See memory map See memory map

Discrete Bit Flags Description


6
SP53
SP70
On when the pointer is outside of the available range.
On anytime the value in the accumulator is negative. 7
SP76 On when any instruction loads a value of zero into the accumulator.

NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
8
accumulator stack.

In the following example, when X1 is on, the HEX equivalent for octal 25 will be loaded into
9
the accumulator (this value will be placed on the stack when the Load Accumulator Indexed
instruction is executed). V-memory location V1410 will be added to the value in the first 10
level of the stack and the value in this location (V1435 = 2345) is loaded into the lower 16
bits of the accumulator using the Load Accumulator Indexed instruction. The value in the 11
lower 16 bits of the accumulator is output to V1500 using the Out instruction.
X1 LDA
O 25
Octal
2 5
Hexadecimal
0 0 1 5
12
Load The HEX equivalent to
octal 25 into the lower 16
bits of the accumulator
The unused accumulator
bits are set to zero 13
Acc. 0 0 0 0 0 0 1 5

LDX
V1410
HEX Value in 1st
Accumulator Stack
14
Octal stack location Octal

A
Move the offset to the stack.
Load the accumulator with V 1 4 1 0 + 1 5 = V 1 4 3 5 Level 1 0 0 0 0 0 0 1 5
the address to be offset Level 2 X X X X X X X X
The unused accumulator
Level 3 X X X X X X X X
bits are set to zero

B
OUT Level 4 X X X X X X X X
V1500 Acc. 0 0 0 0 2 3 4 5
Level 5 X X X X X X X X
The value in V1435 Level 6 X X X X X X X X
Copy the value in the lower is 2345

C
16 bits of the accumulator Level 7 X X X X X X X X
to V1500
2 3 4 5 Level 8 X X X X X X X X
Handheld Programmer Keystrokes

$ B V1500
ENT

D
STR 1
L D A C F ENT
SHFT
ANDST 3 0 2 5

SHFT L D X B E B A ENT
ANDST 3 SET 1 4 1 0
GX B F A A
PREV PREV PREV ENT
OUT 1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-61


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Load Accumulator Indexed from Data Constants (LDSX)
The Load Accumulator Indexed from Data Constants is a 16-bit
instruction. The instruction specifies a Data Label Area (DLBL)
1 DS
HPP
Used
Used
where numerical or ASCII constants are stored. This value will
LDSX
K aaa
be loaded into the lower 16 bits.
2 The LDSX instruction uses the value in the first level of the accumulator stack as an offset
to determine which numerical or ASCII constant within the Data Label Area will be loaded
3 into the accumulator. The LDSX instruction interprets the value in the first level of the
accumulator stack as a HEX value.
4 Helpful Hint: The Load Address instruction can be used to convert octal to HEX and
load the value into the accumulator.
5 Operand Data Type DL06 Range
aaa

6 Constant K 1-FFFF

Discrete Bit Flags Description


7 SP53 On when the pointer is outside of the available range.
SP70 On anytime the value in the accumulator is negative.
8 SP76 On when any instruction loads a value of zero into the accumulator.

NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
9 accumulator stack.

10 In the following example when X1 is on, the offset of 1 is loaded into the accumulator. This
value will be placed into the first level of the accumulator stack when the LDSX instruction
is executed. The LDSX instruction specifies the Data Label (DLBL K2) where the numerical
11 constant(s) are located in the program and loads the constant value, indicated by the offset in
the stack, into the lower 16 bits of the accumulator.
12 X1
LD
K1
Hexadecimal
0 0 0 1
Value in 1st. level of stack is
used as offset. The value is 1
The unused accumulator
Accumulator Stack

13
bits are set to zero
Load the offset value of 1 (K1) into the lower 16
bits of the accumulator. 0 0 0 0 0 0 0 1 Level 1 0 0 0 0 0 0 0 1
Acc.
Level 2 X X X X X X X X
LDSX
Level 3 X X X X X X X X
K2
Constant Level 4 X X X X X X X X

14
Move the offset to the stack. K 0 0 0 2 X X X X X X X X
Level 5
Load the accumulator with the data label
number The unused accumulator Level 6 X X X X X X X X
bits are set to zero
Level 7 X X X X X X X X
OUT 0 0 0 0 0 0 0 2
Acc. Level 8 X X X X X X X X

A
V2000

Copy the value in the lower


16 bits of the accumulator
to V2000 The unused accumulator
bits are set to zero
DLBL END

B
Acc. 0 0 0 0 2 3 2 3

DLBL K2

2 3 2 3

C
NCON
Offset 0
K3333 V2000

NCON

D
Offset 1
K2323

NCON
Offset 2
K4549

5-62 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

$ B ENT Handheld Programmer Keystrokes


STR 1
L D K B

1
SHFT SHFT ENT
ANDST 3 JMP 1

SHFT L D S X C ENT
ANDST 3 RST SET 2

SHFT E N D ENT

2
4 TMR 3

SHFT D L B L C ENT
3 ANDST 1 ANDST 2

SHFT N C O N D D D D ENT

3
TMR 2 INST# TMR 3 3 3 3

SHFT N C O N C D C D ENT
TMR 2 INST# TMR 2 3 2 3

SHFT N C O N E F E J ENT
TMR 2 INST# TMR 4 5 4 9
GX
OUT
SHFT V
AND
C
2
A
0
A
0
A
0
ENT
4
Load Real Number (LDR)
The Load Real Number instruction loads a real number LDR 5
DS Used A aaa
HPP N/A contained in two consecutive V-memory locations, or an 8-digit
constant into the accumulator. 6
Operand Data Type DL06 Range
A aaa 7
V-memory V See memory map
Pointer P
Real Constant R
See memory map
-3.402823E+38 to + -3.402823E+38
8
Discrete Bit Flags Description 9
SP70 On anytime the value in the accumulator is negative.
SP76 On when any instruction loads a value of zero into the accumulator. 10
DirectSOFT allows you to enter real numbers directly, by using
the leading R to indicate a real number entry. You can enter a
LDR
R3.14159
11
constant such as Pi, shown in the example to the right. To enter
negative numbers, use a minus () after the R. 12
For very large numbers or very small numbers, you can use LDR
exponential notation. The number to the right is 5.3 million.
The OUTD instruction stores it in V1400 and V1401.
R5.3E6 13
These real numbers are in the IEEE 32-bit floating point format,
so they occupy two V-memory locations, regardless of how big
OUTD
V1400 14
or small the number may be! If you view a stored real number
in hex, binary, or even BCD, the number shown will be very A
difficult to decipher. Just like all other number types, you must
keep track of real number locations in memory, so they can be
read with the proper instructions later. LDR
B
The previous example above stored a real number in V1400 and
V1401. Suppose that now we want to retrieve that number. Just
V1400
C
use the Load Real with the V data type, as shown to the right.
Next we could perform real math on it, or convert it to a binary
number.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-63


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Out (OUT)
The Out instruction is a 16-bit instruction that copies the value in the OUT
DS Used lower 16 bits of the accumulator to a specified V-memory location A aaa
1 HPP Used (Aaaa).
Operand Data Type DL06 Range
2
V-memory
A
V See memory map
aaa

3 Pointer P See memory map

Discrete Bit Flags Description


4 SP53 On if CPU cannot solve the logic.

5 In the following example, when X1 is on, the value in V2000 will be loaded into the lower
16 bits of the accumulator using the Load instruction. The value in the lower 16 bits of the
accumulator are copied to V2010 using the OUT instruction.
6 DirectSOFT
Direct SOFT32
X1 LD V2000
Handheld Programmer Keystrokes

$ B ENT

7
8 9 3 5 STR 1
V2000
SHFT L D
Load the value in V2000 into ANDST 3
the lower 16 bits of the The unused accumulator
accumulator bits are set to zero C A A A ENT
2 0 0 0

8 Acc. 0 0 0 0 88 99 33 55
OUT GX SHFT V C A B A ENT
OUT AND 2 0 1 0
V2010

9
Copy the value in the lower
16 bits of the accumulator to 8 9 3 5
V2010 V2010

10 Out Double (OUTD)


The Out Double instruction is a 32 bit instruction that copies the OUTD
11 DS
HPP
Used
Used
value in the accumulator to two consecutive V-memory locations
at a specified starting location (Aaaa).
A aaa

12 Operand Data Type DL06 Range


A aaa
13 V-memory
Pointer
V
P
See memory map
See memory map

14 SP53
Discrete Bit Flags Description
On if CPU cannot solve the logic.

A In the following example, when X1 is on, the 32-bit value in V2000 and V2001 will
be loaded into the accumulator using the Load Double instruction. The value in the
B accumulator is output to V2010 and V2011 using the OUTD instruction.
DirectSOFT
Direct SOFT32 V2001 V2000 Handheld Programmer Keystrokes

C
6 7 3 9 5 0 2 6
X1 $ B ENT
LDD STR 1
V2000
SHFT L D D
Load the value in V2000 and ANDST 3 3

D
V2001 into the accumulator Acc. 6 7 3 9 55 00 22 66
C A A A ENT
2 0 0 0
OUTD
GX SHFT D
V2010 OUT 3
Copy the value in the 6 7 3 9 5 0 2 6 C A B A ENT
accumulator to V2010 and V2011 V2010 2 0 1 0
V2011

5-64 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Data

Out Formatted (OUTF)


The Out Formatted instruction outputs 132 bits from the
DS
HPP
Used
Used
accumulator to the specified discrete memory locations. The OUTF
K bbb
A aaa
1
instruction requires a starting location (Aaaa) for the destination
and the number of bits (Kbbb) to be output. 2
Operand Data Type DL06 Range
A aaa bbb 3
Inputs X 0777
Outputs
Control Relays
Y
C
0777
01777


4
Constant K 132
5
In the following example, when C0 is on, the binary pattern of C10C16 (7 bits) will be
loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the 6
accumulator are output to Y0Y6 using the OUTF instruction.
DirectSOFT
Direct SOFT32
7
8
C0 Location Constant
LDF C10 C16 C15 C14 C13 C12 C11 C10
K7 C10 K7 OFF OFF OFF ON ON ON OFF

Load the status of 7


consecutive bits (C10C16) The unused accumulator bits are set to zero
into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 1
2
1
1
1
0
0
9
OUTF Y20

10
Accumulator
K7

Copy the value of the


specified number of bits
from the accumulator to

11
Y20Y26 Location Constant Y26 Y25 Y24 Y23 Y22 Y21 Y20
Y20 K7 OFF OFF OFF ON ON ON OFF
Handheld Programmer Keystrokes

$ SHFT C A ENT

12
STR 2 0

SHFT L D F
ANDST 3 5

SHFT C B A H ENT

13
2 1 0 7
GX SHFT F
OUT 5
A H ENT

14
0 7

Pop (POP) POP


DS
HPP
Used
Used
The Pop instruction moves the value from the first level of the A
accumulator stack (32 bits) to the accumulator and shifts each value
in the stack up one level. B
Discrete Bit Flags
SP63
Description
ON when the result of the instruction causes the value in the accumulator to be zero.
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-65


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Pop Instruction (contd)


In the example below, when C0 is on, the value 4545 that was on top of the stack is moved
1 into the accumulator using the Pop instruction The value is output to V2000 using the OUT
instruction. The next Pop moves the value 3792 into the accumulator and outputs the value
2 to V2001. The last Pop moves the value 7930 into the accumulator and outputs the value to
V2002. Please note if the value in the stack were greater than 16 bits (4 digits) the OUTD
instruction would be used and 2 V-memory locations for each OUTD must be allocated.
3
DirectSOFT
Direct SOFT32

4 C0 POP
Previous Acc. value

Acc. X X X X XX XX XX XX

Accumulator Stack
Current Acc. value

5 Pop the 1st. value on the stack into the


accumulator and move stack values
up one location
Acc. 0 0 0 0 44 55 44 55 Level 1
Level 2
0
0
0
0
0
0
0
0
0
0
3
7
7
9
9
3
2
0
Level 3 X X X X X X X X

6 OUT
V2000
V2000 4 5 4 5
Level 4
Level 5
Level 6
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Copy the value in the lower 16 bits of

7 the accumulator to V2000 Level 7


Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

POP

8
Previous Acc. value

Acc. 0 0 0 0 44 55 44 55
Pop the 1st. value on the stack into the
accumulator and move stack values Current Acc. value Accumulator Stack

9
up one location
Acc. 0 0 0 0 3 7 9 2 Level 1 0 0 0 0 7 9 3 0
Level 2 X X X X X X X X
OUT Level 3 X X X X X X X X

10
V2001
Level 4 X X X X X X X X

Copy the value in the lower 16 bits of Level 5 X X X X X X X X


the accumulator to V2001 V2001 3 7 9 2 Level 6 X X X X X X X X

11 POP
Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

12 Pop the 1st. value on the stack into the


accumulator and move stack values
up one location
Previous Acc. value

Acc. 0 0 0 0 3 7 9 2

Accumulator Stack
Current Acc. value

13 OUT
V2002
Acc. 0 0 0 0 7 9 3 0 Level 1
Level 2
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Level 3 X X X X X X X X
Copy the value in the lower 16 bits of

14 the accumulator to V2002

V2002 7 9 3 0
Level 4
Level 5
Level 6
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Handheld Programmer Keystrokes

A $
STR
SHFT C
2
A
0
ENT
Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

P O P

B
SHFT SHFT ENT
CV INST# CV
GX SHFT V C A A A ENT
OUT AND 2 0 0 0

C SHFT P SHFT O P ENT


CV INST# CV
GX SHFT V C A A B ENT
OUT AND 2 0 0 1

D SHFT

GX
P
CV
SHFT

SHFT
O
INST#
V
P

C
CV
A
ENT

A C ENT
OUT AND 2 0 0 2

5-66 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Out Indexed (OUTX)


The OUTX instruction is a 16 bit instruction. It copies a 16 bit or
DS Used
4 digit value from the first level of the accumulator stack to a source
address offset by the value in the accumulator(V-memory + offset).
O UT X
A aaa
1
HPP Used This instruction interprets the offset value as a HEX number. The
upper 16 bits of the accumulator are set to zero. 2
Operand Data Type DL06 Range 3
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
4
Discrete Bit Flags Description 5
SP53 On if CPU cannot solve the logic.
6
In the following example, when X1 is on, the constant value 3544 is loaded into the
accumulator. This is the value that will be output to the specified offset V-memory location 7
(V1525). The value 3544 will be placed onto the stack when the LDA instruction is executed.
Remember, two consecutive LD instructions places the value of the first load instruction
onto the stack. The LDA instruction converts octal 25 to HEX 15 and places the value in the
8
accumulator. The OUTX instruction outputs the value 3544 which resides in the first level of
the accumulator stack to V1525. 9
DirectSOFT

10
DirectSOFT32
Constant
X1 LD
3 5 4 4
K3544

11
The unused accumulator
Load the accumulator with
bits are set to zero
the value 3544

Acc. 0 0 0 0 3 5 4 4

LDA
Octal
0
HEX
0 1 5
12
2 5
O25
Load the HEX equivalent to
octal 25 into the lower 16 bits
of the accumulator. This is the
The unused accumulator
bits are set to zero
13
offset for the Out Indexed 0 0 0 0 0 0 1 5

14
Acc.
instruction, which determines
the final destinaltion address
Octal Octal Octal
OUTX
+ 2 5 =

A
V 1 5 0 0 V 1 5 2 5
V1500 Accumulator Stack
The hex 15 converts
to 25 octal, which is 3 5 4 4 Level 1 0 0 0 0 3 5 4 4
Copy the value in the first
level of the stack to the added to the base Level 2 X X X X X X X X
address of V1500 to yield V1525

B
offset address 1525
(V1500+25) the final answer Level 3 X X X X X X X X
Level 4 X X X X X X X X
Handheld Programmer Keystrokes
Level 5 X X X X X X X X

C
$ B ENT
STR 1 Level 6 X X X X X X X X
Level 7 X X X X X X X X
SHFT L D PREV D F E E ENT
ANDST 3 3 5 4 4 Level 8 X X X X X X X X

SHFT

GX
OUT
L
ANDST

SHFT
D

X
SET
3
A
0
B
C

F
2
F

A
5
ENT

A ENT
D
1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-67


Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data

Out Least (OUTL)


The OUTL instruction copies the value in the lower eight bits of
1 DS
HPP
Used
Used
the accumulator to the lower eight bits of the specified V-memory
O UT L
A aaa
location (i.e., it copies the low byte of the low word of the
2 accumulator).
Operand Data Type DL06 Range
3
V-memory
A
V
aaa
See memory map

4
In the following example, when X1 is on, the value in V1400 will be loaded into the lower
5 16 bits of the accumulator using the LD instruction. The value in the lower 8 bits of the
accumulator is copied to V1500 using the OUTL instruction.
DirectSOFT

6
Direct SOFT32
X1 Load the value in V1400 into V1400
LD the lower 16 bits of the
V1400 accumulater 8 9 3 5

7
Copy the value in the lower The unused accumulator
OUTL bits are set to zero
8 bits of the accumulator to
V1500 V1500
Acc. 0 0 0 0 8 9 3 5
Handheld Programmer Keystrokes

8 $

SHFT
STR
L
ANDST
B

D
1

3
ENT

B
1
E
4
A
0
A
0
ENT
0 0 3 5

V1500

9 GX
OUT
SHFT L
ANDST
B
1
F
5
A
0
A
0
ENT

10 DS Used
Out Most (OUTM)
The OUTM instruction copies the value in the upper eight bits of O UT M
HPP Used
the lower sixteen bits of the accumulator to the upper eight bits of
11 the specified V-memory location (i.e., it copies the high byte of the
A aaa

low word of the accumulator).


12 Operand Data Type DL06 Range
A aaa
13 V-memory V See memory map

In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16
14 bits of the accumulator using the LD instruction. The value in the upper 8 bits of the lower
16 bits of the accumulator is copied to V1500 using the OUTM instruction.
A DirectSOFT
Direct SOFT32
X1 Load the value in V1400 into V1400
LD the lower 16 bits of the

B V1400 accumulator 8 9 3 5

OUTM Copy the value in the upper The unused accumulator


8 bits of the lower 16 bits of bits are set to zero
V1500 the accumulator to 1500
0 0 0 0 8 9 3 5

C
Acc.

Handheld Programmer Keystrokes

$ B ENT 8 9 0 0
STR 1

D
V1500
SHFT L D B E A A ENT
ANDST 3 1 4 0 0
GX SHFT M B F A A ENT
OUT ORST 1 5 0 0

5-68 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Logical Instructions (Accumulator)


And (AND logical) 1
The AND instruction is a 16-bit instruction that logically ANDs
DS
HPP
Used
Used
the value in the lower 16 bits of the accumulator with a specified
AND
A aaa 2
V-memory location (Aaaa). The result resides in the accumulator. The
discrete status flag indicates if the result of the AND is zero. 3
Operand Data Type DL06 Range 4
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
5
Discrete Bit Flags Description 6
SP63 ON if the result in the accumulator is zero.
SP70 ON when the value loaded into the accumulator is zero. 7
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V2000 will be loaded into the
8
accumulator using the LD instruction. The value in the accumulator is ANDed with the
value in V2006 using the AND instruction. The value in the lower 16 bits of the accumulator 9
is output to V2010 using the OUT instruction.
DirectSOFT
Direct SOFT32
10
11
X1 V2000
LD
2 8 7 A
V2000

Load the value in V2000 into The upper 16 bits of the accumulator

12
the lower 16 bits of the will be set to 0
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

AND
V2006 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0 13
AND the value in the 6A38

14
accumulator with AND (V2006) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0
the value in V2006
Acc. 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0

A
OUT
V2010
2 8 3 8
Copy the lower 16 bits of the
accumulator to V2010 V2010

Handheld Programmer Keystrokes

$ B
B
ENT

C
STR 1

SHFT L D C A A A ENT
ANDST 3 2 0 0 0
V SHFT V C A A G ENT
AND
GX
OUT
SHFT V
AND

AND
C
2

2
A
0

0
B
0

1
A
6

0
ENT D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-69


Chapter 5: Standard RLL Instructions - Logical

And Double (ANDD)


ANDD is a 32-bit instruction that logically ANDs the value in the
1 DS
HPP
Used
Used
accumulator with two consecutive V-memory locations or an 8 digit ANDD
K aaa
(max.) constant value (Aaaa). The result resides in the accumulator.
2 Discrete status flags indicate if the result of the ANDD is zero or a
negative number (the most significant bit is on).

3 Operand Data Type DL06 Range

4 V-memory V
aaa
See memory map
Pointer P See memory map
5 Constant K 0FFFFFFFF

6 Discrete Bit Flags


SP63 ON if the result in the accumulator is zero.
Description

SP70 ON if the result in the accumulator is negative


7
NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the LDD instruction. The value in the accumulator is ANDed with
9 36476A38 using the ANDD instruction. The value in the accumulator is output to V2010
and V2011 using the OUTD instruction.
10 DirectSOFT
DirectSOFT 5 V2000 V2000
X1 LDD 5 4 ?
7 E 2 8 7 A

11 V2000

Load the value in V2000 and


V2001 into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

12 ANDD
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

K36476A38 Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

13 AND the value in the


accumulator with
the constant value
AND 36476A38 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0

36476A38 Acc. 0 0 0 0
1 0 1 0 0 0 0
1 0 0 0 0
1 0
1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0

14 OUTD
V2010 1 4 4 6 2 8 3 8

A Copy the value in the


accumulator to V2010 and
V2011
V2011 V2010

B Handheld Programmer Keystrokes


$ B ENT
STR 1

C SHFT

V
L
ANDST

SHFT
D

D
3
D
3

SHFT
C

K
2
A

D
0
A

G
0
A

E
0
H
ENT

G SHFT A SHFT D I ENT


AND 3 JMP 3 6 4 7 6 0 3 8

D GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT

5-70 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

And Formatted (ANDF)


The ANDF instruction logically ANDs the binary value in the
DS
HPP
Used
Used
accumulator with a specified range of discrete memory bits (132).
The instruction requires a starting location (Aaaa) and number of
ANDF
K bbb
A aaa
1
bits (Kbbb) to be ANDed. Discrete status flags indicate if the result
is zero or a negative number (the most significant bit =1). 2
Operand Data Type DL06 Range
3
aaa bbb

Inputs
B
X 0-777 - 4
Outputs Y 0-777 -
Control Relays
Stage Bits
C
S
0-1777
0-1777
-
-
5
Timer Bits
Counter Bits
T
CT
0-377
177
-
- 6
Special Relays SP 0-777 -
Constant K - 1-32 7
Discrete Bit Flags Description
SP63 ON if the result in the accumulator is zero. 8
SP70 ON if the result in the accumulator is negative

NOTE: Status flags are valid only until another instruction uses the same flag.
9
In the following example, when X1 is on, the LDF instruction loads C10C13 (4 binary bits)
into the accumulator. The accumulator contents is logically ANDed with the bit pattern from
10
Y20Y23 using the ANDF instruction. The OUTF instruction outputs the accumulators
lower four bits to C20C23. 11
DirectSOFT
DirectSOFT32
X1
LDF
K4
C10 Location
C10
Constant
K4
C13 C12 C11 C10
ON ON ON OFF
12
13
Load the status of 4
consecutive bits (C10-C13) The unused accumulator bits are set to zero
into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

14
ANDF Y20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
K4
Accumulator
And the binary bit pattern 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
Acc.
(Y20-Y23) with the value in

A
the accumulator Y23 Y22 Y21 Y20
AND (Y20-Y23) ON OFF OFF OFF 1 0 0 0
OUTF C20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
K4

B
ndard RLL

Copy the value in the lower


4 bits in accumulator to
C20-C23
Location Constant C23 C22 C21 C20

C
Handheld Programmer Keystrokes
C20 K4 ON OFF OFF OFF
$ B ENT
STR 1

SHFT L D F NEXT NEXT NEXT NEXT B A E ENT

D
ANDST 3 5 1 0 4
V SHFT F NEXT C A E ENT
AND 5 2 0 4
GX SHFT F PREV PREV C A E ENT
OUT 5 2 0 4

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-71


Chapter 5: Standard RLL Instructions - Logical

And with Stack (ANDS)


The ANDS instruction is a 32-bit instruction that logically ANDs the value in the
1 DS
HPP
Used
Used
accumulator with the first level of the accumulator stack. The
ANDS
result resides in the accumulator. The value in the first level of
2 the accumulator stack is removed from the stack and all values are
moved up one level. Discrete status flags indicate if the result of the
ANDS is zero or a negative number (the most significant bit is on).
3
Discrete Bit Flags Description
4 SP63 ON if the result in the accumulator is zero.
SP70 ON if the result in the accumulator is negative
5
NOTE: Status flags are valid only until another instruction uses the same flag.
6 In the following example, when X1 is on, the binary value in the accumulator will be ANDed
with the binary value in the first level or the accumulator stack. The result resides in the
7 accumulator. The 32-bit value is then output to V1500 and V1501.

8
9 DirectSOFT
DirectSOFT32
X1 LDD V1401 V1400
5 4 7 E 2 8 7 A

10 V1400
Load the value in V1400 and
1401 into the accumulator

11
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

ANDS

12 AND the value in the


accumulator with the AND
36476A38
Acc.

(top of stack)
0

0
1

0
0 1

1 1
0

0 1
1 0

1
0 0

0 0
1

1 0
1 1

0
1 1

0 1
1

1 1
0 0

0
0

1
1 0

1 0
1

1 0
0 0

1
0 0

0 0
1

0 1
1 1

1
1 0

1 0
1

0 0
0

first level of the

13 accumulator stack Acc. 0 0 0 1


0 0 1 0 0 0 0
1 0 0 0 1
0 0
1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0

OUTD
V1500

14 Copy the value in the


accumulator to V1500
and 1501
1 4 4
V1501
6 2 8
V1500
3 8

A Handheld Programmer Keystrokes

$
STR
B
1
ENT

B SHFT

V
L
ANDST

SHFT
D

S
3
D

ENT
3
B
1
E
4
A
0
A
0
ENT

AND RST

C GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT

5-72 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Or (OR)
The Or instruction is a 16-bit instruction that logically ORs the
DS
HPP
Used
Used
value in the lower 16 bits of the accumulator with a specified
OR
A aaa
1
V-memory location (Aaaa). The result resides in the accumulator.
The discrete status flag indicates if the result of the OR is zero. 2
Operand Data Type DL06 Range
A aaa 3
V-memory V See memory map
Pointer P See memory map 4
Discrete Bit Flags Description
SP63 ON if the result in the accumulator is zero. 5
SP70 ON if the result in the accumulator is negative

NOTE: Status flags are valid only until another instruction uses the same flag.
6
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is ORed with V2006
7
using the OR instruction. The value in the lower 16 bits of the accumulator is output to
V2010 using the Out instruction. 8
DirectSOFT
Direct SOFT32
9
X1 V2000
LD
V2000

Load the value in V2000 into The upper 16 bits of the accumulator
2 8 7 A
10
the lower 16 bits of the will be set to 0

11
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

OR
V2006

Or the value in the 6A38


Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
12
accumulator with OR (V2006) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0

13
the value in V2006
Acc. 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0

OUT
V2010

Copy the value in the lower


16 bits of the accumulator to
6 A

V2010
7 A 14
V2010
Handheld Programmer Keystrokes

$
STR
B
1
ENT
A
SHFT

Q
L
ANDST
D

SHFT
3
V
C

C
2
A

A
0
A

A
0
A

G
0
ENT

ENT
B
OR AND 2 0 0 6
GX
OUT
SHFT V
AND
C
2
A
0
B
1
A
0
ENT
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-73


Chapter 5: Standard RLL Instructions - Logical

Or Double (ORD)
ORD is a 32-bit instruction that logically ORs the value in the
1 DS
HPP
Used
Used
accumulator with the value (Aaaa), which is either two consecutive
ORD
K aaa
V-memory locations or an 8-digit (max.) constant value. The result
2 resides in the accumulator. Discrete status flags indicate if the result of the ORD is zero or a
negative number (the most significant bit is on).

3 Operand Data Type DL06 Range


4 V-memory V See memory map
aaa

Pointer P See memory map


5 Constant K 0FFFFFFFF

6 Discrete Bit Flags


SP63 ON if the result in the accumulator is zero.
Description

SP70 ON if the result in the accumulator is negative


7
NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the LDD instruction. The value in the accumulator is ORed with
9 36476A38 using the ORD instruction. The value in the accumulator is output to V2010 and
V2011 using the OUTD instruction.
10 DirectSOFT
Direct SOFT32
X1 V2001 V2000
LDD

11
5 4 7 E 2 8 7 A
V2000

Load the value in V2000 and


V2001 into accumulator

12 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0
8
0
7
0
6 5
1 1
4 3
1 1
2
0
1
1
0
0

ORD

13 K36476A38

OR the value in the


Acc.

OR 36476A38
0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

accumulator with 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0

14
the constant value
36476A38 Acc. 0 1
0 1
0 1
0 0 1 1
0 0 0 1
0 1
0 1
0 1
0 0
1 0
1 1
0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0

OUTD

A
V2010
7 6 7 F 6 A 7 A
Copy the value in the
accumulator to V2010 and V2011 V2010
V2011

B Handheld Programmer Keystrokes

$ B ENT
STR 1

C SHFT L
ANDST
D
3
D
3
C
2
A
0
A
0
A
0
ENT

Q SHFT D SHFT K D G E H G SHFT A SHFT D I ENT

D
OR 3 JMP 3 6 4 7 6 0 3 8
GX SHFT D C A B A ENT
OUT 3 2 0 1 0

5-74 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Or Formatted (ORF)
The ORF instruction logically ORs the binary value in the
DS
HPP
Used
Used
accumulator and a specified range of discrete bits (132). The ORF
K bbb
A aaa 1
instruction requires a starting location (Aaaa) and the number of bits
(Kbbb) to be ORed. Discrete status flags indicate if the result is zero
or negative (the most significant bit =1).
2
3
Operand Data Type DL06 Range

Inputs
A/B
X
aaa
0-777
bbb
--
4
Outputs
Control Relays
Y
C
0-777
0-1777
--
-- 5
Stage Bits S 0-1777 --
Timer Bits
Counter Bits
T
CT
0-377
0-177
--
--
6
Special Relays
Constant
SP
K
0-777
-
--
1-32 7
Discrete Bit Flags
SP63 ON if the result in the accumulator is zero.
Description 8
SP70 ON if the result in the accumulator is negative
9
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the LDF instruction loads C10C13 (4 binary 10
bits) into the accumulator. The ORF instruction logically ORs the accumulator contents
with Y20Y23 bit pattern. The ORF instruction outputs the accumulators lower four bits to
C20C23.
11
DirectSOFT
DirectSOFT32
X1 LDF C10 Location Constant C13 C12 C11 C10
12
K4 C10 K4 OFF ON ON OFF
Load the status fo 4
consecutive bits (C10-C13)
into the accumulator The unused accumulator bits are set to zero 13
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

14
ORF Y20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
K4
OR the binary bit pattern
(Y20 - Y23) with the value in

A
the accumulator Y23 Y22 Y21 Y20
OR (Y20-- Y23) ON OFF OFF OFF 1 0 0 0
OUTF C20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
K4

Handheld Programmer Keystrokes


Copy the specified number
of bits from the accumulator
to C20-C23
B
Location Constant

C
C23 C22 C21 C20
$ B ENT
STR 1 C20 K4 ON ON ON OFF

SHFT L D F NEXT NEXT NEXT NEXT B A E ENT


ANDST 3 5 1 0 4
Q

GX
OUT
OR
SHFT

SHFT
F

F
5

5
NEXT

PREV
C

PREV
2
A

C
0

2
A
0
E
4
E
ENT

4
ENT
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-75


Chapter 5: Standard RLL Instructions - Logical

Or with Stack (ORS)


The ORS instruction is a 32-bit instruction that logically
1 DS
HPP
Used
Used
ORs the value in the accumulator with the first level of the
accumulator stack. The result resides in the accumulator.
OR S

The value in the first level of the accumulator stack is


2 removed from the stack and all values are moved up one
level. Discrete status flags indicate if the result of the ORS is
3 zero or a negative number (the most significant bit is on).

4 Discrete Bit Flags Description


SP63 ON if the result in the accumulator is zero.
5 SP70 ON if the result in the accumulator is negative.

6 In the following example when X1 is on, the binary value in the accumulator will be ORed
with the binary value in the first level of the stack. The result resides in the accumulator.

7 DirectSOFT
DirectSOFT32

8 X1
LDD
V1400
5
V1401
4 7 E 2
V1400
8 7 A

Load the value in V1400 and

9 V1401 in the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

10 ORS
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
OR the value in the 36476A38

11 accumulator with the value


in the first level of the
accumulator stack
OR (top of stack)

Acc.
0

0
0

0
1
1

0 1
1 0
1 0 1

0 1
1

0
1
0

0 0
0 1 0

0
1 0
1
0

0
1
0

0 1
1 0
1 1 1

0
1 1
0
0

0
1

1
1

1 0
0 1 0

1 0
1

1
0

0 0
0 0 1

1 1
1

1
1

1 0
0 0 0

1 0

12
OUTD

V1500
Copy the value in the 7 6 7 F 6 A 7 A
accumulator to V1500 and

13 V1501 V1501 V1500

14
Handheld Programmer Keystrokes

$ B ENT
STR 1
L D D B E A A

A
SHFT ENT
ANDST 3 3 1 4 0 0
Q SHFT S ENT
OR RST

B
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

C
D

5-76 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Exclusive Or (XOR)
The XOR instruction is a 16-bit instruction that performs
DS Used an exclusive OR of the value in the lower 16 bits of the XOR
A aaa
1
HPP Used accumulator and a specified V-memory location (Aaaa).
The result resides in the in the accumulator. The discrete
status flag indicates if the result of the XOR is zero.
2
Operand Data Type DL06 Range
3

V-memory
A
V
aaa
See memory map
4
Pointer P See memory map

Discrete Bit Flags Description


5
SP63
SP70
ON if the result in the accumulator is zero.
ON if the result in the accumulator is negative. 6
NOTE: Status flags are valid only until another instruction uses the same flag. 7
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the LD instruction. The value in the accumulator is exclusive ORed with 8
V2006 using the XOR instruction. The value in the lower 16 bits of the accumulator is

DirectSOFT
Direct SOFT32
output to V2010 using the OUT instruction. 9
X1 LD
V2000
2
V2000
8 7 A 10
11
Load the value in V2000 into The upper 16 bits of the accumulator
the lower 16 bits of the will be set to 0
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

XOR
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 1 0
12
V2006 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

XOR the value in the


accumulator with
6A38
XOR (V2006) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0
13
the value in V2006

OUT
Acc. 0 0 0 0 0 01 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
14
A
V2010
4 2 4 2
Copy the lower 16 bits of the
accumulator to V2010 V2010

Handheld Programmer Keystrokes

$ X B
B
SHFT ENT

C
STR SET 1

SHFT L D SHFT V C A A A ENT


ANDST 3 AND 2 0 0 0

D
SHFT X SHFT Q SHFT V C A A G ENT
SET OR AND 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-77


Chapter 5: Standard RLL Instructions - Logical

Exclusive Or Double (XORD)


The XORD is a 32-bit instruction that performs an exclusive
XORD
1 DS
HPP
Used
Used
OR of the value in the accumulator and the value (Aaaa),
which is either two consecutive V-memory locations or an 8
K aaa

digit (max.) constant. The result resides in the accumulator.


2 Discrete status flags indicate if the result of the XORD is zero
or a negative number (the most significant bit is on).
3
Operand Data Type DL06 Range
4
V-memory
A
V
aaa
See memory map

5 Pointer
Constant
P
K
See memory map
0FFFFFFFF

6 Discrete Bit Flags


SP63 ON if the result in the accumulator is zero.
Description

SP70 ON if the result in the accumulator is negative


7 NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the LDD instruction. The value in the accumulator is exclusively
9 ORed with 36476A38 using the XORD instruction. The value in the accumulator is output
to V2010 and V2011 using the OUTD instruction.
10 DirectSOFT
Direct SOFT32
X1 LDD 5
V2001
4 7 E 2
V2000
8 7 A

11
V2000

Load the value in V2000 and


V2001 into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

12
XORD Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
K36476A38

XORD the value in the 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0


Acc.
accumulator with

13 the constant value


36476A38

OUTD
XORD 36476A38 0

0
0

1
0
1

1
0
1

0
0

0
1

0
1
1

1
0
0

0
0

0
1

0
0

1
0
0

1
0
0

1
0
1

0
1

0
1

1
0
0

0
1

1
1

0
0

0
1

0
0

0
1

1
0

0
0

0
0

1
1

0
1

0
1

0
0

0
0

1
0

0
Acc.

14 V2010

Copy the value in the


accumulator to V2010
and V2011 6 2 3 9 4 2 4 2

A Handheld Programmer Keystrokes


$ B ENT
V2011 V2010

STR 1

B SHFT L
ANDST
X
D

Q
3
D
3
D
C
2
A
0
A

K
0
A
0
ENT

SHFT SHFT SHFT


SET OR 3 JMP

C D
3
G
6
E
4
H
7
G
6
SHFT A
0
SHFT D
3
I
8
ENT

GX SHFT D C A B A ENT

D
OUT 3 2 0 1 0

5-78 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Exclusive Or Formatted (XORF)


The XORF instruction performs an exclusive OR of the
DS
HPP
Used
Used
binary value in the accumulator and a specified range of
XO R F
K bbb
A aaa
1
discrete memory bits (132).
The instruction requires a starting location (Aaaa) and the number of bits (Bbbb) to be 2
exclusive ORd. Discrete status flags indicate if the result of the XORF is zero or negative (the
most significant bit =1).
3
Operand Data Type DL06 Range
A/B
Inputs X
aaa
0-777
bbb
-
4
Outputs
Control Relays
Y
C
0-777
0-1777
-
- 5
Stage Bits S 0-1777 -
Timer Bits
Counter Bits
T
CT
0-377
177
-
-
6
Special Relays
Constant
SP
K
0-777
-
-
1-32 7
Discrete Bit Flags
SP63 ON if the result in the accumulator is zero.
Description
8
SP70 ON if the result in the accumulator is negative
9
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the binary pattern of C10C13 (4 bits) will be
10
loaded into the accumulator using the LDF instruction. The value in the accumulator will
be logically exclusive ORed with the bit pattern from Y20Y23 using the XORF instruction. 11
The value in the lower 4 bits of the accumulator is output to C20C23 using the OUTF
instruction.
DirectSOFT
DirectSOFT32
12
Location Constant

13
X1 C13 C12 C11 C10
LDF C10 C10 K4 OFF ON ON OFF
K4

Load the status of 4 The unused accumulator bits are set to zero
consecutive bits (C10-C13)

14
into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
X0RF Y20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
K4 Accumulator

A
Exclusive OR the binary bit Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
pattern (Y20-Y23) with the
value in the accumulator Y23 Y22 Y21 Y20
XORF (Y20-Y23) ON OFF ON OFF 1 0 1 0
OUTF C20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

B
K4
Standard RLL

Copy the specified number


of bits from the accumulator
to C20-C23

C
Location Constant C23 C22 C21 C20
Handheld Programmer Keystrokes C20 K4 ON ON OFF OFF

$ B ENT
STR 1

D
SHFT L D F NEXT NEXT NEXT NEXT B A E ENT
ANDST 3 5 1 0 4

SHFT X Q SHFT F NEXT C A E ENT


SET OR 5 2 0 4
GX SHFT F PREV PREV C A E ENT
OUT 5 2 0 4

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-79


Chapter 5: Standard RLL Instructions - Logical
Exclusive Or with Stack (XORS)
The XORS instruction is a 32-bit instruction that performs an
Exclusive Or of the value in the accumulator with the first level
1 DS
HPP
Used
Used
of the accumulator stack. The result resides in the accumulator. XO R S
The value in the first level of the accumulator stack is removed
2 from the stack and all values are moved up one level. Discrete
status flags indicate if the result of the XORS is zero or a negative
number (the most significant bit is on).
3
4 Discrete Bit Flags
SP63 ON if the result in the accumulator is zero.
Description

SP70 ON if the result in the accumulator is negative


5 NOTE: Status flags are valid only until another instruction uses the same flag.

6 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the LDD instruction. The binary value in the accumulator will be
7 exclusively ORed with 36476A38 using the XORS instruction. The value in the accumulator
is output to V1500 and V1501 using the OUTD instruction.
8 DirectSOFT
DirectSOFT32
X1 LDD V1401 V1400

9 V1400
Load the value in V1400 and
V1401 into the accumulator
5 4 7 E 2 8 7 A

10 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

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

XORS

11 Exclusive OR the value


in the accumulator
36476A38
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0

XOR (1st level of Stack) 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0

12
with the value in the
first level of the Acc. 0 0
1 0 0
1 0 1
0 0
1 0 0 0 0
1 0
1 0 0
1 0 0
1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
accumulator stack
OUTD

13 V1500

Copy the value in the


accumulator to V1500 and V1501
6 2

V1501
3 9 4 2

V1500
4 2

14 Handheld Programmer Keystrokes

$ B

A
ENT
STR 1

SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0

B SHFT X Q SHFT S ENT


SET OR RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

C
D

5-80 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Compare (CMP)
The CMP instruction is a 16-bit instruction that compares the
DS
HPP
Used
Used
value in the lower 16 bits of the accumulator with the value in a
CMP
A aaa
1
specified V-memory location (Aaaa). The corresponding status flag
will be turned on indicating the result of the comparison. The data
format for this instruction is BCD/Hex, Decimal and Binary.
2

Operand Data Type
A
DL06 Range
aaa
3
V-memory
Pointer
V
P
See memory map
See memory map 4
Discrete Bit Flags
SP60
Description
On when the value in the accumulator is less than the instruction value.
5
SP61
SP62
On when the value in the accumulator is equal to the instruction value.
On when the value in the accumulator is greater than the instruction value. 6
NOTE: Status flags are valid only until another instruction uses the same flag. 7
In the following example when X1 is on, the constant 4526 will be loaded into the lower 16
bits of the accumulator using the LD instruction. The value in the accumulator is compared 8
with the value in V2000 using the CMP instruction. The corresponding discrete status flag
will be turned on indicating the result of the comparison. In this example, if the value in
the accumulator is less than the value specified in the CMP instruction, SP60 will turn on,
9
energizing C30.
DirectSOFT
10
11
X1 LD CONSTANT
K4526 4 5 ?
2 6

Load the constant value


The unused accumulator

12
4526 into the lower 16 bits of
the accumulator bits are set to zero

Acc. 0 0 0 0 44 55 2?
2 66
?

CMP
Compared
with
13
V2000

Compare the value in the


accumulator with the value
8 9 4

V2000
5
14
in V2000

SP60 C30
OUT
A
Handheld Programmer Keystrokes
$ B
B
ENT
STR 1

SHFT L
ANDST
D
3
SHFT K
JMP
E
4
F
5
C
2
G
6
ENT C
SHFT C SHFT M P C A A A ENT

D
2 ORST CV 2 0 0 0
$ SHFT SP G A ENT
STR STRN 6 0
GX SHFT C D A ENT
OUT 2 3 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-81


Chapter 5: Standard RLL Instructions - Logical

Compare Double (CMPD)


The Compare Double instruction is a 32bit instruction that
CMPD
1 DS
HPP
Used
Used
compares the value in the accumulator with the value (Aaaa), which
is either two consecutive V-memory locations or an 8digit (max.) A aaa
constant. The corresponding status flag will be turned on indicating
2 the result of the comparison. The data format for this instruction is BCD/Hex, Decimal and
Binary.
3 Operand Data Type DL06 Range
4
V-memory
A
V
aaa
See memory map
Pointer P See memory map
5 Constant K 0FFFFFFFF

Discrete Bit Flags Description


6 SP60 On when the value in the accumulator is less than the instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
7 SP62 On when the value in the accumulator is greater than the instruction value.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
9 into the accumulator using the Load Double instruction. The value in the accumulator
is compared with the value in V2010 and V2011 using the CMPD instruction. The
10 corresponding discrete status flag will be turned on, indicating the result of the comparison.
In this example, if the value in the accumulator is less than the value specified in the Compare
instruction, SP60 will turn on energizing C30.
11 DirectSOFT
X1 LDD
V2001 V2000
4 5 2 6 7 2 9 9
V2000

12 Load the value in V2000 and


V2001 into the accumulator

Acc. 4 5 2 6 7 2 9 9

13 CMPD
Compared
with
V2010

14 Compare the value in the


accumulator with the value
in V2010 and V2011
6 7 3
V2011
9 5 0 2
V2010
6

A SP60 C30
OUT

B Handheld Programmer Keystrokes

$ B ENT
STR 1

C SHFT L
ANDST
D
3
D
3
C
2
A
0
A
0
A
0
ENT

SHFT C SHFT M P D C A B A ENT

D
2 ORST CV 3 2 0 1 0
$ SHFT SP G A ENT
STR STRN 6 0
GX SHFT C D A ENT
OUT 2 3 0

5-82 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Compare Formatted (CMPF)


The Compare Formatted instruction compares the value in the
DS
HPP
Used
Used
accumulator with a specified number of discrete locations (132).
C MP F
K bbb
A aaa
1
The instruction requires a starting location (Aaaa) and the number
of bits (Kbbb) to be compared. The corresponding status flag will
be turned on, indicating the result of the comparison. The data format for this instruction is
2
BCD/Hex, Decimal and Binary.
3

Operand Data Type
A/B aaa
DL06 Range
bbb
4
Inputs X 0-777 -
Outputs Y 0-777 - 5
Control Relays C 0-1777 -
Stage Bits
Timer Bits
S
T
0-1777
0-377
-
-
6
Counter Bits
Special Relays
CT
SP
0-177
0-777
-
- 7
Constant K - 1-32

Discrete Bit Flags Description 8


SP60 On when the value in the accumulator is less than the instruction value.
SP61
SP62
On when the value in the accumulator is equal to the instruction value.
On when the value in the accumulator is greater than the instruction value.
9
NOTE: Status flags are valid only until another instruction uses the same flag.
10
In the following example, when X1 is on, the Load Formatted instruction loads the binary
value (6) from C10C13 into the accumulator. The CMPF instruction compares the value
11
in the accumulator to the value in Y20Y23 (E hex). The corresponding discrete status flag
will be turned on, indicating the result of the comparison. In this example, if the value in the 12
accumulator is less than the value specified in the Compare instruction, SP60 will turn on
energizing C30. 13
DirectSOFT
DirectSOFT32

X1 LDF C10
Load the value of the
specified discrete locations
Location

C10
Constant

K4
C13 C12 C11 C10
OFF ON ON OFF
14
K4 (C10-- C13) into the

CMPF Y20
accumulator

Compare the value in the


accumulator with the value
The unused accumulator
bits are set to zero A
K4 of the specified discrete 0 0 0 0 0 0 0 6

B
Acc.
location (Y20-- Y23)
SP60 C30 Compared
Y23 Y22 Y21 Y20 with
OUT
ON ON ON OFF
E
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-83


Chapter 5: Standard RLL Instructions - Logical

Compare with Stack (CMPS)


The Compare with Stack instruction is a 32-bit instruction that
C MP S
1 DS
HPP
Used
Used
compares the value in the accumulator with the value in the first
level of the accumulator stack. The data format for this instruction is
BCD/Hex, Decimal and Binary.
2 The corresponding status flag will be turned on, indicating the result of the comparison. This
does not affect the value in the accumulator.
3
Discrete Bit Flags Description
4 SP60
SP61
On when the value in the accumulator is less than the instruction value.
On when the value in the accumulator is equal to the instruction value.

5 SP62 On when the value in the accumulator is greater than the instruction value.

NOTE: Status flags are valid only until another instruction uses the same flag.
6 In the following example, when X1 is on, the value in V1400 and V1401 is loaded into the
7 accumulator using the Load Double instruction. The value in V1410 and V1411 is loaded
into the accumulator using the Load Double instruction. The value that was loaded into the
accumulator from V1400 and V1401 is placed on top of the stack when the second Load
8 instruction is executed. The value in the accumulator is compared with the value in the first
level of the accumulator stack using the CMPS instruction. The corresponding discrete status
9 flag will be turned on indicating the result of the comparison. In this example, if the value in
the accumulator is less than the value in the stack, SP60 will turn on, energizing C30.

10 DirectSOFT
DirectSOFT32
X1 LDD
Load the value in V1400 and
V1401 into the accumulator
6
V1401
5 0 0 3
V1400
5 4 4

V1400

11 LDD Load the value in V1410 and


V1411 into the accumulator
Acc.
6 5 0 0 3 5 4 4

V1410

12 CMPS
Compare the value in the
accumulator with the value
V1411 V1410
in the first level of the 5 5 0 0 3 5 4 4

13 SP60 C30
accumulator stack

Acc. 5 5 0 0 3 5 4 4

14 OUT

Handheld Programmer Keystrokes Compared with

A $
STR
B
1
ENT
Top of Stack

L D D B E A A

B
SHFT ENT
ANDST 3 3 1 4 0 0

SHFT L D D B E B A ENT
ANDST 3 3 1 4 1 0

C SHFT C
2
SHFT M
ORST
P
CV
S
RST
ENT

$ PREV G A ENT

D
STR 6 0
GX NEXT NEXT NEXT SHFT C D A ENT
OUT 2 3 0

5-84 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Logical

Compare Real Number (CMPR)


The Compare Real Number instruction compares a real number
CMPR
DS
HPP
Used
Used
value in the accumulator with two consecutive V-memory locations
containing a real number. The corresponding status flag will be A aaa 1
turned on, indicating the result of the comparison. Both numbers
being compared are 32 bits long. 2
3
Operand Data Type DL06 Range

V-memory
A
V
aaa
See memory map
4
Pointer
Constant R
P See memory map
-3.402823E+ 038 to + -3.402823E+ 038 5
Discrete Bit Flags
SP60
Description
On when the value in the accumulator is less than the instruction value.
6
SP61
SP62
On when the value in the accumulator is equal to the instruction value.
On when the value in the accumulator is greater than the instruction value. 7
SP71 On anytime the V-memory specified by a pointer (P) is not valid
8
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the LDR instruction loads the real number
9
representation for 7 decimal into the accumulator. The CMPR instruction compares
the accumulator contents with the real representation for decimal 6. Since 7 > 6, the 10
corresponding discrete status flag is turned on (special relay SP62), turning on control relay

DirectSOFT
C1.
DirectSOFT32
11
X1 LDR
R7.0
Load the real number
representation for decimal 7 12
into the accumulator Acc. 4 0 E 0 0 0 0 0

CMPR Compare the value with the 13


R6.0 real number representation

SP62
for decimal 6 CMPR 4 0 D 0 0 0 0 0
14
C1
OUT
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-85


Chapter 5: Standard RLL Instructions - Math

Math Instructions
1 Add (ADD)
ADD
Add is a 16-bit instruction that adds a BCD value in the
2 DS
HPP
Used
Used
accumulator with a BCD value in a V-memory location (Aaaa).
(You cannot use a constant as the parameter in the box.) The
A aaa

result resides in the accumulator.


3 Operand Data Type DL06 Range
A aaa
4 V-memory V See memory map
Pointer P See memory map

5 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.
6 SP66
SP67
On when the 16-bit addition instruction results in a carry.
On when the 32-bit addition instruction results in a carry.

7 SP70
SP75
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NONBCD number was encountered.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

9 In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the lower 16 bits of the accumulator
10 is added to the value in V2006 using the Add instruction. The value in the accumulator is
copied to V2010 using the Out instruction.

11 DirectSOFT
Direct SOFT32
X1 LD
4
V2000
9 3 5

V2000

12 Load the value in V2000 into


the lower 16 bits of the The unused accumulator
accumulator bits are set to zero

13 ADD
V2006
+
0 0 0 0 4

2
9

5 0
3 5

0
(Accumulator)

(V2006)

14 Add the value in the lower


16 bits of the accumulator
with the value in V2006
Acc. 7 4 3 5

A OUT
V2010 7 4 3 5

Copy the value in the lower V2010

B 16 bits of the accumulator to


V2010
Handheld Programmer Keystrokes

C $
STR
L
B

D
1
ENT

C A A A
SHFT ENT
ANDST 3 2 0 0 0

D SHFT A
0
D
3
D
3
C
2
A
0
A
0
G
6
ENT

GX SHFT V C A B A ENT
OUT AND 2 0 1 0

5-86 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Add Double (ADDD)


Add Double is a 32-bit instruction that adds the BCD value in
DS Used the accumulator with a BCD value (Aaaa), which is either two
ADDD
A aaa
1
HPP Used consecutive V-memory locations or an 8digit (max.) BCD
constant. The result resides in the accumulator. 2

Operand Data Type
A
DL06Range
aaa
3
V-memory
Pointer
V
P
See memory map
See memory map 4
Constant K 099999999

Discrete Bit Flags Description


5
SP63
SP66
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit addition instruction results in a carry.
6
SP67 On when the 32-bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative. 7
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.

8
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
9
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the 10
accumulator is copied to V2010 and V2011 using the Out Double instruction.

DirectSOFT
11
Direct SOFT V2001 V2000
X1
LDD
V2000
6 7 3 9 5 0 2 6
12
Load the value in V2000 and
V2001 into the accumulator

ADDD
+ 2
6 7
0
3
0
9
0
5
4
0
0
2
4
6
6
(Accumulator)

(V2006 and V2007)


13
V2006

Add the value in the


accumulator with the value
in V2006 and V2007
Acc. 8 7 3 9 9 0 7 2
14
OUTD
V2010 8 7 3

V2001
9 9 0 7

V2010
2 A
Copy the value in the

B
accumulator to V2010 and
V2011
Handheld Programmer Keystrokes
$ B

C
ENT
STR 1

SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0

D
SHFT A D D D C A A G ENT
0 3 3 3 2 0 0 6
GX SHFT D SHFT V C A B A ENT
OUT 3 AND 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-87


Chapter 5: Standard RLL Instructions - Math

Add Real (ADDR)


The Add Real instruction adds a real number in the accumulator with
1 DS
HPP
Used either a real constant or a real number occupying two consecutive
Used V-memory locations. The result resides in the accumulator. Both
ADDR
A aaa

2 numbers must be Real data type (IEEE floating point format).

3 Operand Data Type DL06 Range


A aaa
4 V-memory
Pointer
V
P
See memory map
See memory map
Constant R -3.402823E+ 38 to + -3.402823E+ 38
5 Discrete Bit Flags Description

6 SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
7 SP72
SP73
On anytime the value in the accumulator is an invalid floating point number.
On when a signed addition or subtraction results in a incorrect sign bit.

8 SP74 On anytime a floating point math operation results in an underflow error.

NOTE: Status flags are valid only until another instruction uses the same flag.
9
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit
10 IEEE format. You must use DirectSOFT for this feature.

11 DirectSOFT
DirectSOFT 5

12 X1
LDR
R7.0

13 Load the real number 7.0


into the accumulator

14
ADDR

A R15.0

Add the real number 15.0 to


the accumulator contents,

B which is in real number


format.

C OUTD
V1400

D Copy the result in the accumulator


to V1400 and V1401.

5-88 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Subtract (SUB)
Subtract is a 16-bit instruction that subtracts the BCD value SUB
DS
HPP
Used
Used
(Aaaa) in a V-memory location from the BCD value in the
lower 16 bits of the accumulator. The result resides in the
A aaa 1
accumulator.
Operand Data Type DL06Range
2

V-memory
A
V
aaa
See memory map 3
Pointer P See memory map

Discrete Bit Flags Description


4
SP63
SP64
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit subtraction instruction results in a borrow
5
SP65 On when the 32-bit subtraction instruction results in a borrow
SP70 On anytime the value in the accumulator is negative. 6
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.
7
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V2000 will be loaded into the
8
accumulator using the Load instruction. The value in V2006 is subtracted from the value in
the accumulator using the Subtract instruction. The value in the accumulator is copied to 9
V2010 using the Out instruction.
10
DirectSOFT
Direct SOFT32 V2000

X1 LD
V2000
2 4 7 5
11
Load the value in V2000 into
the lower 16 bits of the
accumulator
The unused accumulator
bits are set to zero
0 0 0 0 2 4 7 5
12
13
SUB _
1 5 9 2
V2006
Acc. 0 8 8 3
Subtract the value in V2006
from the value in the lower
16 bits of the accumulator
14
OUT 0 8 8 3
V2010

Copy the value in the lower


V2010 A
16 bits of the accumulator to
V2010
Handheld Programmer Keystrokes
B
$ B

C
ENT
STR 1

SHFT L D C A A A ENT
ANDST 3 2 0 0 0

SHFT

GX
S
RST
U
ISG
B

V
1
C
SHFT

A
V

B
AND
C

A
2
A
0
A
0
G
6
ENT
D
SHFT ENT
OUT AND 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-89


Chapter 5: Standard RLL Instructions - Math

Subtract Double (SUBD)


Subtract Double is a 32-bit instruction that subtracts the BCD value
1 DS
HPP
Used
Used
(Aaaa), which is either two consecutive V-memory locations or an
SUBD
A aaa
8-digit (max.) constant, from the BCD value in the accumulator.
2 Operand Data Type DL06 Range
3
V-memory
A
V
aaa
See memory map
Pointer P See memory map
4 Constant K 099999999

5 Discrete Bit Flags


SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.
SP64 On when the 16- bit subtraction instruction results in a borrow
6 SP65 On when the 32-bit subtraction instruction results in a borrow
SP70 On anytime the value in the accumulator is negative.
7 SP75 On when a BCD instruction is executed and a NONBCD number was encountered.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
9 into the accumulator using the Load Double instruction. The value in V2006 and V2007
is subtracted from the value in the accumulator. The value in the accumulator is copied to
10 V2010 and V2011 using the Out Double instruction.
DirectSOFT
Direct SOFT32 V2001 V2000

11
0 1 0 6 3 2 7 4
X1 LDD
V2000

Load the value in V2000 and

12 V2001 into the accumulator

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

13
V2006 ACC. 0 0 3 9 0 8 9 9

The in V2006 and V2007 is


subtracted from the value in
the accumulator

14 OUTD
V2010
0 0 3 9 0 8 9 9

V2011 V2010

A Copy the value in the


accumulator to V2010 and
V2011

B Handheld Programmer Keystrokes

$
STR
B
1
ENT

C SHFT

SHFT
L
ANDST
S
D

SHFT
3
D

U
3
B
C

D
2
A
0
A

C
0
A
A
0
ENT

A G ENT
RST ISG 1 3 2 0 0 6

D GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT

5-90 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Subtract Real (SUBR)
The Subtract Real is a 32-bit instruction that subtracts a real
number, which is either two consecutive V-memory locations or a S UBR
DS
HPP
Used
N/A
32-bit constant, from a real number in the accumulator. The result is A aaa 1
a 32-bit real number that resides in the accumulator. Both numbers
must be Real data type (IEEE floating point format). 2

Operand Data Type
A
DL06 Range
aaa
3
V-memory V See memory map
Pointer P See memory map 4
Constant R -3.402823E + 38 to+-3.402823E + 38

Discrete Bit Flags Description


5
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 6
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72
SP73
On anytime the value in the accumulator is an invalid floating point number.
On when a signed addition or subtraction results in a incorrect sign bit.
7
SP74 On anytime a floating point math operation results in an underflow error.
8
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT
DirectSOFT32
9
10
X1 4 1 B 0 0 0 0 0
LDR
R22.0

Load the real number 22.0

11
into the accumulator.
2 2 (decimal) 4 1 B 0 0 0 0 0 (Accumulator)
- 1 5 + 4 1 7 0 0 0 0 0 (SUBR)
7 Acc. 4

12
0 E 0 0 0 0 0
SUBR
R15.0 V1401 V1400
Subtract the real number 4 0 E 0 0 0 0 0 (Hex number)
15.0 from the accululator
contents, which is in real
number format.
Real Value
13
OUTD
Acc.
8 4
0 1
2
0
1
0
8
0
4 2
0 0
1
0
8
1
4
1
2 1
1 0
8
0
4
0
2
0
1
0
8 4
0 0
2
0
1
0
8
0
4 2
0 0
1
0
8
0
4
0
2 1
0 0
8
0
4
0
2
0
1
0
14
V1400

Copy the result in the accumulator


to V1400 and V1401. Sign Bit Exponent (8 bits) Mantissa (23 bits) A
ndard RLL
s tructions

128 + 1 = 129
129 - 127 = 2
1.11 x 2 (exp 2) = 111. binary= 7 decimal
B
Implies 2 (exp 2)

NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit C
IEEE format. You must use DirectSOFT for this feature
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-91


Chapter 5: Standard RLL Instructions- - Math

Multiply (MUL)
Multiply is a 16-bit instruction that multiplies the BCD value
(Aaaa), which is either a V-memory location or a 4digit MUL
1 DS
HPP
Used
Used
(max.) constant, by the BCD value in the lower 16 bits of the A aaa
accumulator The result can be up to 8 digits and resides in the
2 accumulator.

Operand Data Type DL06 Range


3 A aaa
V-memory V See memory map
4 Pointer
Constant
P
K
See memory map
09999

5 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.
6 SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.
7 NOTE: Status flags are valid only until another instruction uses the same flag.

8 In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in V2006 is multiplied by the value in
9 the accumulator. The value in the accumulator is copied to V2010 and V2011 using the Out
Double instruction.
DirectSOFT V2000

10
Direct SOFT32

X1 1 0 0 0
LD
V2000

11 Load the value in V2000 into


the lower 16 bits of the
accumulator
The unused accumulator
bits are set to zero
0 0 0 0 1 0 0 0 (Accumulator)

12
(V2006)
X 2 5
MUL
V2006 Acc. 0 0 0 2 5 0 0 0

13
The value in V2006 is
multiplied by the value in the
accumulator

14
0 0 0 2 5 0 0 0
OUTD
V2011 V2010
V2010

A
Copy the value in the
accumulator to V2010 and
V2011

B Handheld Programmer Keystrokes

$ B ENT
STR 1

C SHFT L
ANDST
D
3
C
2
A
0
A
0
A
0
ENT

SHFT M U L C A A G ENT

D GX
OUT
ORST

SHFT D
ISG

3
ANDST
C
2
A
2

0
B
0

1
A
0

0
ENT
6

5-92 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Multiply Double (MULD)
Multiply Double is a 32-bit instruction that multiplies the 8-digit
BCD value in the accumulator by the 8-digit BCD value in the two MULD
DS
HPP
Used
Used
consecutive V-memory locations specified in the instruction. The A aaa 1
lower 8 digits of the results reside in the accumulator. Upper digits
of the result reside in the accumulator stack. 2
Operand Data Type DL06 Range
3

V-memory
A
V
aaa
See memory map
4
Pointer P See memory map

Discrete Bit Flags Description


5
SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative. 6
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.
7
NOTE: Status flags are valid only until another instruction uses the same flag. 8
In the following example, when X1 is on, the constant Kbc614e hex will be loaded into the
accumulator. When converted to BCD the number is 12345678. That number is stored in 9
V1400 and V1401. After loading the constant K2 into the accumulator, we multiply it times
DirectSOFT
Direct SOFT32 Display

X1 LDD Load the hex equivalent


1 2 3 4 5 6 7 8 (Accumulator)
12345678, which
gives us 24691356.
10
of 12345678 decimal into

11
Kbc614e the accumulator.

Convert the value to V1401 V1400


BCD
BCD format. It will 1 2 3 4 5 6 7 8
occupy eight BCD digits

OUTD
V1400
(32 bits).
Output the number to
V1400 and V1401 using
the OUTD instruction. Acc.
X

2 4 6 9 1 3 5
2

6
(Accumulator) 12
LD
K2
Load the constant K2
into the accumulator. 13
2 4 6 9 1 3 5 6

14
MULD Multiply the accumulator
contents (2) by the
V1400 V1403 V1402
8-digit number in V1400
and V1401.

OUTD Move the result in the

A
accumulator to V1402
V1402 and V1403 using the
OUTD instruction.
Handheld Programmer Keystrokes

B
$ B ENT
STR 1

SHFT L D D PREV SHFT B C SHFT G B E SHFT E ENT


ANDST 3 3 1 2 6 1 4 4

C
SHFT B C D ENT
1 2 3
GX SHFT D B E A A ENT
OUT 3 1 4 0 0

D
SHFT L D PREV C ENT
ANDST 3 2

SHFT M U L D B E A A ENT
ORST ISG ANDST 3 1 4 0 0
GX SHFT D B E A C ENT
OUT 3 1 4 0 2

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-93


Chapter 5: Standard RLL Instructions - Math
Multiply Real (MULR)
The Multiply Real instruction multiplies a real number in the
accumulator with either a real constant or a real number occupying MULR
1 DS
HPP
Used
Used
two consecutive V-memory locations. The result resides in the
accumulator. Both numbers must be Real data type (IEEE floating
A aaa

2 point format).

Operand Data Type DL06 Range


3 A aaa
V-memory V See memory map

4 Pointer
Real Constant
P
R
See memory map
-3.402823E +38 to + -3.402823E +38

5 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.
6 SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
7 SP72
SP73
On anytime the value in the accumulator is an invalid floating point number.
On when a signed addition or subtraction results in an incorrect sign bit.

8 SP74 On anytime a floating point math operation results in an underflow error.

NOTE: Status flags are valid only until another instruction uses the same flag.
9
DirectSOFT
DirectSOFT32 Display

10 X1
LDR
R 7.0
4 0 E 0 0 0 0 0

11
Load the real number 7.0
into the accumulator.
7 (decimal) 4 0 E 0 0 0 0 0 (Accumulator)
x 1 5 X 4 1 7 0 0 0 0 0 (MULR)

12 MULR
R 15.0
1 0 5 Acc. 4 2 D

V1401
2 0 0

V1400
0 0

13 Multiply the accumulator


contents by the real number
15.0
4 2 D 2 0 0 0 0 (Hex number)

Real Value

14 OUTD
Acc.
8 4

0 1
2

0
1

0
8

0
4 2

0 1
1

0
8

1
4

1
2 1

0 1
8

0
4

0
2

1
1

0
8 4
0 0
2
0
1
0
8
0
4 2
0 0
1
0
8
0
4
0
2 1
0 0
8
0
4
0
2
0
1
0
V1400

A Copy the result in the accumulator


to V1400 and V1401. Sign Bit Exponent (8 bits) Mantissa (23 bits)

B 128 + 4 + 1 = 133
133 - 127 = 6
1.101001 x 2 (exp 6) = 1101001. binary= 105 decimal

Implies 2 (exp 6)
C NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit
IEEE format. You must use DirectSOFT for this feature.
D

5-94 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Divide (DIV)
Divide is a 16-bit instruction that divides the BCD value in
DIV
DS Used
the accumulator by a BCD value (Aaaa), which is either a
V-memory location or a 4-digit (max.) constant. The first part
A aaa 1
HPP Used
of the quotient resides in the accumulator and the remainder
resides in the first stack location. 2
Operand Data Type DL06 Range 3
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
4
Constant K 09999
5
Discrete Bit Flags Description
SP53
SP63
On when the value of the operand is larger than the accumulator can work with.
On when the result of the instruction causes the value in the accumulator to be zero.
6
SP70
SP75
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NONBCD number was encountered. 7
NOTE: Status flags are valid only until another instruction uses the same flag. 8
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator will be divided by 9
the value in V2006 using the Divide instruction. The value in the accumulator is copied to
V2010 using the Out instruction. 10
DirectSOFT
Direct SOFT32

X1 LD
V2000
5 0 0 0 11
V2000

Load the value in V2000 into


the lower 16 bits of the
accumulator
The unused accumulator
bits are set to zero
12
0 0 0 0 5 0 0 0 (Accumulater)
DIV
V2006

Acc. 1
4

0
9

2
V2006

0 0 0 0 0 0 0 2
13
The value in the
accumulator is divided by
the value in V2006
First stak location contains
the remainder
14
A
OUT 1 0 2
V2010 V2010

Copy the value in the lower


16 bits of the accumulator to
V2010
Handheld Programmer Keystrokes
B
$ B

C
ENT
STR 1

SHFT L D C A A A ENT
ANDST 3 2 0 0 0

SHFT

GX
D
3
I

SHFT
8
V

V
AND
C
C

A
2
A

B
0
A

A
0
G

ENT
6
ENT
D
OUT AND 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-95


Chapter 5: Standard RLL Instructions - Math

Divide Double (DIVD)


Divide Double is a 32-bit instruction that divides the BCD DIVD

1 DS
HPP
Used
Used
value in the accumulator by a BCD value (Aaaa), which
must be obtained from two consecutive V-memory locations.
A aaa

(You cannot use a constant as the parameter in the box.) The


2 first part of the quotient resides in the accumulator and the
remainder resides in the first stack location.
3 Operand Data Type DL06 Range
A aaa
4 V-memory V See memory map
Pointer P See memory map
5 Discrete Bit Flags Description
6 SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.
7
8 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
9 the accumulator using the Load Double instruction. The value in the accumulator is divided
by the value in V1420 and V1421 using the Divide Double instruction. The first part of the
10 quotient resides in the accumulator and the remainder resides in the first stack location. The
value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.

11 DirectSOFT
X1 LDD
V1400
0
V1401
1 5 0 0
V1400
0 0 0

12 Load the value in V1400 and


V1401 into the accumulator
The unused accumulator
bits are set to zero
0 1 5 0 0 0 0 0 (Accumulator)

13 DIVD
V1420
?

Acc. 0
0 0

0
0

0
0

3
0

0
0

0
5

0
0

0
(V1421 and V1420)

0 0 0 0 0 0 0 0
The value in the accumulator First stack location contains

14 is divided by the value in


V1420 and V1421
the remainder

A
OUTD
V1500 0 0 0 3 0 0 0 0

Copy the value in the V1501 V1500


accumulator to V1500

B and V1501

POP
Handheld Programmer Keystrokes
$ B ENT

C Retrieve the remainder


SHFT
STR
L
ANDST
D
3
1
D
3
B
1
E
4
A
0
A
0
ENT

D
OUTD D I V B E C A
SHFT ENT
V1502 3 8 AND 1 4 2 0
GX SHFT D B F A A ENT
Copy the value into
OUT 3 1 5 0 0
V1502 and V1503

5-96 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Divide Real (DIVR)


The Divide Real instruction divides a real number in the
DS
HPP
Used
N/A
accumulator by either a real constant or a real number
occupying two consecutive V-memory locations. The result
DIVR
A aaa 1
resides in the accumulator. Both numbers must be Real data
type (IEEE floating point format). 2
Operand Data Type DL06 Range 3
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
4
Real Constant R -3.402823E + 38 to + -3.402823E + 38

Discrete Bit Flags Description


5
SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative. 6
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72
SP74
On anytime the value in the accumulator is an invalid floating point number.
On anytime a floating point math operation results in an underflow error.
7
8
NOTE: Status flags are valid only until another instruction uses the same flag.
9
DirectSOFT
DirectSOFT32 Display
X1
LDR
R15.0
4 1 7 0 0 0 0 0

10
Load the real number 15.0

11
into the accumulator.
1 5 (decimal) 4 1 7 0 0 0 0 0 (Accumulator)
1 0 4 1 2 0 0 0 0 0 (DIVR )
1 . 5 Acc. 3 F C 0 0 0 0 0
DIVR
R10.0 V1401 V1400 12
Divide the accumulator contents 3 F C 0 0 0 0 0 (Hex number)

13
by the real number 10.0.

Real Value

14
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
OUTD
Acc. 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V1400

Copy the result in the accumulator


to V1400 and V1401. Sign Bit Exponent (8 bits) Mantissa (23 bits) ndard RLL
A
64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 1.1 x 2 (exp 0) = 1.1 binary= 1.5 decimal
127 - 127 = 0
Implies 2 (exp 0) B
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit
IEEE format. You must use DirectSOFT for this feature. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-97


Chapter 5: Standard RLL Instructions - Math

Increment (INC)
DS Used The Increment instruction increments a BCD value in a specified INC
V-memory location by 1 each time the instruction is executed. A aaa
1 HPP Used

Decrement (DEC)
2 DS Used The Decrement instruction decrements a BCD value in a
specified V-memory location by 1 each time the instruction is
DEC
HPP Used A aaa
3 executed.

4 Operand Data Type DL06 Range


A aaa
5 V-memory
Pointer
V
P
See memory map
See memory map

6 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.

7 SP75 On when a BCD instruction is executed and a NONBCD number was encountered.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

9 In the following increment example, when C5 makes an Off-to-On transition the value in
V1400 increases by one.

10 DirectSOFT

C5 INC
8
V1400
9 3 5

11 V1400

Increment the value in


V1400 by 1. V1400

12 Handheld Programmer Keystrokes


8 9 3 6

$ NEXT NEXT NEXT NEXT F ENT


13 SHFT
STR
I N C B E
5
A A ENT
8 TMR 2 1 4 0 0

14 In the following decrement example, when C5 makes an Off-to-On transition the value in
V1400 is decreased by one.
A DirectSOFT V1400
C5 8 9 3 5

B DEC
V1400

Decrement the value in

C V1400 by 1.

8
V1400
9 3 4

D Handheld Programmer Keystrokes

$ NEXT NEXT NEXT NEXT F ENT


STR 5

SHFT D E C B E A A ENT
3 4 2 1 4 0 0

5-98 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Add Binary (ADDB)


Add Binary is a 16-bit instruction that adds the
DS
HPP
Used
Used
binary value in the lower 16 bits of the accumulator
with a binary value (Aaaa), which is either a
ADDB
A aaa 1
V-memory location or a 16-bit constant. The result
can be up to 32 bits and resides in the accumulator. 2
3
Operand Data Type DL06 Range

V-memory
A
V
aaa
See memory map
4
Pointer
Constant
P
K
See memory map
0-FFFF, h=65636 5
Discrete Bit Flags Description 6
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66
SP67
On when the 16-bit addition instruction results in a carry.
On when the 32-bit addition instruction results in a carry.
7
SP70 On anytime the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in an incorrect sign bit. 8
NOTE: Status flags are valid only until another instruction uses the same flag. 9
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator will be added to 10
the binary value in V1420 using the Add Binary instruction. The value in the accumulator is
copied to V1500 and V1501 using the Out Double instruction. 11
Use either OR Constant

12
DirectSOFT V-memory
V1400
X1 0 A 0 5
LD LD
V1400 K2565

Load the value in V1400


into the lower 16 bits of
the accumulator
BIN The unused accumulator
bits are set to zero
13
0 0 0 0 0 A 0 5 (Accumulator)

ADDB
V1420
+

Acc.
1

1
2

C
C

C
4

9
(V1420)
14
The binary value in the

A
accumulator is added to the
binary value in V1420

OUTD 1 C C 9
V1500
V1500
Copy the value in the lower
16bits of the accumulator to
V1500 and V1501
B
Handheld Programmer Keystrokes

STR X(IN) 1 ENT


C
D
SHFT L D V 1 4 0 0 ENT

SHFT A D D B V 1 4 2 0 ENT

OU T SHFT D V 1 5 0 0 ENT

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-99


Chapter 5: Standard RLL Instructions - Math

Add Binary Double (ADDBD)


Add Binary Double is a 32-bit instruction that adds the binary ADDBD
1 DS
HPP
Used
Used
value in the accumulator with the value (Aaaa), which is either A aaa
two consecutive V-memory locations or an 8-digit (max.) binary
2 constant. The result resides in the accumulator.

Operand Data Type DL06 Range


3 A aaa
V-memory V See memory map
4 Pointer
Constant
P
K
See memory map
0-FFFF FFFF

5 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.
6 SP66
SP67
On when the 16-bit addition instruction results in a carry.
On when the 32-bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
7 SP73 On when a signed addition or subtraction results in an incorrect sign bit.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

9 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The binary value in the accumulator is
added with the binary value in V1420 and V1421 using the Add Binary Double instruction.
10 The value in the accumulator is copied to V1500 and V1501 using the Out Double
instruction.
11 DirectSOFT
Use either
V-memory
OR Constant

V1401 V1400
0 0 0 0 0 A 0 1

12
X1
LDD LDD
V1400 K2561

Load the value in V1400

13
and V1401 into the BIN
accumulator 0 0 0 0 0 A 0 1 (Accumulator)

+ 1 0 0 0 C 0 1 0 (V1421 and V1420)

ADDBD Acc. 1 0 0 0 C A 1 1

14 V1420

The binary value in the


accumulator is added with the
value in V1420 and V1421

A OUTD
V1500
1 0

V1501
0 0 C A

V1500
1 1

B Copy the value in the


accumulator to V1500
and V1501

C
Handheld
H andheld Programmer Keys trokes Programmer Keystrokes
$ B ENT
STR X(IN) 1STR 1

SHFT L D D B E A A ENT
LD S HF T D S HF T V 1 14 0 00

D
ANDST 3 3 4 0
D D B D B E C
ADD S HF T B
SHFT A D S HF T V 1 4 2 0 A ENT
0 3 3 1 3 1 4 2 0

OU T S HF T D
GX S HF T D V B1 F 5 A 0A 0
ENT
SHFT
OUT 3 1 5 0 0

5-100 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Subtract Binary (SUBB)


DS Used
Subtract Binary is a 16-bit instruction that subtracts the binary
value (Aaaa), which is either a V-memory location or a 4-digit
S UBB
A aaa
1
HPP Used (max.) binary constant, from the binary value in the accumulator.
The result resides in the accumulator. 2
Operand Data Type DL06 Range
A aaa 3
V-memory V See memory map
Pointer
Constant
P
K
See memory map
0-FFFF, h=65636
4
Discrete Bit Flags Description 5
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64
SP65
On when the 16-bit subtraction instruction results in a borrow.
On when the 32-bit subtraction instruction results in a borrow.
6
SP70 On anytime the value in the accumulator is negative.
7
NOTE: Status flags are valid only until another instruction uses the same flag. 8
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is subtracted from the 9
binary value in the accumulator using the Subtract Binary instruction. The value in the
accumulator is copied to V1500 using the Out instruction.
DirectSOFT Use either OR Constant
10
V-memory

X1 LD
11
LD

12
V1400 K1024
V1400
Load the value in V1400
into the lower 16 bits of BIN 1 0 2 4
the accumulator

SUBB The unused accumulator


13
V1420 bits are set to zero

The binary value in V1420 is


subtracted from the value in
the accumulator
-
0 0 0 0 1

0
0

A
2

0
4

B
(Accumulator)

(V1420) 14
0 6 1 9

A
Acc.
OUT
V1500

Copy the value in the lower 16


bits of the accumulator to V1500
0 6 1

V1500
9
B
Handheld Programmer Keystrokes

STR

SHFT L
X(IN)

D
1

V
ENT

1 4 0 0 ENT
C
SHFT

V
S

1
SHFT

4 2
U B

0
B

ENT
D
OUT SHFT D V 1 5 0 0 ENT

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-101


Chapter 5: Standard RLL Instructions - Math

Subtract Binary Double (SUBBD)


Subtract Binary Double is a 32-bit instruction that subtracts the
1 DS
HPP
Used
Used
binary value (Aaaa), which is either two consecutive V-memory
S UBBD
A aaa
locations or an 8-digit (max.) binary constant, from the binary
2 value in the accumulator. The result resides in the accumulator.

Operand Data Type DL06 Range


3 A aaa
V-memory V See memory map
4 Pointer P See memory map
Constant K 0-FFFF FFFF

5 Discrete Bit Flags Description


6 SP63
SP64
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit subtraction instruction results in a borrow.
SP65 On when the 32-bit subtraction instruction results in a borrow.
7 SP70 On anytime the value in the accumulator is negative.

8 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
9 the accumulator using the Load Double instruction. The binary value in V1420 and V1421
is subtracted from the binary value in the accumulator using the Subtract Binary Double
10 instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.

11 DirectSOFT
Use either
V-memory
OR Constant

12 X1 LDD
V1400
LDD
K393471 0
V1401
0 0 6 0
V1400
0 F F

13 Load the value in V1400


and V1401 into the
accumulator
BIN

(Accumulator)
0 0 0 6 0 0 F F

14 SUBBD
V1420

The binary value in V1420 and


Acc.
- 0

0
0

0
0

0
0

5
1

E
A

6
0

F
1

E
(V1421 and V1420)

A
V1421 is subtracted from the
binary value in the accumulator

OUTD
0 0 0 5 E 6 F E
V1500

B Copy the value in the


accumulator to V1500
and V1501
V1501 V1500

Handheld Programmer Keystrokes

C Handheld
$
STRSTR
Programmer Keystrokes

L
B
1
X(IN)
D
ENT

D
1 ENT
B E A A
SHFT ENT
SHFT L
ANDST 3D V 1 1 4 4 0 0 0 ENT

D
3

SHFT
SHFT SS SHFT U U B BB D
B B E C A ENT
SHFT
RST ISG 1 1 3 1 4 2 0
VGX 1 D 4 2 B 0F ENT
A A
SHFT ENT
OUT 3 1 5 0 0
OUT SHFT D V 1 5 0 0 ENT

5-102 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Multiply Binary (MULB)


Multiply Binary is a 16-bit instruction that multiplies the binary
DS
HPP
Used
Used
value (Aaaa), which is either a V-memory location or a 4-digit MULB
A aaa
1
(max.) binary constant, by the binary value in the accumulator.
The result can be up to 32 bits and resides in the accumulator. 2
Operand Data Type DL06 Range 3
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
4
Constant K 0-FFFF
5
Discrete Bit Flags Description
SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.
6
7
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V1400 will be loaded into the
8
accumulator using the Load instruction. The binary value in V1420 is multiplied by the
binary value in the accumulator using the Multiply Binary instruction. The value in the 9
accumulator is copied to V1500 using the Out instruction.
DirectSOFT
DirectSOFT32 Display
Use either
V-memory
OR Constant 10
X1 LD
V1400
LD
K2561
0
V1400
A 0 1 11
12
Load the value in V1400
into the lower 16 bits of
the accumulator BIN
The unused accumulator
bits are set to zero
0 0 0 0 0 A 0 1

13
(Accumulator)
MULB
x 0 0 2 E (V1420)
V1420
Acc. 0 0 0 1 C C 2 E
The binary value in V1420 is
multiplied by the binary
value in the accumulator 14
OUTD
V1500

Copy the value of the accumulator


to V1500 and V1501
0 0 0

V1501
1 C C 2

V1500
E
A
Handheld Programmer Keystrokes B
STR X 1 ENT

SHFT L D V 1 4 0 0 ENT C
SHFT M U L B V 1 4 2 0 ENT

OUT SHFT D V 1 5 0 0 ENT


D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-103


Chapter 5: Standard RLL Instructions - Math

Divide Binary (DIVB)


Divide Binary is a 16-bit instruction that divides the binary value in
1 DS
HPP
Used
Used the accumulator by a binary value (Aaaa), which is either a V-memory DIVB
A aaa
location or a 16-bit (max.) binary constant. The first part of the
2 quotient resides in the accumulator and the remainder resides in the
first stack location.

3
Operand Data Type
A
DL06 Range
aaa

4 V-memory
Pointer
V
P
See memory map
See memory map
Constant K 0-FFFF
5 Discrete Bit Flags Description
6 SP53
SP63
On when the value of the operand is larger than the accumulator can work with.
On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
7
8 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V1400 will be loaded into the
9 accumulator using the Load instruction. The binary value in the accumulator is divided by
the binary value in V1420 using the Divide Binary instruction. The value in the accumulator
10 is copied to V1500 using the Out instruction.
DirectSOFT Display
DirectSOFT32
Use either
V-memory
OR Constant

11 X1
LD LDD
V1400
F A 0 1
V1400 K64001

12 Load the value in V1400


into the lower 16 bits of BIN
the accumulator The unused accumulator

13 DIVB
bits are set to zero

_..
0 0 0 0 F A 0 1 (Accumulator)

V1420 0 0 5 0 (V1420)

14 The binary value in th


accumulator is divided by
the binary value in V1420
Acc. 0 3 2 0 0 0 0 0 0 0 0

First stack location contains


0

the remainder

A OUT
V1500 0 3 2 0

B
Copy the value in the lower 16 V1500
bits of the accumulator to V1500

C Handheld Programmer Keystrokes


STR X 1 ENT

D SHFT L D V 1 4 0 0 ENT

SHFT D I V B V 1 4 2 0 ENT

OUT SHFT D V 1 5 0 0 ENT

5-104 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Increment Binary (INCB)


DS Used The Increment Binary instruction increments a INCB
HPP Used binary value in a specified V-memory location by
1 each time the instruction is executed.
A aaa 1
Operand Data Type DL06 Range 2
A aaa
V-memory
Pointer
V
P
See memory map
See memory map
3
Discrete Bit Flags Description 4
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
5
In the following example when C5 is on, the binary value in V2000 is increased by 1. 6
DirectSOFT

7
Direct SOFT32 V2000 Handheld Programmer Keystrokes
C5 4 A 3 C
INCB $ SHFT C F ENT
STR 2 5
V2000
SHFT I N C B C A A A ENT

8
Increment the binary value 8 TMR 2 1 2 0 0 0
in V2000 by1 V2000
4 A 3 D

Decrement Binary (DECB)


9
DS
HPP
Used
Used
The Decrement Binary instruction decrements a binary value in
a specified V-memory location by 1 each time the instruction is
DECB
A aaa
10
executed.
11
Operand Data Type DL06 Range
A aaa 12
V-memory V See memory map
Pointer P See memory map 13
Discrete Bit Flags
SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.
14
NOTE: Status flags are valid only until another instruction uses the same flag.
A
In the following example when C5 is on, the value in V2000 is decreased by 1. B
C
DirectSOFT V2000
Handheld Programmer Keystrokes
4 A ?
3 C
C5 DECB $ C F
SHFT ENT
STR 2 5
V2000
D E C B C A A A

D
SHFT ENT
Decrement the binary value 3 4 2 1 2 0 0 0
in V2000 by1 V2000
4 A ?
3 B

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-105


Chapter 5: Standard RLL Instructions - Math
Add Formatted (ADDF)
Add Formatted is a 32-bit instruction that adds the ADDF A aaa
DS Used BCD value in the accumulator with the BCD value K bbb
1 HPP Used (Aaaa) which is a range of discrete bits. The specified
range (Kbbb) can be 1 to 32 consecutive bits. The
2 result resides in the accumulator.
Operand Data Type DL06 Range
3
Inputs
A
X 0777
aaa bbb

Outputs Y 0777
4 Control Relays C 01777
Stage Bits S 01777
5 Timer Bits
Counter Bits
T
CT
0377
0177


Special Relays SP 0-137 320-717
6 Global I/O GX 0-3777
Constant K 132
7 Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
8 SP66 On when the 16-bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
9 SP70
SP73
On anytime the value in the accumulator is negative.
On when a signed addition or subtraction results in an incorrect sign bit.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
10
NOTE: Status flags are valid only until another instruction uses the same flag.
11 In the following example, when X6 is on, the BCD value formed by discrete locations X0X3
is loaded into the accumulator using the LDF instruction. The BCD value formed by discrete
12 locations C0C3 is added to the value in the accumulator using the ADDF instruction.
The value in the lower four bits of the accumulator is copied to Y10Y13 using the OUTF
13 instruction.
DirectSOFT32
DirectSOFTDisplay X3 X2 X1 X0
X6 Load the BCD value represented ON OFF OFF OFF

14
LDF X0
by discrete locations X0X3
K4 into the accumulator
The unused accumulator
bits are set to zero

A
Add the BCD value in the 0 0 0 0 0 0 0 8 (Accumulator) C3 C2 C1 C0
ADDF C0
accumulator with the value
K4 represented by discrete + 3 (C0-C3) OFF OFF ON ON
location C0C3
Acc. 0 0 0 1 0 0 0 1

B OUTF Y10 Copy the lower 4 bits of the


accumulator to discrete
K4 locations Y10Y13

Handheld Programmer Keystrokes

C $
STR

L
G

D
6
ENT

F A E
Y13 Y12 Y11 Y10
OFF OFF OFF ON

SHFT ENT
ANDST 3 5 0 4

D SHFT A
0
D
3
D
3
F
5
NEXT NEXT NEXT NEXT A
0
E
4
ENT

GX SHFT F B A E ENT
OUT 5 1 0 4

5-106 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Subtract Formatted (SUBF)
Subtract Formatted is a 32-bit instruction that subtracts the BCD S UBF A aaa
DS Used
value (Aaaa), which is a range of discrete bits, from the BCD value K bbb
HPP Used
in the accumulator. The specified range (Kbbb) can be 1 to 32
consecutive bits. The result resides in the accumulator.
1
Operand Data Type DL06 Range 2
A aaa bbb
Inputs
Outputs
X
Y
0777
0777


3
Control Relays C 01777
Stage Bits S 01777 4
Timer Bits T 0377
Counter Bits
Special Relays
CT
SP
0177
0-137 320-717


5
Global I/O GX 0-3777
Constant K 132 6
Discrete Bit Flags Description 7
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64
SP65
On when the 16-bit subtraction instruction results in a borrow.
On when the 32 bit subtraction instruction results in a borrow
8
SP70
SP73
On any time the value in the accumulator is negative.
On when a signed addition or subtraction results in an incorrect sign bit. 9
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
10
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X6 is on, the BCD value formed by discrete locations X0X3
11
is loaded into the accumulator using the LDF instruction. The BCD value formed by discrete
location C0C3 is subtracted from the BCD value in the accumulator using the SUBF 12
instruction. The value in the lower four bits of the accumulator is copied to Y10Y13 using
the OUTF instruction. 13
DirectSOFT
DirectSOFT32 Display X3 X2 X1 X0
X6
LDF
K4
X0
Load the BCD value represented
by discrete locations X0-X3 into
the accumulator
The unused accumulator
ON OFF OFF ON
14
bits are set to zero

SUBF
K4
C0 Subtract the BCD value
represented by C0-C3 from
the value in the accumulator y
0 0 0 0 0 0 0 9
8
(Accumulator)

(C0-- C3)
C3 C2 C1
ON OFF OFF OFF
C0
A
ACC. 0 0 0 0 0 0 0 1

OUTF
K4
Y10 Copy the lower 4 bits of the
accumulator to discrete
locations Y10-- Y13 B
Handheld Programmer Keystrokes

$
STR

L
G

D
6

F
ENT

A E
Y13 Y12 Y11 Y10
OFF OFF OFF ON C
SHFT ENT

D
ANDST 3 5 0 4

SHFT S U B F NEXT NEXT NEXT NEXT A E ENT


SHFT
RST ISG 1 5 0 4
GX SHFT F B A E ENT
OUT 5 1 0 4

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-107


Chapter 5: Standard RLL Instructions - Math
Multiply Formatted (MULF)
Multiply Formatted is a 16-bit instruction that multiplies the
MULF A aaa
BCD value in the accumulator by the BCD value (Aaaa) which is
1 DS Used a range of discrete bits. The specified range (Kbbb) can be 1 to 16
K bbb
HPP Used consecutive bits. The result resides in the accumulator.
2 Operand Data Type DL06 Range
A aaa bbb
3 Inputs X 0777
Outputs Y 0777
4 Control Relays
Stage Bits
C
S
01777
01777


Timer Bits T 0377
5 Counter Bits CT 0177
Special Relays SP 0-137 320-717
6 Global I/O
Constant
GX
K
0-3777


116

7 Discrete Bit Flags Description


SP63 On when the result of the instruction causes the value in the accumulator to be zero.
8 SP70 On any time the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
9
10 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X6 is on, the value formed by discrete locations X0X3 is
11 loaded into the accumulator using the Load Formatted instruction. The value formed by
discrete locations C0C3 is multiplied by the value in the accumulator using the Multiply
12 Formatted instruction. The value in the lower four bits of the accumulator is copied to Y10
Y13 using the Out Formatted instruction.
DirectSOFT
DirectSOFT32 Display

13
X3 X2 X1 X0
X6 Load the value represented OFF OFF ON ON
LDF X0
by discrete locations X0-- X3
K4 into the accumulator
The unused accumulator

14 MULF C0
Multiply the value in the
accumulator with the value
bits are set to zero
0 0 0 0 0 0 0 3 (Accumulator) C3 C2 C1
OFF OFF ON OFF
C0
K4 represented by discrete X 2 (C0-- C3)

A
locations C0-- C3
Acc. 0 0 0 0 0 0 0 6
Copy the lower 4 bits of the
OUTF Y10
accumulator to discrete
K4 locations Y10-- Y13

B Handheld Programmer Keystrokes


$ G Y13 Y12 Y11 Y10
ENT
STR 6

C
OFF ON ON OFF

SHFT L D F A E ENT
ANDST 3 5 0 4

M U L F A E

D
SHFT NEXT NEXT NEXT NEXT ENT
ORST ISG ANDST 5 0 4
GX SHFT F B A E ENT
OUT 5 1 0 4

5-108 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Divide Formatted (DIVF)
Divide Formatted is a 16-bit instruction that divides the BCD value
in the accumulator by the BCD value (Aaaa), a range of discrete DIVF A aaa
DS
HPP
Used
Used
bits. The specified range (Kbbb) can be 1 to 16 consecutive bits. K bbb 1
The first part of the quotient resides in the accumulator and the
remainder resides in the first stack location. 2
Operand Data Type DL06 Range
A aaa bbb 3
Inputs X 0777
Outputs
Control Relays
Y
C
0777
01777


4
Stage Bits S 01777
Timer Bits T 0377 5
Counter Bits CT 0177
Special Relays
Global I/O
P
X
0-137 320-717
0-3777


6
Constant K 116
7
Discrete Bit Flags Description
SP53
SP63
On when the value of the operand is larger than the accumulator can work with.
On when the result of the instruction causes the value in the accumulator to be zero.
8
SP70
SP75
On any time the value in the accumulator is negative.
On when a BCD instruction is executed and a NON-BCD number was encountered. 9
NOTE: Status flags are valid only until another instruction uses the same flag. 10
In the following example, when X6 is on, the value formed by discrete locations X0X3
is loaded into the accumulator using the Load Formatted instruction. The value in the
11
accumulator is divided by the value formed by discrete location C0C3 using the Divide
Formatted instruction. The value in the lower four bits of the accumulator is copied to Y10 12
Y13 using the Out Formatted instruction.
DirectSOFT
DirectSOFT32 Display

X6 Load the value represented


X3 X2
ON OFF OFF OFF
X1 X0 13
LDF X0 by discrete locations X0-- X3
K4 into the accumulator
The unused accumulator
bits are set to zero
(Accumulator)
14
Divide the value in the 0 0 0 0 0 0 0 8 C3 C2 C1 C0
DIVF C0

A
accumulator with the value _.. OFF OFF ON OFF
K4 represented by discrete 2 (C0-- C3)
location C0-- C3
Acc. 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0

Copy the lower 4 bits of the First stack location contains

B
OUTF Y10 accumulator to discrete the remainder
K4 locations Y10-- Y13

Handheld Programmer Keystrokes Y13 Y12 Y11 Y10

$
STR

L
G

D
6
ENT

F A E
OFF ON OFF OFF
C
SHFT ENT

D
ANDST 3 5 0 4

SHFT D I V F NEXT NEXT NEXT NEXT A E ENT


3 8 AND 5 0 4
GX SHFT F B A E ENT
OUT 5 1 0 4

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-109


Chapter 5: Standard RLL Instructions - Math
Add Top of Stack (ADDS)
Add Top of Stack is a 32-bit instruction that adds the BCD ADDS
value in the accumulator with the BCD value in the first
1 DS
HPP
Used
Used
level of the accumulator stack. The result resides in the
accumulator. The value in the first level of the accumulator
2 stack is removed and all stack values are moved up one level.
Discrete Bit Flags Description
3 SP63
SP66
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit addition instruction results in a carry.

4 SP67
SP70
On when the 32 bit addition instruction results in a carry.
On anytime the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in an incorrect sign bit.
5 SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.

6 NOTE: Status flags are valid only until another instruction uses the same flag.

7 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The value in V1420 and V1421
8 is loaded into the accumulator using the Load Double instruction, pushing the value
previously loaded in the accumulator onto the accumulator stack. The value in the first level
of the accumulator stack is added with the value in the accumulator using the Add Stack
9 instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
10 DirectSOFT
DirectS OF T 32 Dis play V1401 V1400

11
X1 Load the value in V1400 and 0 0 3 9 5 0 2 6 Accumulator s tack
LDD after 1s t LDD
V1401 into the accumulator
V1400
Level 1 X X X X X X X X
Acc. 0 0 3 9 5 0 2 6 Level 2 X X X X X X X X

12 Load the value in V1420 and 0


V1421
0 1 7 2
V1420
0 5 6
Level 3
Level 4
Level 5
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
LDD

13
V1421 into the accumulator Level 6 X X X X X X X X
V1420
Level 7 X X X X X X X X
Acc. 0 0 1 7 2 0 5 6
Level 8 X X X X X X X X

14 ADDS Add the value in the


accumulator with the value
in the firs t level of the
accumulator s tack
Acc. 0 0 5 6 7 0 8 2
Accumulator s tack

A
after 2nd LDD

C opy the value in the Level 1 0 0 3 9 5 0 2 6


OU T D
accumulator to V1500 Level 2 X X X X X X X X
V1500 and V1501

B
0 0 5 6 7 0 8 2 Level 3 X X X X X X X X

Handheld Programmer Keystrokes Level 4 X X X X X X X X


V1501 V1500
Level 5 X X X X X X X X
$ B ENT
STR 1 Level 6 X X X X X X X X

C SHFT L
ANDST

L
D

D
3
D

D
3
B

B
1
E

E
4
A

C
0
A

A
0
ENT
Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

SHFT ENT
ANDST 3 3 1 4 2 0

D SHFT

GX
A
0
D

D
3
D
3
S

B
RST
F
ENT

A A
SHFT ENT
OUT 3 1 5 0 0

5-110 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Subtract Top of Stack (SUBS)
Subtract Top of Stack is a 32-bit instruction that subtracts S UBS
the BCD value in the first level of the accumulator stack from
DS
HPP
Used
Used
the BCD value in the accumulator. The result resides in the
accumulator. The value in the first level of the accumulator
1
stack is removed and all stack values are moved up one level.
2
Discrete Bit Flags Description
SP63
SP64
On when the result of the instruction causes the value in the accumulator to be zero.
On when the 16-bit subtraction instruction results in a borrow.
3
SP65
SP70
On when the 32 bit subtraction instruction results in a borrow.
On anytime the value in the accumulator is negative. 4
SP73 On when a signed addition or subtraction results in an incorrect sign bit.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered. 5
NOTE: Status flags are valid only until another instruction uses the same flag. 6
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The value in V1420 and V1421 is 7
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded into the accumulator onto the accumulator stack. The BCD value in the first level 8
of the accumulator stack is subtracted from the BCD value in the accumulator using the
Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501
using the Out Double instruction.
9
DirectSOFT
DirectSOFT32 Display

X1 LDD Load the value in V1400 and


V1401 into the accumulator
0
V1401
0 1 7 2
V1400
0 5 6 Accumulator stack
after 1st LDD
10
V1400

11
Level 1 X X X X X X X X
Acc. 0 0 1 7 2 0 5 6 Level 2 X X X X X X X X
Level 3 X X X X X X X X
Load the value in V1420 and Level 4 X X X X X X X X

12
LDD V1421 V1420
V1421 into the accumulator
V1420 0 0 3 9 5 0 2 6 Level 5 X X X X X X X X
Level 6 X X X X X X X X
Level 7 X X X X X X X X

SUBS
Subtract the value in the first
level of the accumulator
stack from the value in the
Acc. 0 0 3 9 5 0 2 6
Level 8 X X X X X X X X
13
accumulator

Acc. 0 0 2 2 2 9 7 0
Accumulator stack
after 2nd LDD
14
Copy the value in the

A
OUTD Level 1 0 0 1 7 2 0 5 6
accumulator to V1500
V1500 and V1501 Level 2 X X X X X X X X
Sta

0 0 2 2 2 9 7 0 Level 3 X X X X X X X X
Level 4 X X X X X X X X

B
V1501 V1500
Handheld Programmer Keystrokes Level 5 X X X X X X X X

$ B Level 6 X X X X X X X X
ENT
STR 1 Level 7 X X X X X X X X
SHFT

SHFT
L
ANDST

L
D

D
3
D

D
3
B

B
1
E

E
4
A

C
0
A

A
0
ENT

ENT
Level 8 X X X X X X X X
C
ANDST 3 3 1 4 2 0

SHFT

GX
S
RST
SHFT

D
U
ISG
B

B
1
S

F
RST
A
ENT

A
D
SHFT ENT
OUT 3 1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-111


Chapter 5: Standard RLL Instructions - Math
Multiply Top of Stack (MULS)
Multiply Top of Stack is a 16-bit instruction that multiplies a
4-digit BCD value in the first level of the accumulator stack by a MULS
1 DS
HPP
Used
Used
4-digit BCD value in the accumulator. The result resides in the
accumulator. The value in the first level of the accumulator stack is
2 removed and all stack values are moved up one level.

3 Discrete Bit Flags


SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.

4 SP70
SP75
On any time the value in the accumulator is negative.
On when a BCD instruction is executed and a NON-BCD number was encountered.

5 NOTE: Status flags are valid only until another instruction uses the same flag.
6 In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The value in V1420 is loaded into the accumulator
7 using the Load instruction, pushing the value previously loaded in the accumulator onto the
accumulator stack. The BCD value in the first level of the accumulator stack is multiplied
8 by the BCD value in the accumulator using the Multiply Stack instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.

9
DirectSOFT
DirectSOFT32 Display V1400
X1 Load the value in V1400 into 5 0 0 0 Accumulator stack
LD The unused accumulator after 1st LDD
the accumulator
V1400 bits are set to zero

10
Level 1 X X X X X X X X
Acc. 0 0 0 0 5 0 0 0 Level 2 X X X X X X X X
Level 3 X X X X X X X X

11
V1420 Level 4 X X X X X X X X

LD Load the value in V1420 into 0 2 0 0 Level 5 X X X X X X X X


the accumulator The unused accumulator
V1420 Level 6 X X X X X X X X
bits are set to zero
Level 7 X X X X X X X X

12 MULS
Multiply the value in the
Acc. 0 0 0 0 0 2 0 0
Level 8 X X X X X X X X

accumulator with the value

13
in the first level of the
accumulator stack Acc. 0 1 0 0 0 0 0 0
Accumulator stack
after 2nd LDD

14 OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
0 1 0 0 0 0 0 0
Level 1
Level 2
Level 3
0
X
X
0
X
X
0
X
X
0
X X
X X
5 0
X
X
0
X
X
0
X
X Standard RLL
V1501 V1500

A
Level 4 X X X X X X X X
Level 5 X X X X X X X X
Handheld Programmer Keystrokes
Level 6 X X X X X X X X
$ B ENT Level 7 X X X X X X X X

B
STR 1
Level 8 X X X X X X X X
SHFT L D B E A A ENT
ANDST 3 1 4 0 0

L D B E C A

C
SHFT ENT
ANDST 3 1 4 2 0

SHFT M U L S ENT
ORST ISG ANDST RST

D
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

5-112 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Divide by Top of Stack (DIVS)
Divide Top of Stack is a 32-bit instruction that divides the
8-digit BCD value in the accumulator by a 4-digit BCD value DIVS
DS
HPP
Used
Used
in the first level of the accumulator stack. The result resides in 1
the accumulator and the remainder resides in the first level of the
accumulator stack. 2
Discrete Bit Flags
SP53
Description
On when the value of the operand is larger than the accumulator can work with.
3
SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On any time the value in the accumulator is negative. 4
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
5
NOTE: Status flags are valid only until another instruction uses the same flag.
6
In the following example, when X1 is on, the Load instruction loads the value in V1400 into
the accumulator. The value in V1420 is loaded into the accumulator using the Load Double
instruction, pushing the value previously loaded in the accumulator onto the accumulator
7
stack. The BCD value in the accumulator is divided by the BCD value in the first level of the
accumulator stack using the Divide Stack instruction. The Out Double instruction copies the 8
value in the accumulator to V1500 and V1501.
DirectSOFT
DirectSOFT32 Display

X1 Load the value in V1400 into 0


V1400
0 2 0
Accumulator stack
after 1st LDD
9
LD The unused accumulator X X X X X X X X

10
the accumulator Level 1
V1400 bits are set to e ro
Level 2 X X X X X X X X
Acc. 0 0 0 0 0 0 2 0 Level 3 X X X X X X X X
Level 4 X X X X X X X X

LDD Load the value in V1420 and 0


V1421
0 5 0 0
V1420
0 0 0
Level 5
Level 6
X X
X X
X
X
X
X
X X
X X
X
X
X
X
11
V1421 into the accumulator Level 7 X X X X X X X X

12
V1420
Level 8 X X X X X X X X
Acc. 0 0 5 0 0 0 0 0

Accumulator stack
after 2nd LDD
DIVS Divide the value in the
accumulator by the value in
the first level of the Acc. 0 0 0 2 5 0 0 0
Level 1
Level 2
0
X X
0 0
X
0
X
0
X X
0 2
X
0
X
13
accumulator stack
X X X X X X X X

14
Level 3
Level 4 X X X X X X X X
Copy the value in the
OUTD Level 5 X X X X X X X X
accumulator to V1500
V1500 and V1501 0 0 0 2 5 0 0 0 Level 6 X X X X X X X X
V1501 V1500 Level 7
Level 8
X X
X X
X
X
X
X
X X
X X
X
X
X
X
A
andheld ro rammer eystrokes

ST 1
T
Level 1
The remainder resides in the
first stack location

0 0 0 0 0 0 0 0
B
L D A A

C
S FT T Level 2 X X X X X X X X
A DST 3 1 4 0 0
Level 3 X X X X X X X X
S FT L D D C A T
A DST 3 3 1 4 2 0 Level 4 X X X X X X X X

D
D I V S Level 5 X X X X X X X X
S FT T
3 8 AD ST Level 6 X X X X X X X X
X S FT D F A A T Level 7 X X X X X X X X
OUT 3 1 5 0 0
Level 8 X X X X X X X X

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-113


Chapter 5: Standard RLL Instructions - Math
Add Binary Top of Stack (ADDBS)
Add Binary Top of Stack instruction is a 32-bit instruction that ADDBS
adds the binary value in the accumulator with the binary value in
1 DS
HPP
Used
Used
the first level of the accumulator stack. The result resides in the
accumulator. The value in the first level of the accumulator stack
2 is removed and all stack values are moved

Discrete Bit Flags Description


3 SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66 On when the 16-bit addition instruction results in a carry.
4 SP67
SP70
On when the 32 bit addition instruction results in a carry.
On anytime the value in the accumulator is negative.

5 SP73 On when a signed addition or subtraction results in an incorrect sign bit.

6 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
7 into the accumulator using the Load Double instruction. The value in V1420 and V1421 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
8 loaded in the accumulator onto the accumulator stack. The binary value in the first level of
the accumulator stack is added with the binary value in the accumulator using the Add Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
9 DirectSOFT
Double instruction.
DirectS OF T 32 Dis play V1401 V1400

10 X1 LDD
V1400
Load the value in V1400 and
V1401 into the accumulator
0 0 3 A 5 0 C 6

Level 1 X
Accumulator s tack
after 1s t LDD

X X X X X X X

11
Acc. 0 0 3 A 5 0 C 6 Level 2 X X X X X X X X
Level 3 X X X X X X X X
V1421 V1420 Level 4 X X X X X X X X
0 0 1 7 B 0 5 F Level 5 X X X X X X X X

12
Load the value in V1420 and
LDD
V1421 into the accumulator Level 6 X X X X X X X X
V1420
Level 7 X X X X X X X X
Acc. 0 0 1 7 B 0 5 F
Level 8 X X X X X X X X

13 ADDBS Add the binary value in the


accumulator with the binary
Acc. 0 0 5 2 0 1 2 5
value in the firs t level of the

14
accumulator s tack Accumulator s tack
after 2nd LDD

Level 1 0 0 3 A 5 0 C 6
OU T D C opy the value in the
accumulator to V1500 Level 2 X X X X X X X X

A
V1500 and V1501 0 0 5 2 0 1 2 5
Level 3 X X X X X X X X
S tandard R LL

Level 4 X X X X X X X X
Handheld Programmer Keystrokes
Level 5 X X X X X X X X

B $ B Level 6 X X X X X X X X
ENT
STR 1
Level 7 X X X X X X X X
SHFT L D D B E A A ENT Level 8 X X X X X X X X
ANDST 3 3 1 4 0 0

C SHFT

SHFT
L
ANDST

A
D

D
3
D

D
3

B
B

S
1
E
4

ENT
C
2
A
0
ENT

0 3 3 1 RST

D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT

5-114 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math
Subtract Binary Top of Stack (SUBBS)
Subtract Binary Top of Stack is a 32-bit instruction that subtracts
the binary value in the first level of the accumulator stack from S UBBS
DS
HPP
Used
Used
the binary value in the accumulator. The result resides in the 1
accumulator. The value in the first level of the accumulator stack is
removed and all stack locations are moved up one level. 2
Discrete Bit Flags Description 3
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64
SP65
On when the 16-bit subtraction instruction results in a borrow.
On when the 32-bit subtraction instruction results in a borrow.
4
SP70 On any time the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in an incorrect sign bit. 5
NOTE: Status flags are valid only until another instruction uses the same flag. 6
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The value in V1420 and V1421 is
7
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded in the accumulator onto the accumulator stack. The binary value in the first level 8
of the accumulator stack is subtracted from the binary value in the accumulator using the
Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501
using the Out Double instruction.
9
DirectSOFT
DirectSOFT32 Display

X1 LDD Load the value in V1400 and


0
V1401
0 1 A 2
V1400
0 5 B Accumulator stack
10
after 1st LDD
V1401 into the accumulator

11
V1400
Level 1 X X X X X X X X
Acc. 0 0 1 A 2 0 5 B Level 2 X X X X X X X X
Level 3 X X X X X X X X

12
V1421 V1420 Level 4 X X X X X X X X

Load the value in V1420 and 0 0 3 A 5 0 C 6 Level 5 X X X X X X X X


LDD
V1421 into the accumulator Level 6 X X X X X X X X
V1420

13
Level 7 X X X X X X X X
Acc. 0 0 3 A 5 0 C 6
Level 8 X X X X X X X X

SUBBS Subtract the binary value in

14
the first level of the
accumulator stack from the 0 0 2 0 3 0 6 B
Acc.
binary value in the
accumulator Accumulator stack
after 2nd LDD

A
Copy the value in the Level 1 0 0 1 A 2 0 5 B
OUTD
accumulator to V1500 Level 2 X X X X X X X X
V1500 and V1501
0 0 2 0 3 0 6 B Level 3 X X X X X X X X
V1501 V1500 X X X X X X X X
Level 4

B
Handheld Programmer Keystrokes
Level 5 X X X X X X X X
$ B ENT Level 6 X X X X X X X X
STR 1
Level 7 X X X X X X X X

C
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0 Level 8 X X X X X X X X

SHFT L D D B E C A ENT
ANDST 3 3 1 4 2 0

D
SHFT S U B B S ENT
SHFT
RST ISG 1 1 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-115


Chapter 5: Standard RLL Instructions - Math

Multiply Binary Top of Stack (MULBS)


Multiply Binary Top of Stack is a 16-bit instruction that MULBS
1 DS
HPP
Used
Used
multiplies the 16-bit binary value in the first level of
the accumulator stack by the 16-bit binary value in the
accumulator. The result resides in the accumulator and
2 can be 32 bits (8 digits max.). The value in the first level
of the accumulator stack is removed and all stack locations
3 are moved up one level

Discrete Bit Flags Description


4 SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On any time the value in the accumulator is negative.
5
6 NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the Load instruction moves the value in V1400
7 into the accumulator. The value in V1420 is loaded into the accumulator using the Load
instruction, pushing the value previously loaded in the accumulator onto the stack. The
8 binary value in the accumulator stacks first level is multiplied by the binary value in the
accumulator using the Multiply Binary Stack instruction. The Out Double instruction copies
the value in the accumulator to V1500 and V1501.
9 DirectSOFT
DirectSOFT32 Display

X1
C
V1400
3 5 0
Accumulator stack
after 1st LDD
LD Load the value in V1400 into
The unused accumulator

10
the accumulator Level 1 X X X X X X X X
V1400 bits are set to zero
Level 2 X X X X X X X X
Acc. 0 0 0 0 C 3 5 0
Level 3 X X X X X X X X
Level 4 X X X X X X X X

11 LD Load the value in V1420 into The unused accumulator


0
V1420
0 1 4
Level 5
Level 6
X
X
X
X
X
X
X X
X X
X
X
X
X
X
X
the accumulator bits are set to zero Level 7 X X X X X X X X

12
V1420
Level 8 X X X X X X X X
Acc. 0 0 0 0 0 0 1 4

13 MULBS Multiply the binary value in


the accumulator with the
binary value in the first level
of the accumulator stack
Acc. 0 0 0 F 4 2 4 0 Accumulator stack
after 2nd LDD

14
Level 1 0 0 0 0 C 3 5 0
Level 2 X X X X X X X X
OUTD Copy the value in the
Level 3 X X X X X X X X
accumulator to V1500
V1500 0 0 0 F 4 2 4 0
and V1501 Level 4 X X X X X X X X

A V1501 V1500 Level 5 X X X X X X X X


Standard RLL
Instructions
Level 6 X X X X X X X X
Handheld Programmer Keystrokes
Level 7 X X X X X X X X

B
$ B ENT
STR 1 Level 8 X X X X X X X X

SHFT L D B E A A ENT
ANDST 3 1 4 0 0

C SHFT

SHFT
L
ANDST

M
D

U
3

L
B

B
1
E

S
4
C
2

ENT
A
0
ENT

ORST ISG ANDST 1 RST

D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT

5-116 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Math

Divide Binary by Top OF Stack (DIVBS)


Divide Binary Top of Stack is a 32-bit instruction that divides the
DS
HPP
Used
Used
32-bit binary value in the accumulator by the 16-bit binary value
in the first level of the accumulator stack. The result resides in
DIVBS
1
the accumulator and the remainder resides in the first level of the
accumulator stack. 2
Discrete Bit Flags Description
3
SP53
SP63
On when the value of the operand is larger than the accumulator can work with.
On when the result of the instruction causes the value in the accumulator to be zero.
4
SP70 On any time the value in the accumulator is negative.
5
NOTE: Status flags are valid only until another instruction uses the same flag.
6
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The value in V1420 and V1421 is loaded into the
accumulator using the Load Double instruction also, pushing the value previously loaded in
7
the accumulator onto the accumulator stack. The binary value in the accumulator is divided
by the binary value in the first level of the accumulator stack using the Divide Binary Stack 8
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction. 9
DirectSOFT

10
DirectSOFT32 Display V1400 Accumulator stack
after 1st LDD
X1 Load the value in V1400 into 0 0 1 4
LD The unused accumulator
the accumulator Level 1 X X X X X X X X
V1400 bits are set to zero
Level 2 X X X X X X X X

Acc. 0 0 0

V1421
0 0 0 1

V1420
4 Level 3
Level 4
Level 5
X
X
X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X
X
X
11
12
0 0 0 0 C 3 5 0 Level 6 X X X X X X X X
LDD Load the value in V1420 and
V1421 into the accumulator Level 7 X X X X X X X X
V1420
Level 8 X X X X X X X X
Acc. 0 0 0 0 C 3 5 0

DIVBS Divide the binary value in


the accumulator by the
Level 1 0
Accumulator stack
after 2nd LDD

0 0 0 0 0 1 4
13
binary value in the first level Acc. 0 0 0 0 0 9 C 4
Level 2 X X X X X X X X
of the accumulator stack
Level 3
Level 4
X
X
X X
X X
X X
X X
X X
X X
X
X
14
Level 5 X X X X X X X X

A
OUTD Copy the value in the
accumulator to V1500 Level 6 X X X X X X X X
V1500 and V1501 0 0 0 0 0 9 C 4
Level 7 X X X X X X X X
V1501 V1500
Level 8 X X X X X X X X

B
Handheld Programmer Keystrokes
The remainder resides in the
$ B ENT first stack location
STR 1
Level 1 0 0 0 0 0 0 0 0
L D B E A A

C
SHFT ENT
ANDST 3 1 4 0 0 Level 2 X X X X X X X X

L D D B E C A Level 3 X X X X X X X X
SHFT ENT
ANDST 3 3 1 4 2 0 Level 4 X X X X X X X X

D
SHFT D I V B S ENT Level 5 X X X X X X X X
3 8 AND 1 RST
Level 6 X X X X X X X X
GX SHFT D B F A A ENT
OUT 3 1 5 0 0 Level 7 X X X X X X X X
Level 8 X X X X X X X X

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-117


Chapter 5: Standard RLL Instructions - Transcendental Functions

Transcendental Functions
The DL06 CPU features special numerical functions to complement its real number
1 capability. The transcendental functions include the trigonometric sine, cosine, and tangent,
and also their inverses (arc sine, arc cosine, and arc tangent). The square root function is also
2 grouped with these other functions.
The transcendental math instructions operate on a real number in the accumulator (it
cannot be BCD or binary). The real number result resides in the accumulator. The square
3 root function operates on the full range of positive real numbers. The sine, cosine and
tangent functions require numbers expressed in radians. You can work with angles expressed
4 in degrees by first converting them to radians with the Radian (RADR) instruction, then
performing the trig function. All transcendental functions utilize the following flag bits.
5 Discrete Bit Flags Description
6 SP53
SP63
On when the value of the operand is larger than the accumulator can work with.
On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
7 SP72
SP73
On anytime the value in the accumulator is an invalid floating point number
On when a signed addition or subtraction results in an incorrect sign bit.

8 SP75 On when a real number instruction is executed and a non-real number encountered.

9 DS Used Sine Real (SINR)


10 HPP N/A The Sine Real instruction takes the sine of the real number stored
in the accumulator. The result resides in the accumulator. Both
S INR

the original number and the result must be Real data type (IEEE
11 floating point format).
DS Used Cosine Real (COSR)
12 HPP N/A
The Cosine Real instruction takes the cosine of the real number COSR
stored in the accumulator. The result resides in the accumulator.
13 Both the original number and the result must be Real data type
(IEEE floating point format)..
14 DS
HPP
Used
N/A
Tangent Real (TANR)
The Tangent Real instruction takes the tangent of the real number TANR
A stored in the accumulator. The result resides in the accumulator.
Both the original number and the result must be Real data type
B DS Used
(IEEE floating point format).

Arc Sine Real (ASINR)


C HPP N/A
The Arc Sine Real instruction takes the inverse sine of the real AS INR
number stored in the accumulator. The result resides in the
D accumulator. Both the original number and the result must be Real
data type (IEEE floating point format).

5-118 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Transcendental Functions
Arc Cosine Real (ACOSR)
The Arc Cosine Real instruction takes the inverse cosine of the ACOSR
real number stored in the accumulator. The result resides in the
DS
HPP
Used
N/A
accumulator. Both the original number and the result must be Real 1
data type (IEEE floating point format).

Arc Tangent Real (ATANR) 2


The Arc Tangent Real instruction takes the inverse tangent of the
DS Used
real number stored in the accumulator. The result resides in the
ATANR
3
HPP N/A
accumulator. Both the original number and the result must be Real
data type (IEEE floating point format). 4
Square Root Real (SQRTR)
The Square Root Real instruction takes the square root of the SQR TR 5
DS Used real number stored in the accumulator. The result resides in the
HPP N/A accumulator. Both the original number and the result must be Real
data type (IEEE floating point format).
6
NOTE: The square root function can be useful in several situations. However, if you are trying to do 7
the square-root extract function for an orifice flow meter measurement, as the PV to a PID loop, note
that the PID loop already has the square-root extract function built in.
8
The following example takes the sine of 45 degrees. Since these transcendental functions
operate only on real numbers, we do an LDR (load real) 45. The trig functions operate only
in radians, so we must convert the degrees to radians by using the RADR command. After
9
using the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move
the result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out 10
Double to move it.
DirectSOFT
Direct SOFT 5
Accumulator contents
(viewed as real number)
11
X1 LDR
R45
Load the real number 45 into
the accumulator. 45.000000 12
RADR Convert the degrees into radians,
leaving the result in the 0.7358981
13
accumulator.

SINR Take the sine of the number in


14
the accumulator, which is in 0.7071067
A
radians.

OUTD Copy the value in the


0.7071067
B
accumulator to V2000
V2000 and V2001.

NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit
IEEE format. You must use DirectSOFT for entering real numbers, using the LDR (Load Real) C
instruction.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-119


Chapter 5: Standard RLL Instructions - Bit Operation

Bit Operation Instructions


1 Sum (SUM)
The Sum instruction counts number of bits that are set to 1 in
SUM

the accumulator. The HEX result resides in the accumulator.


2 DS
HPP
Used
Used
Discrete Bit Flags Description
3 SP63 On when the result of the instruction causes the value in the accumulator to be zero.

4 In the following example, when X1 is on, the value formed by discrete locations X10X17 is
loaded into the accumulator using the Load Formatted instruction. The number of bits in the
5 accumulator set to 1 is counted using the Sum instruction. The value in the accumulator is
copied to V1500 using the Out instruction.
6 NOTE: Status flags are valid only until another instruction uses the same flag.

7
8 DirectSOFT
Direct SOFT32 Display

X1 LDF X10
X17 X16 X15 X14 X13 X12 X11 X10
ON ON OFF OFF ON OFF ON ON

K8

9
The unused accumulator
bits are set to zero
Load the value represented by
discrete locations X10X17
into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

10 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1

11 Acc. 0 0 0 0 0 0 0 5
SUM

Sum the number of bits in

12 the accumulator set to 1

13 OUT
V1500
0 0 0

V1500
5

Copy the value in the lower

14 16 bits of the accumulator


to V1500
Handheld Programmer Keystrokes

A $

SHFT
STR
L
B

D
1
F
ENT

B A I ENT
ANDST 3 5 1 0 8

B SHFT S
RST
SHFT U
ISG
M
ORST
ENT

GX PREV PREV PREV B F A A ENT

C OUT 1 5 0 0

5-120 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Bit Operation

Shift Left (SHFL)


Shift Left is a 32-bit instruction that shifts the bits in the
SHFL
accumulator a specified number (Aaaa) of places to the left. The
DS
HPP
Used
Used
vacant positions are filled with zeros and the bits shifted out of A aaa 1
the accumulator are discarded.

Operand Data Type DL06 Range


2

V-memory
A
V
aaa
See memory map
3
Constant K 1-32
4
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero. 5
SP70 On anytime the value in the accumulator is negative.
6
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The bit pattern in the accumulator
is shifted 2 bits to the left using the Shift Left instruction. The value in the accumulator is
7
copied to V2010 and V2011 using the Out Double instruction.
8
NOTE: Status flags are valid only until another instruction uses the same flag.
9
DirectSOFT
Direct SOFT32

10
V2001 V2000
X1 LDD 6 7 0 5 33 31 10 01

V2000

Load the value in V2000 and


V2001 into the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
11
SHFL

12
Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
K2

The bit pattern in the


accumulator is shifted 2 bit
. . . .

13
positions to the left Shifted out of the
accumulator

OUTD
V2010

14
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Copy the value in the Acc. 0
1 0 0 0
1 0
1 1 0 0 0 0 0 0
1 0 0
1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0
accumulator to V2010 and
V2011

A
Handheld Programmer Keystrokes
9 C

V2011
1 4 C 4

V2010
0 4
B
$
STR
L
B

D
1
D
ENT

C A A A
C
SHFT ENT
ANDST 3 3 2 0 0 0

SHFT S
RST
SHFT H
7
F
5
L
ANDST
C
2
ENT D
GX SHFT D C A B A ENT
OUT 3 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-121


Chapter 5: Standard RLL Instructions - Bit Operation
Shift Right (SHFR)
Shift Right is a 32-bit instruction that shifts the bits in the SHFR
accumulator a specified number (Aaaa) of places to the right. The A aaa
1 DS Used vacant positions are filled with zeros and the bits shifted out of the
HPP Used accumulator are lost.
2 Operand Data Type DL06 Range
A aaa
3 V-memory V See memory map
Constant K 1-32
4
Discrete Bit Flags Description
5 SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.

6
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
7 the accumulator using the Load Double instruction. The bit pattern in the accumulator is
shifted 2 bits to the right using the Shift Right instruction. The value in the accumulator is
copied to V2010 and V2011 using the Out Double instruction.
8
NOTE: Status flags are valid only until another instruction uses the same flag.
9 DirectSOFT
Direct SOFT32 V2001 V2000

10 X1 LDD
V2000
Constant 6 7 0 5 33 11 00 11

Load the value in V2000 and

11 V2001 into the accumulator

SHFR Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0
8
1
7
0
6 5
0 0
4 3
0 0
2
0
1
0
0
1

12
K2

... .
The bit pattern in the
accumulator is shifted 2 bit
positions to the right Shifted out of the

13
accumulator

OUTD
V2010 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

14 Copy the value in the


accumulator to V2010 and
V2011
Acc. 0 0 0 0
1 0
1 1
0 0 0
1 0
1 0
1 0 0 0 0 0 0
1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0

A
B 1 9

V2011
C 1 4 C

V2010
4 0

Handheld Programmer Keystrokes

C $
STR
B
1
ENT

L D D C A A A

D
SHFT ENT
ANDST 3 3 2 0 0 0

SHFT S SHFT H F R C ENT


RST 7 5 ORN 2
GX SHFT D C A B A ENT
OUT 3 2 0 1 0

5-122 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Bit Operation
Rotate Left (ROTL)
Rotate Left is a 32-bit instruction that rotates the bits in the
R OTL
accumulator a specified number (Aaaa) of places to the left.
DS
HPP
Used
Used
A aaa 1
Operand Data Type DL06 Range 2
A aaa
V-memory
Constant
V
K
See memory map
1-32
3
Discrete Bit Flags Description 4
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 5
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
6
into the accumulator using the Load Double instruction. The bit pattern in the accumulator
is rotated 2 bit positions to the left using the Rotate Left instruction. The value in the 7
accumulator is copied to V1500 and V1501 using the Out Double instruction.

NOTE: Status flags are valid only until another instruction uses the same flag. 8
DirectSOFT
DirectSOFT32 Display
9
V1401 V1400

10
X1
LDD 6 7 0 5 3 1 0 1
V1400

Load the value in V1400 and

11
V1401 into the accumulator

ROTL 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
K2 Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1

The bit pattern in the


accumulator is rotated 2
bit positions to the left
12
OUTD
V1500
13
14
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Copy the value in the
accumulator to V1500 Acc. 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1
and V1501

A
Handheld Programmer Keystrokes
9 C 1 4

V1501
C 4 0 5

V1500
B
$
STR

SHFT L
ANDST
B

D
1

3
D
ENT

3
B
1
E
4
A
0
A
0
ENT
C
SHFT

GX
R
ORN

SHFT
O
INST#
D
T
MLR
L
ANDST
B F
C

A
2
ENT

A ENT
D
OUT 3 1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-123


Chapter 5: Standard RLL Instructions- - Bit Operation

Rotate Right (ROTR)


Rotate Right is a 32-bit instruction that rotates the bits in the R OTR
1 DS
HPP
Used
Used
accumulator a specified number (Aaaa) of places to the right. A aaa

2 Operand Data Type DL06 Range


A aaa
3 V-memory
Constant
V
K
See memory map
1-32

4
Discrete Bit Flags Description
5 SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.

6
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
7 into the accumulator using the Load Double instruction. The bit pattern in the accumulator
is rotated 2 bit positions to the right using the Rotate Right instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.
8
9 DirectSOFT
Direct SOFT Display

X1 LDD 6
V1401
7 0 5 3
V1400
1 0 1

10
V1400

Load the value in V1400 and


V1401 into the accumulator

11 ROTR
K2
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0
8
1
7
0
6 5
0 0
4 3
0 0
2
0
1
0
0
1

12
The bit pattern in the
accumulator is rotated 2
bit positions to the right

13 OUTD
V1500

Copy the value in the


31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0
1 0 0
1 0
1 1
0 0 0
1 0
1 0
1 0 0 0 0 0 0
1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0
accumulator to V1500

14 and V1501

A 5 9 C 1 4 C 4 0

B Handheld Programmer Keystrokes

$ B ENT
V1501 V1500

STR 1

C SHFT

SHFT
L
ANDST
R
D

O
3
D

T
3
R
B
1
E

C
4
A
0

ENT
A
0
ENT

ORN INST# MLR ORN 2

D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT

5-124 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Bit Operation
Encode (ENCO)
The Encode instruction encodes the bit position in
the accumulator having a value of 1, and returns the
DS
HPP
Used
Used
appropriate binary representation. If the most significant ENCO 1
bit is set to 1 (Bit 31), the Encode instruction would place
the value HEX 1F (decimal 31) in the accumulator. If the
value to be encoded is 0000 or 0001, the instruction will
2
place a zero in the accumulator. If the value to be encoded
has more than one bit position set to a 1, the least 3
significant 1 will be encoded and SP53 will be set on.
4
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with. 5
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
6
In the following example, when X1 is on, The value in V2000 is loaded into the accumulator 7
using the Load instruction. The bit position set to a 1 in the accumulator is encoded to the
corresponding 5 bit binary value using the Encode instruction. The value in the lower 16 bits
of the accumulator is copied to V2010 using the Out instruction.
8
DirectSOFT
Direct SOFT32

X1
1
V2000
0 0 0
9
LD
V2000

Load the value in V2000 into


the lower 16 bits of the 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
10
accumulator
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit postion 12 is
0 0 0 0 0 0 0 0 0 0

11
converted

ENCO
to binary
12
Encode the bit position set
to 1 in the accumulator to a
5 bit binary value
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 1
2
1
1
0
0
0
13
14
OUT
V2010

Copy the value in the lower 16 bits


of the accumulator to V2010
0 0 0 C A
V2010 Binary value

Handheld Programmer Keystrokes


for 12.
B
$ B ENT

SHFT
STR
L
ANDST
D
1

3
C
2
A
0
A
0
A
0
ENT C
E N C O

D
SHFT ENT
4 TMR 2 INST#
GX SHFT V C A B A ENT
OUT AND 2 0 1 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-125


Chapter 5: Standard RLL Instructions - Bit Operation

Decode (DECO)
DS Used
The Decode instruction decodes a 5-bit binary value of 031
1 HPP Used
(01Fh) in the accumulator by setting the appropriate bit
position to a 1. If the accumulator contains the value Fh (HEX),
DECO

bit 15 will be set in the accumulator. If the value to be decoded


2 is greater than 31, the number is divided by 32 until the value is
less than 32 and then the value is decoded.
3
4 In the following example when X1 is on, the value formed by discrete locations X10X14 is
loaded into the accumulator using the Load Formatted instruction. The 5- bit binary pattern
in the accumulator is decoded by setting the corresponding bit position to a 1 using the
5 Decode instruction.

6 DirectSOFT
Direct SOFT32
X14 X13 X12 X11 X10

7 X1 LDF
K5

Load the value in


X10 OFF ON OFF ON ON

8
represented by discrete
locations X10X14 into the
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
accumulator
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1

9 DECO
The binary vlaue
is converted to
bit position 11.

10 Decode the five bit binary


pattern in the accumulator
and set the corresponding
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
8
0
7
0
6 5
0 0
4 3
0 0
2
0
1
0
0
0

bit position to a 1

11 Handheld Programmer Keystrokes

$ B ENT

12
STR 1

SHFT L D F B A F ENT
ANDST 3 5 1 0 5

SHFT D E C O ENT

13
3 4 2 INST#

14
A
B
C
D

5-126 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

Number Conversion Instructions (Accumulator)


Binary (BIN) 1
DS Used The Binary instruction converts a BCD value in the accumulator BIN
HPP Used to the equivalent binary, or decimal, value. The result resides in the
accumulator.
2
Discrete Bit Flags Description 3
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 4
SP75 On when a BCD instruction is executed and a NONBCD number was encountered.
5
In the following example, when X1 is on, the value in V2000 and V2001 is loaded into
the accumulator using the Load Double instruction. The BCD value in the accumulator is 6
converted to the binary (HEX) equivalent using the BIN instruction. The binary value in
the accumulator is copied to V2010 and V2011 using the Out Double instruction. (The
handheld programmer will display the binary value in V2010 and V2011 as a HEX value.)
7
DirectSOFT
DirectS OF T 32

X1 LDD
0
V2001
0 0 2 8
V2000
5 2 9
8
V2000

Load the value in V2000 and


V2001 into the accumulator

8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
9
10
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1

BCD Value

11
28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1

BIN Binary Equivalent Value

12
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Convert the BCD value in Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1
the accumulator to the
binary equivalent value 2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1
1 0 3 6 3 7 3 6 3 1 0 0 2 6 3 5 2 6 1 0 0 0 1 5 2 4 2 6

13
4 7 6 8 4 1 5 7 8 9 9 4 4 2 1 5 7 3 9 9 4 2 2 6 8
7 3 8 4 2 0 5 7 8 4 7 8 2 1 0 3 6 8 2 6 8 4
4 7 7 3 1 8 4 7 6 3 1 5 8 4 7 6 8 4
4 4 0 5 7 8 4 2 0 0 5 7 8 4 2
8 1 9 4 7 6 3 1 8 4 2 6
3 8 1 5 2 4 2 6

14
6 2 2 6 8
4 4
8

OU T D
V2010

Copy the binary data in the


0 0 0 0 6 F 7 1
The Binary (HEX)
value copied to
A
V2010
accumulator to V2010 and V2011 V2011 V2010

B
S tandard R LL
Ins tructions

Handheld Programmer Keys trokes

$
STR

S HF T
L
ANDS T
B

D
1

3
E NT

D
3
C
2
A
0
A
0
A
0
E NT
C
S HF T

GX
OU T
B
1

S HF T
I

D
8

3
N
T MR
C
E NT

2
A
0
B
1
A
0
E NT
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-127


Chapter 5: Standard RLL Instructions - Number Conversion

Binary Coded Decimal (BCD)


The Binary Coded Decimal instruction converts a binary, or
1 DS
HPP
Used
Used
decimal, value in the accumulator to the equivalent BCD value.
BCD

The result resides in the accumulator.


2 Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
3 SP70 On anytime the value in the accumulator is negative.

4 In the following example, when X1 is on, the binary, or decimal, value in V2000 and
V2001 is loaded into the accumulator using the Load Double instruction. The value in the
5 accumulator is converted to the BCD equivalent value using the BCD instruction. The BCD
value in the accumulator is copied to V2010 and V2011 using the Out Double instruction.

6
DirectSOFT

7
DirectSOFT 5 V2001 V2000

X1 0 0 0 0 6 F 7 1
LDD
V2000 Binary Value

8 Load the value in V2000 and


V2001 into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

9
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1
2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1
1 0 3 6 3 7 3 6 3 1 0 0 2 6 3 5 2 6 1 0 0 0 1 5 2 4 2 6
4 7 6 8 4 1 5 7 8 9 9 4 4 2 1 5 7 3 9 9 4 2 2 6 8
7 3 8 4 2 0 5 7 8 4 7 8 2 1 0 3 6 8 2 6 8 4

10 4
4
8
3
7
4
1
8
7
0
9
1
3
5
4
5
1
7
7
2
8
8
6
4
4
4
3
2
7
2
1
6
6
0
8
3
0
4
1
5
2
5
7
6
8
8
4
4
7
2
6 8 4

6 2 2 6 8

11 4
8
4

BCD

12 Convert the binary, or decimal,


16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 = 28529

BCD Equivalent Value


value in the accumulator to the

13 BCD equivalent value

Acc.
8
0
4 2
0 0
1
0 0
8 4
0
2 1
0 0
8
0 0
4 2
0
1 8
0 0
4
0 1
2 1
0
8
1
4 2
0 0
1
0 0
8 4
1
2 1
0 1
8
0 0
4 2
1
1 8
0 1
4
0 0
2 1
1

14 OUTD
V2010

A Copy the BCD value in the


accumulator to V2010 and V2011
0 0

V2011
0 2 8 5 2

V2010
9 The BCD value
copied to
V2010 and V2011

B Handheld Programmer Keystrokes

$ B ENT

C
STR 1
L D D C A A A
SHFT ENT
ANDST 3 3 2 0 0 0

SHFT B C D ENT

D GX
OUT
SHFT
1

D
2

3
3

C
2
A
0
B
1
A
0
ENT

5-128 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

Invert (INV) INV


The Invert instruction inverts or takes the ones complement
DS
HPP
Used
Used
of the 32-bit value in the accumulator. The result resides in the 1
accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into 2
the accumulator using the Load Double instruction. The value in the accumulator is inverted
using the Invert instruction. The value in the accumulator is copied to V2010 and V2011
using the Out Double instruction.
3
DirectSOFT
Direct SOFT32 V2001 V2000
4
5
X1 0 4 0 5 00 22 55 00
LDD
V2000

Load the value in V2000 and


V2001 into the accumulator

Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1
8
0
7
0
6 5
1 0
4 3
1 0
2
0
1
0
0
0 6
INV

Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0
8
1
7
1
6 5
0 1
4 3
0 1
2
1
1
1
0
1
7
Invert the binary bit pattern

8
in the accumulator

OUTD F B F A F D A F
V2010

Copy the value in the


accumulator to V2010 and
V2011 V2010
9
V2011

Handheld Programmer Keystrokes


10
$
STR

SHFT L
ANDST
B

D
1

3
D
ENT

3
C
2
A
0
A
0
A
0
ENT
11
12
SHFT I N V ENT
8 TMR AND
GX SHFT D C A B A ENT
OUT 3 2 0 1 0

13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-129


Chapter 5: Standard RLL Instructions - Number Conversion

Tens Complement (BCDCPL)


The Tens Complement instruction takes the 10s complement BC DC P L
1 DS
HPP
Used
Used (BCD) of the 8 digit accumulator. The result resides in the
accumulator. The calculation for this instruction is :
2
100000000
3 s accumulator
10s complement value
4 In the following example when X1 is on, the value in V2000 and V2001 is loaded into the
5 accumulator. The 10s complement is taken for the 8 digit accumulator using the Tens
Complement instruction. The value in the accumulator is copied to V2010 and V2011 using
the Out Double instruction.
6 DirectSOFT
DirectS OF T 32 V2001 V2000

7
0 0 0 0 0 0 8 7
X1
LDD
V2000

Load the value in V2000 and Acc. 0 0 0 0 0 0 8 7

8 V2001 into the accumulator

9 BC DC PL
Acc. 9 9 9 9 9 9 1 3

Takes a 10s complement of

10 the value in the accumulator

OU T D 9 9 9 9 9 9 1 3

11
V2010
V2011 V2010
C opy the value in the
accumulator to V2010 and
V2011

12 H andheld Programmer Keys trokes

$ B

13
E NT
STR 1

S HF T L D D C A A A E NT
ANDS T 3 3 2 0 0 0

14 S HF T

GX
B
1

S HF T
C

D
2
D
3
C

C
2
P

A
CV
L
ANDS T
B
E NT

A
E NT
OU T 3 2 0 1 0

A
B
C
D

5-130 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

Binary to Real Conversion (BTOR)


The Binary-to-Real instruction converts a binary, or decimal, value BT O R
DS
HPP
Used
Used in the accumulator to its equivalent real number (floating point) 11
format. The result resides in the accumulator. Both the binary and
the real number may use all 32 bits of the accumulator. 22
NOTE: This instruction only works with unsigned binary, or decimal, values. It will not work with
signed decimal values. 33
Discrete Bit Flags Description 44
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 55
In the following example, when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The BTOR instruction converts the binary, 66
or decimal, value in the accumulator to the equivalent real number format. The binary weight
of the MSB is converted to the real number exponent by adding it to 127 (decimal). Then 77
the remaining bits are copied to the mantissa as shown. The value in the accumulator is
copied to V1500 and V1501 using the Out Double instruction. The handheld programmer
would display the binary value in V1500 and V1501 as a HEX value.
88
DirectSOFT V1401 V1400

X1 LDD
V1400
0 0 0 5 7 2 4 1
99
Load the value in V1400 and
V1401 into the accumulator

Acc.
8 4
0 0
2
0
1
0
8
0
4 2
0 0
1
0
8
0
4
0
2 1
0 0
8
0
4
1
2
0
1
1
8 4
0 1
2
1
1
1
8
0
4 2
0 1
1
0
8
0
4
0
2 1
1 0
8
0
4
0
2
0
1
1
10
10
2 (exp 18)
127 + 18 = 145
Binary Value

11
11
145 = 128 + 16 + 1

BTOR
12
12
Convert the binary, or decimal,
value in the accumulator to the
real number equivalent format Acc. 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 13
13
Sign Bit Exponent (8 bits) Mantissa (23 bits) 14
14
OUTD
Real Number Format
AA
BB
V1500
4 8 A E 4 8 2 0 The real number (HEX) value
Copy the real value in the copied to V1500
accumulator to V1500 and V1501 V1501 V1500

CC
Handheld Programmer Keystrokes

$ B ENT
STR 1
L D D B E A A

DD
SHFT ENT
ANDST 3 3 1 4 0 0

SHFT B T O R ENT
1 MLR INST# ORN
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-131


Chapter 5: Standard RLL Instructions - Number Conversion

Real to Binary Conversion (RTOB)


The Real-to-Binary instruction converts the real number in R TOB
DS Used

1 HPP Used the accumulator to a binary value. The result resides in the
accumulator. Both the binary and the real number may use all 32
bits of the accumulator.
2 NOTE1: The decimal portion of the result will be rounded down (14.1 to 14; -14.1 to -15).
NOTE2: if the real number is negative, it becomes a signed decimal value.
3
Discrete Bit Flags Description
4 SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.

5 SP72
SP73
On anytime the value in the accumulator is an invalid floating point number.
On when a signed addition or subtraction results in an incorrect sign bit.
SP75 On when a number cannot be converted to binary.
6 In the following example, when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The RTOB instruction converts the real
7 value in the accumulator the equivalent binary number format. The value in the accumulator
is copied to V1500 and V1501 using the Out Double instruction. The handheld programmer
8 would display the binary value in V1500 and V1501 as a HEX value.
DirectSOFT
DirectSOFT32

9
X1 4 8 A E 4 8 2 0 Real Number Format
LDD
V1400 V1401 V1400

Load the value in V1400 and


V1401 into the accumulator
Sign Bit Exponent (8 bits) Mantissa (23 bits)

10
11
Acc. 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0

RTOB

12 Convert the real number in


the accumulator to binary 128 + 16 + 1 = 145
format. 127 + 18 = 145

13 2 (exp 18)
Binary Value

8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1

14 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 0 0 1

OUTD

A V1500

Copy the real value in the


accumulator to V1500 and V1501 V1501 V1500
The binary number copied to
0 0 0 5 7 2 4 1

B
V1500.

Handheld Programmer Keystrokes

$ B ENT

C SHFT
STR
L
ANDST
D
1

3
D
3
B
1
E
4
A
0
A
0
ENT

D SHFT R T O B ENT
ORN MLR INST# 1
GX SHFT D B F A A ENT
OUT 3 1 5 0 0

5-132 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion
Radian Real Conversion (RADR) R ADR
DS Used The Radian Real Conversion instruction converts the real degree
value stored in the accumulator to the equivalent real number in
HPP N/A
radians. The result resides in the accumulator. 1
Degree Real Conversion (DEGR)
DS32 Used The Degree Real instruction converts the degree real radian value DE G R 2
stored in the accumulator to the equivalent real number in degrees.
HPP N/A
The result resides in the accumulator. 3
Discrete Bit Flags
SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.
4
SP70
SP72
On anytime the value in the accumulator is negative.
On anytime the value in the accumulator is an invalid floating point number. 5
SP73 On when a signed addition or subtraction results in an incorrect sign bit.
SP75 On when a number cannot be converted to binary. 6
The two instructions described above convert real numbers into the accumulator from degree
format to radian format, and vice-versa. In degree format, a circle contains 360 degrees. In
7
radian format, a circle contains 2f (about 6.28) radians. These convert between both positive
and negative real numbers, and for angles greater than a full circle. These functions are very 8
useful when combined with the transcendental trigonometric functions (see the section on
math instructions). 9
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit
IEEE format. You must use DirectSOFT for entering real numbers, using the LDR (Load Real) 10
instruction.

The following example takes the sine of 45 degrees. Since transcendental functions operate 11
only on real numbers, we do an LDR (load real) 45. The trig functions operate only in
radians, so we must convert the degrees to radians by using the RADR command. After using
the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the
12
result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out
Double to move it. 13
DirectSOFT
DirectSOFT32
Accumulator contents
(viewed as real number)
14
X1

A
LDR Load the real number 45 into

R45
the accumulator. 45.000000

RADR Convert the degrees into radians,


leaving the result in the
accumulator.
0.7853982 B
SINR Take the sine of the number in
the accumulator, which is in
radians.
0.7071067 C
OUTD
V2000
Copy the value in the
accumulator to V2000 0.7071067
D
and V2001.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-133


Chapter 5: Standard RLL Instructions - Number Conversion
ASCII to HEX (ATH)
DS Used The ASCII TO HEX instruction converts a table of ASCII values to
a specified table of HEX values. ASCII values are two digits and their
1 HPP N/A
HEX equivalents are one digit. This means an ASCII table of four ATH
V aaa
V-memory locations would only require two V-memory locations
2 for the equivalent HEX table. The function parameters are loaded
into the accumulator stack and the accumulator by two additional
3 instructions. Listed below are the steps necessary to program an ASCII
to HEX table function. The example on the following page shows a
program for the ASCII to HEX table function.
4 Step 1: Load the number of V-memory locations for the ASCII table into the first level of the
accumulator stack.
5 Step 2: Load the starting V-memory location for the ASCII table into the accumulator. This
parameter must be a HEX value.
6 Step 3: Specify the starting V-memory location (Vaaa) for the HEX table in the ATH
instruction.
7 Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
8 and load the value into the accumulator.
Operand Data Type DL06 Range
9 V-memory V
aaa
See memory map

10
Discrete Bit Flags Description
11 SP53 On when the value of the operand is larger than the accumulator can work with.

12 In the example on the following page, when X1 is ON the constant (K4) is loaded into the
accumulator using the Load instruction and will be placed in the first level of the accumulator
13 stack when the next Load instruction is executed. The starting location for the ASCII table
(V1400) is loaded into the accumulator using the Load Address instruction. The starting
location for the HEX table (V1600) is specified in the ASCII to HEX instruction. The table
14 below lists valid ASCII values for ATH conversion.
ASCII Values Valid for ATH Conversion
A ASCII Value Hex Value ASCII Value Hex Value
30 0 38 8
B 31
32
1
2
39
41
9
A

C 33
34
3
4
42
43
B
C
35 5 44 D
D 36 6 45 E
37 7 46 F

5-134 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

1
DirectSOFT

2
Direct SOFT32 Hexadecimal
ASCII T ABLE Equivalents
X1 LD Load the constant value
into the lower 16 bits of the
K4 accumulator. This value
defines the number of V

3
memory location in the
ASCII table
V1400 33 34
LDA Convert octal 1400 to HEX

O 1400
300 and load the value into
the accumulator
1234 V1600

ATH V1600 is the starting


location for the HEX table
V1401 31 32 4
V1600

Handheld Programmer Keystrokes


5
$ B V1402 37 38
6
ENT
STR 1

SHFT L
ANDST
D
3
PREV E
4
ENT 5678 V1601

L D A B E A A
SHFT ENT 35 36
7
ANDST 3 0 1 4 0 0 V1403

SHFT A T H B G A A ENT
0 MLR 7 1 6 0 0

8
9
HEX to ASCII (HTA)
DS Used The HEX to ASCII instruction converts a table of HEX
values to a specified table of ASCII values. HEX values are
HTA
V aaa
10
HPP N/A
one digit and their ASCII equivalents are two digits.
This means a HEX table of two V-memory locations would require four V-memory locations
11
for the equivalent ASCII table. The function parameters are loaded into the accumulator
stack and the accumulator by two additional instructions. Listed below are the steps necessary 12
to program a HEX to ASCII table function. The example on the following page shows a
program for the HEX to ASCII table function. 13
Step 1: Load the number of V-memory locations in the HEX table into the first level
of the accumulator stack. 14
Step 2: Load the starting V-memory location for the HEX table into the accumulator.
This parameter must be a HEX value. A
Step 3:Specify the starting V-memory location (Vaaa) for the ASCII table in the HTA
instruction.
Helpful Hint: For parameters that require HEX values when referencing memory
B
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-135


Chapter 5: Standard RLL Instructions - Number Conversion

Operand Data Type DL06 Range


1 V-memory V
aaa
See memory map

2 Discrete Bit Flags


SP53
Description
On when the value of the operand is larger than the accumulator can work with.

3
In the following example, when X1 is ON, the constant (K2) is loaded into the accumulator
4 using the Load instruction. The starting location for the HEX table (V1500) is loaded into
the accumulator using the Load Address instruction. The starting location for the ASCII table
(V1400) is specified in the HEX to ASCII instruction.
5 DirectSOFT
Direct SOFT32
Hexadecimal
X1 LD Equivalents ASCII T ABLE

6 K2

Load the constant value into


the lower 16 bits of the

7
accumulator. This value
defines the number of V 33 34 V1400
locations in the HEX table.
V1500 1234

8
LDA
O 1500
31 32 V1401

Convert octal 1500 to HEX


340 and load the value into

9 the accumulator

10 HTA
V1400

V1400 is the starting


V1501 5678
37 38 V1402

location for the ASCII table.

11 The conversion is executed


by this instruction.
35 36 V1403

Handheld Programmer Keystrokes

12 $
STR
L
B

D
1
ENT

K E
SHFT SHFT ENT
ANDST 3 JMP 4

13 SHFT L
ANDST
H
D

T
3
A

A
0
B

B
1
F

E
5
A

A
0
A

A
0
ENT

SHFT ENT

14
7 MLR 0 1 4 0 0

The table below lists valid ASCII values for HTA conversion.
A ASCII Values Valid for HTA Conversion
Hex Value ASCII Value Hex Value ASCII Value
B 0
1
30
31
8
9
38
39

C 2
3
32
33
A
B
41
42
4 34 C 43
D 5
6
35
36
D
E
44
45
7 37 F 46

5-136 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

Segment (SEG)
DS Used The BCD / Segment instruction converts a four digit HEX value in SEG
HPP Used the accumulator to seven segment display format. The result resides
in the accumulator. 1
2
In the following example, when X1 is on, the value in V1400 is loaded into the lower 16
bits of the accumulator using the Load instruction. The HEX value in the accumulator is 3
converted to seven segment format using the Segment instruction. The bit pattern in the
accumulator is copied to Y20Y57 using the Out Formatted instruction. 4
DirectSOFT
DirectSOFT32 Display V1400
5
X1 6 F 7 1

6
LD
V1400

Load the value in V1400 nto the


lower 16 bits of the accumulator

Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

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

Convert the binary (HEX)


value in the accumulator to
seven segment display
format
9
OUTF
K32

Copy the value in the


Y20

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
10
accumulator to Y20-- Y57

11
Acc. 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0

- g f e d c b a - g f e d c b a - g f e d c b a - g f e d c b a Segment
Labels
a

Segment
f b
Y57 Y56 Y55 Y54 Y53 Y24 Y23 Y22 Y21 Y20
12
Labels g

13
OFF ON ON ON ON OFF OFF ON ON OFF
e c

14
Handheld Programmer Keystrokes

$
STR
B
1
ENT A
L D B E A A

B
ENT
ANDST 3 1 4 0 0
S E G ENT
SHFT SHFT
RST 4 6

C
GX F C A D C
SHFT ENT
OUT 5 2 0 3 2

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-137


Chapter 5: Standard RLL Instructions - Number Conversion

Gray Code (GRAY)


The Gray code instruction converts a 16-bit gray code
1 DS
HPP
Used
Used
value to a BCD value. The BCD conversion requires 10 GRAY
bits of the accumulator. The upper 22 bits are set to 0.
2 This instruction is designed for use with devices (typically
encoders) that use the gray code numbering scheme. The Gray Code instruction will directly
convert a gray code number to a BCD number for devices having a resolution of 512 or 1024
3 counts per revolution. If a device having a resolution of 360 counts per revolution is to be
used, you must subtract a BCD value of 76 from the converted value to obtain the proper
4 result. For a device having a resolution of 720 counts per revolution, you must subtract a
BCD value of 152.
5 In the following example, when X1 is ON, the binary value represented by X10X27 is
loaded into the accumulator using the Load Formatted instruction. The gray code value in
the accumulator is converted to BCD using the Gray Code instruction. The value in the
6 lower 16 bits of the accumulator is copied to V2010.

7 Discrete Bit Flags


SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.

8 SP70 On anytime the value in the accumulator is negative.

DirectSOFT
Direct SOFT32

9
X27 X26 X25 X12 X11 X10
X1 LDF K16 OFF OFF OFF ON OFF ON

X10

10
Load the value represented
by X10X27 into the lower
16 bits of the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

11
GRAY

Convert the 16 bit grey code


value in the accumulator to a
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

12
BCD value
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
OUT
V2010

13 Copy the value in the lower


16 bits of the accumulator to
V2010
Gray Code

0000000000
BCD

0000 0 0 0 6

14
Handheld Programmer Keystrokes 0000000001 0001 V2010
0000000011 0002
$ B ENT
STR 1 0000000010 0003
L D F B A B G 0000000110 0004

A
SHFT ENT
ANDST 3 5 1 0 1 6
0000000111 0005
SHFT G R A Y ENT
6 ORN 0 MLS 0000000101 0006

GX V C A B A 0000000100 0007

B
SHFT ENT
OUT AND 2 0 1 0

C
1000000001 1022
1000000000 1023

5-138 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Number Conversion

Shuffle Digits (SFLDGT)


DS Used The Shuffle Digits instruction shuffles a maximum of 8 digits,
HPP Used rearranging them in a specified order. This function requires
SFLDGT
1
parameters to be loaded into the first level of the accumulator stack
and the accumulator with two additional instructions. Listed below are the steps necessary to
use the shuffle digit function. The example on the following page shows a program for the
2
Shuffle Digits function.
Step 1: Load the value (digits) to be shuffled into the first level of the accumulator
3
stack.
Step 2: Load the order that the digits will be shuffled to into the accumulator. 4
Step 3: Insert the SFLDGT instruction.
5
NOTE: If the number used to specify the order contains a 0 or 9F, the corresponding position
will be set to 0. 6
Discrete Bit Flags
SP63
Description
On when the result of the instruction causes the value in the accumulator to be zero.
7
SP70 On anytime the value in the accumulator is negative.
8
Shuffle Digits Block Diagram
There are a maximum of 8 digits that can be shuffled. The bit positions in the first level of
9
the accumulator stack define the digits to be shuffled. They correspond to the bit positions in
the accumulator that define the order the digits will be shuffled. The digits are shuffled and 10
the result resides in the accumulator.
Digits to be
11
shuffled (first stack location)

9 A B C D E F 0 12
13
1 2 8 7 3 6 5 4

Specified order (accumulator) 14


Bit Positions 8 7 6 5 4 3 2 1
A
B C E F 0 D A 9

Result (accumulator) B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-139


Chapter 5: Standard RLL Instructions - Number Conversion
In the following example, when X1 is on, the value in the first level of the accumulator stack
will be reorganized in the order specified by the value in the accumulator.

1 Example A shows how the shuffle digits works when 0 or 9F is not used when specifying the
order the digits are to be shuffled. Also, there are no duplicate numbers in the specified order.
Example B shows how the Shuffle Digits works when a 0 or 9F is used when specifying the
2 order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed, the
bit positions in the first stack location that had a corresponding 0 or 9F in the accumulator
3 (order specified) are set to 0.
Example C shows how the Shuffle Digits works when duplicate numbers are used specifying
4 the order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed,
the most significant duplicate number in the order specified is used in the result.

5
6 DirectSOFT
Direct SOFT32
A B C
X1

7
LDD V2001 V2000 V2001 V2000 V2001 V2000
V2000 9 A B C D E F 0 0 F E D C B A 9 9 A B C D E F 0

Load the value in V2000 and


V2001 into the accumulator

8
Original 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
bit
Positions 9 A B C D E F 0 Acc. 0 F E D C B A 9 Acc. 9 A B C D E F 0 Acc.

V2007 V2006 V2007 V2006 V2007 V2006

9
LDD
V2006 1 2 8 7 3 6 5 4 0 0 4 3 0 0 2 1 4 3 2 1 4 3 2 1

Load the value in V2006 and


V2007 into the accumulator Specified 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1

10 order

New bit
1 2 8 7 3 6 5 4 Acc. 0 0 4 3 0 0 2 1 Acc. 4 3 2 1 4 3 2 1 Acc.

8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
SFLDGT

11
Positions
B C E F 0 D A 9 Acc. 0 0 0 0 E D A 9 Acc. 0 0 0 0 9 A B C Acc.

Shuf fle the digits in the first


level of the accumulator
stack based on the pattern

12 in the accumulator. The


result is in the accumulator .

OUTD
B C E F 0 D A 9 0 0 0 0 E D A 9 0 0 0 0 9 A B C

13
V2010
V2011 V2010 V2011 V2010 V2011 V2010
Copy the value in the
accumulator to V2010 and
V2011

14 Handheld Programmer Keystrokes

$ B

A
ENT
STR 1

SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
L D D C A A G

B
SHFT ENT
ANDST 3 3 2 0 0 6

SHFT S SHFT F L D G T ENT


RST 5 ANDST 3 6 MLR

C
GX SHFT D C A B A ENT
OUT 3 2 0 1 0

5-140 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

Table Instructions
DS
Move (MOV)
Used The Move instruction moves the values from a V-memory
1
MOV
HPP Used table to another V-memory table the same length (a table being
a consecutive group of V-memory locations). The function V aaa 2
parameters are loaded into the first level of the accumulator stack
and the accumulator by two additional instructions. The MOV instruction can be used to
write data to non-volatile V-memory (see Appendix F). Listed below are the steps necessary to
3
program the MOV function.
Step 1 L
 oad the number of V-memory locations to be moved into the first level of the accumulator
4
stack. This parameter is a HEX value (KFFF max, 7777 octal, 4096 decimal).
Step 2 L
 oad the starting V-memory location for the locations to be moved into the accumulator. 5
This parameter is a HEX value.
Step 3 I nsert the MOV instruction which specifies starting V-memory location (Vaaa) for the
destination table.
6
Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
7
and load the value into the accumulator.
Operand Data Type DL06 Range
8
V-memory V
aaa
See memory map 9
Pointer P See memory map

Discrete Bit Flags Description


10
SP53 On when the value of the operand is larger than the accumulator can work with.
11
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and
is placed in the first stack location after the Load Address instruction is executed. The
12
octal address 2000 (V2000), the starting location for the source table, is loaded into the
accumulator. The destination table location (V2030) is specified in the Move instruction. 13
Direct SOFT32

DirectSOFT
X1 LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
X
X
X
X
X
X
X V2026
X V2027
14
A
Convert octal 2000 to HEX 0 1 2 3 V2000 0 1 2 3 V2030
LDA 400 and load the value into
O 2000 the accumulator 0 5 0 0 V2001 0 5 0 0 V2031
9 9 9 9 V2002 9 9 9 9 V2032
Copy the specified table
MOV

B
locations to a table 3 0 7 4 V2003 3 0 7 4 V2033
V2030 beginning at location V2030
8 9 8 9 V2004 8 9 8 9 V2034
1 0 1 0 V2005 1 0 1 0 V2035
Handheld Programmer Keystrokes
X X X X V2006 X X X X V2036
$

SHFT
STR
L
ANDST
B

D
1

3
ENT

SHFT K
JMP
G
6
ENT
X X X X V2007 X X X X V2037
C
SHFT

SHFT
L
ANDST
M
D

O
3
A

V
0
C

C
2
A
A
0
A

D
0
A

A
0
ENT

ENT
D
ORST INST# AND 2 0 3 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-141


Chapter 5: Standard RLL Instructions - Table Instructions

Move Memory Cartridge (MOVMC)


1 Load Label (LDLBL)
DS Used The Move Memory Cartridge instruction is used to copy data MOVMC
2 HPP Used between V-memory and program ladder memory. The Load Label V aaa
instruction is only used with the MOVMC instruction when copying
3 data from program ladder memory to V-memory.
To copy data between V-memory and program ladder memory,
4 the function parameters are loaded into the first two levels of
the accumulator stack and the accumulator by two additional
LDLBL
K aaa
instructions. Listed below are the steps necessary to program the
5 MOVMC and LDLBL functions.
Step 1: Load the number of words to be copied into the second level of the accumulator stack.
6 Step 2: Load the offset for the data label area in ladder memory and the beginning of the V-memory
block into the first level of the stack.
7 Step 3:Load the source data label (LDLBL Kaaa) into the accumulator when copying data from
ladder memory to V-memory. Load the source address into the accumulator when copying
data from V-memory to ladder memory. This is where the value will be copied from. If the
8 source address is a V-memory location, the value must be entered in HEX.
Step 4:Insert the MOVMC instruction which specifies destination in V-memory (Vaaa). This is
9 the copy destination.

Operand Data Type DL06 Range


10 A aaa
V-memory V See memory map
11
NOTE: Refer to page 5-188 for an example.
12
WARNING: The offset for this usage of the instruction starts at 0, but may be any number that
13 does not result in data outside of the source data area being copied into the destination table.
When an offset is outside of the source information boundaries, then unknown data values will be
transferred into the destination table.
14
A
B
C
D

5-142 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

Copy Data From a Data Label Area to V-memory


In the example below, data is copied from a Data Label Area to V-memory. When X1 is on,
the constant value (K4) is loaded into the accumulator using the Load (LD) instruction. This 1
value specifies the length of the table and is placed in the second stack location after the next
Load and Load Label (LDLBL) instructions are executed. The constant value (K0) is loaded
into the accumulator, specifying the offset for the source and destination data. It is placed
2
in the first stack location after the LDLBL instruction is executed. The source address where
data is being copied from is loaded into the accumulator using the LDLBL instruction. The 3
MOVMC instruction specifies the destination starting location and executes the copying of
data from the Data Label Area to V-memory. 4
DirectSOFT
Direct SOFT32 Data label area .
X1 LD
K4
programmed after
the END instruction
X X
.
X X
5
V1777

Load the value 4 into the


accumulator specifying the
number of locations to be
DLBL
N C O N
K1
1 2 3 4 V2000
6
K 1 2 3 4

7
copied.
N C O N 4 5 3 2 V2001
LD
K 4 5 3 2
K0

Load the value 0 into the


accumulator specifying the
N
K
C
6
O
1
N
5 1
6 1 5 1 V2002
8
offset for source and

9
N C O N 8 8 4 5 V2003
destination locations
K 8 8 4 5
LDLBL X X X X V2004
.
K1

Load the value 1 into the . 10


accumulator specifying the
Data Label Area K1 as the
starting address of the data
to be copied.
11
MOVMC
V2000 12
V2000 is the destination
starting address for the data
to be copied.
13
Handheld Programmer Keystrokes 14
$ B ENT

SHFT
STR
L
ANDST
D
1

3
SHFT K
JMP
E
4
ENT
A
SHFT L
ANDST
D
3
SHFT K
JMP
A
0
ENT
B
SHFT L D L B L B ENT

SHFT
ANDST
M
ORST
O
3

INST#
ANDST
V
AND
M
ORST
1 ANDST
C
2
C
1

2
A
0
A
0
A
0
ENT
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-143


Chapter 5: Standard RLL Instructions - Table Instructions
SETBIT
DS Used The Set Bit instruction sets a single bit to one within a SETBIT
HPP Used range of V-memory locations. A aaa
1 RSTBIT RSTBIT

2 DS
HPP
Used
Used
The Reset Bit instruction resets a single bit to zero within a
range of V-memory locations.
A aaa

The following description applies to both the Set Bit and Reset Bit table instructions.
3 Step 1: Load the length of the table (number of V-memory locations) into the first level of
the accumulator stack. This parameter must be a HEX value, 0 to FF.
4 Step 2: Load the starting V-memory location for the table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert an octal
5 address to hex.
Step 3: Insert the Set Bit or Reset Bit instruction. This specifies the reference for the bit
6 number of the bit you want to set or reset. The bit number is in octal, and the first bit
in the table is number 0.
7 Helpful hint: Remember that each V-memory location contains 16 bits. So, the bits of
the first word of the table are numbered from 0 to 17 octal. For example, if the table length
8 is six words, then 6 words = (6 x 16) bits, = 96 bits (decimal), or 140 octal. The permissible
range of bit reference numbers would be 0 to 137 octal. SP 53 will be set if the bit specified is
outside the range of the table.
9
Operand Data Type DL06 Range
10 aaa
V-memory V See memory map

11 Discrete Bit Flags Description


SP53 On when the specified bit is outside the range of the table.
12
NOTE: Status flags are only valid until the end of the scan or until another instruction that uses the
13 same flag is executed.
V3000
14 For example, suppose we have a table
starting at V3000 that is two words long,
MSB LSB

as shown to the right. Each word in


A the table contains 16 bits, or 0 to 17 in 16 bits
octal. To set bit 12 in the second word,
B we use its octal reference (bit 14). Then
we compute the bits octal address from MSB
V3001
LSB
the start of the table, so 17 + 14 = 34
C octal. The following program shows how
1 1 1 1 11 1 1 7 6 5 4 3 2 1 0
to set the bit as shown to a 1.
D 7 6 5 4 32 1 0

5-144 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

In this ladder example, we will use input X0 to trigger the Set Bit operation. First, we will
load the table length (2 words) into the accumulator stack. Next, we load the starting address
into the accumulator. Since V3000 is an octal number, we have to convert it to hex by using
the LDA command. Finally, we use the Set Bit (or Reset Bit) instruction and specify the octal
1
address of the bit (bit 34), referenced from the table.
2
DirectSOFT
Direct SOFT Display32

X0 Load the constant value 2


3
LD
(Hex.) into the lower 16 bits
K2 of the accumulator.
4
Convert octal 3000 to HEX
LDA
O 3000
and load the value into the
accumulator. This is the
table beginning.
5
SETBIT
O 34
Set bit 34 (octal) in the table
to a 1. 6
Handheld Programmer Keystrokes
7
$
STR
A
0
ENT
8
L D C ENT
SHFT PREV

SHFT
ANDST
L D
3
A D
2
A A A ENT
9
ANDST 3 0 3 0 0 0
X
SET
SHFT
B
1
I
8
T
MLR
NEXT D
3
E
4
ENT 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-145


Chapter 5: Standard RLL Instructions - Table Instructions
Fill (FILL)
DS Used The Fill instruction fills a table of up to 255 V-memory locations
F ILL
1 HPP Used with a value (Aaaa), which is either a V-memory location or a 4-digit
constant. The function parameters are loaded into the first level of the A aaa
accumulator stack and the accumulator by two additional instructions.
2 Listed below are the steps necessary to program the Fill function.
Step 1: Load the number of V-memory locations to be filled into the first level of the
3 accumulator stack. This parameter must be a HEX value, 0FF.
Step 2: Load the starting V-memory location for the table into the accumulator. This
4 parameter must be a HEX value.
Step 3: Insert the Fill instruction which specifies the value to fill the table with. Helpful Hint:
5 For parameters that require HEX values when referencing memory locations, the
LDA instruction can be used to convert an octal address to the HEX equivalent and
load the value into the accumulator.
6 Operand Data Type DL06 Range
A aaa
7 V-memory V See memory map
Pointer P See memory map
8 Constant K 0FF

9 Discrete Bit Flags


SP53 On if the V-memory address is out of range.
Description

10 In the following example, when X1 is on, the constant value (K4) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and
11 is placed on the first level of the accumulator stack when the Load Address instruction is
executed. The octal address 1600 (V1600) is the starting location for the table and is loaded
12 into the accumulator using the Load Address instruction. The value to fill the table with
(V1400) is specified in the Fill instruction.
DirectSOFT
13
Direct S OF T32

X1 Load the cons tant value 4


LD ( HE X) into the lower 16 bits S
K4 of the accumulator S

14
X X X X V1576

Convert the octal addres s X X X X V1577


LDA 1600 to HE X 380 and load the
2 5 0 0 V1600
O 1600 value into the accumulator V1400
2 5 0 0 V1601

A
2 5 0 0
2 5 0 0 V1602
F ill the table with the value
F ILL 2 5 0 0 V1603
in V1400
V1400 X X X X V1604

B Handheld Programmer Keys trokes


X X

S
S
X X V1605

C
Handheld Programmer Keystrokes

$ B ENT
STR 1

SHFT L D PREV E ENT

D
ANDST 3 4

SHFT L D A B G A A ENT
ANDST 3 0 1 6 0 0

SHFT F I L L B E A A ENT
5 8 ANDST ANDST 1 4 0 0

5-146 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
Find (FIND)
DS Used The Find instruction is used to search for a specified value in a
F IND
HPP Used V-memory table of up to 255 locations. The function parameters
are loaded into the first and second levels of the accumulator stack A aaa 1
and the accumulator by three additional instructions. Listed below
are the steps necessary to program the Find function. 2
Step 1: Load the length of the table (number of V-memory locations) into the second level of
the accumulator stack. This parameter must be a HEX value, 0FF. 3
Step 2: Load the starting V-memory location for the table into the first level of the
accumulator stack. This parameter must be a HEX value.
Step 3: Load the offset from the starting location to begin the search. This parameter must be
4
a HEX value.
Step 4: Insert the Find instruction which specifies the first value to be found in the table.
5
Results: The offset from the starting address to the first V-memory location which contains
the search value (in HEX) is returned to the accumulator. SP53 will be set On if an address
6
outside the table is specified in the offset or the value is not found. If the value is not found 0
will be returned in the accumulator. 7
Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent 8
and load the value into the accumulator.
9

Operand Data Type
A
DL06 Range
aaa
10
V-memory
Constant
V
K
See memory map
0FF
11
Discrete Bit Flags Description 12
SP53 On if there is no value in the table that is equal to the search value.

NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The
13
pointer for this instruction starts at 0 and resides in the accumulator.
14
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the second stack location when the following Load Address and Load instruction is
A
executed. The octal address 1400 (V1400) is the starting location for the table and is loaded
into the accumulator. This value is placed in the first level of the accumulator stack when the B
following Load instruction is executed. The offset (K2) is loaded into the lower 16 bits of the
accumulator using the Load instruction. The value to be found in the table is specified in the
Find instruction. If a value is found equal to the search value, the offset (from the starting
C
location of the table) where the value is located will reside in the accumulator.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-147


Chapter 5: Standard RLL Instructions - Table Instructions

DirectSOFT
DirectS OF T 32 Dis play S
S

1
X1
LD Table length
0 1 2 3 V1400 0
K6 Offs et
0 5 0 0 V1401 1
Load the cons tant value 6

2
Begin here 9 9 9 9 V1402 2
(HE X) into the lower 16 bits
of the accumulator 3 0 7 4 V1403 3 Accumulator
0 0 0 0 0 0 0 4
LDA 8 9 8 9 V1404 4

3 1 0 1 0 V1405 V1404 contains the location


O 1400 5
where the match was found.
X X X X V1406 The value 8989 was the 4th
C onvert octal 1400 to HE X location after the s tart of the
300 and load the value into X X X X V1407 s pecified table.

4 the accumulator.

LD
S
S

5 K2

Load the cons tant value


2 into the lower 16 bits
Handheld Programmer Keystrokes

$ B ENT
STR 1

6
of the accumulator
SHFT L D PREV G ENT
ANDST 3 6

F IND SHFT L D A B E A
ANDST 3 0 1 4 0

7
K8989
L D C ENT
SHFT PREV
F ind the location in the table ANDST 3 2
where the value 8989 res ides
SHFT F I N D I J I J ENT
NEXT

8
5 8 TMR 3 8 9 8 9

Find Greater Than (FDGT)


9 The Find Greater Than instruction is used to search for the first
occurrence of a value in a V-memory table that is greater than
the specified value (Aaaa), which can be either a V-memory
10 location or a 4-digit constant. The function parameters are
F DG T
A aaa
loaded into the first level of the accumulator stack and the
11 accumulator by two additional instructions. Listed below are the
steps necessary to program the Find Greater Than function.
12 Step 1: Load the length of the table (up to 255 locations) into the first level of the
accumulator stack. This parameter must be a HEX value, 0FF.

13 Step 2: Load the starting V-memory location for the table into the accumulator. This
parameter must be a HEX value.

14 Step 3: Insert the FDGT instruction which specifies the greater than search value.
Results: The offset from the starting address to the first V-memory location
which contains the greater than search value (in HEX) which is returned to
A the accumulator. SP53 will be set On if the value is not found and 0 will be
returned in the accumulator.
B Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
C
NOTE: This instruction does not have an offset, such as the one required for the FIND instruction.
D

5-148 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

Operand Data Type DL06 Range



V-memory
A
V
aaa
See memory map
1
Constant K 0FF
2
Discrete Bit Flags Description
SP53 On if there is no value in the table that is equal to the search value.
3
NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The
pointer for this instruction starts at 0 and resides in the accumulator. 4
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is 5
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the table and is loaded into the accumulator.
The Greater Than search value is specified in the Find Greater Than instruction. If a value is
6
found greater than the search value, the offset (from the starting location of the table) where
the value is located will reside in the accumulator. If there is no value in the table that is 7
greater than the search value, a zero is stored in the accumulator and SP53 will come ON.
8
DirectSOFT
DirectS OF T 32 Dis play

X1
9
LD
K6

Load the cons tant value 6 S


10
(HE X) into the lower 16 bits S
of the accumulator

LDA
Begin here 0
0
1
5
2
0
3 V1400
0 V1401
0
1
Table length

Accumulator
11
O 1400

12
9 9 9 9 V1402 2 0 0 0 0 0 0 0 2

C onvert octal 1400 to HE X 3 0 7 4 V1403 3 V1402 contains the location


300 and load the value into 8 9 8 9 V1404 where the firs t value greater
the accumulator. 4
than the s earch value was

F DG T
1
X
0
X
1
X
0 V1405
X V1406
5 found. 9999 was the 2nd
location after the s tart of the
s pecified table.
13
X X X X V1407
K8989

F ind the value in the table


greater than the s pecified value
S
S 14
Handheld Programmer Keystrokes

$
Handheld Programmer Keys trokes
B ENT
A
STR 1

B
STR X(IN) 1
SHFT L D PREV G ENT
LD ANDST K(C ON)3 6 6

SHFTLD L S HFDT AA B E 4 A 0A

C
OC T 1 0
ENT
ANDST 3 0 1 4 0 0
S HF TF FD GD T G T S HF IT K(CJON) 8 9 8 9
SHFT NEXT I J ENT
5 3 6 MLR 8 9 8 9

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-149


Chapter 5: Standard RLL Instructions - Table Instructions

Table to Destination (TTD)


The Table To Destination instruction moves a value from a
1 DS Used
V-memory table to a V-memory location and increments the
table pointer by 1. The first V-memory location in the table TTD
HPP Used
contains the table pointer which indicates the next location
2 in the table to be moved. The instruction will be executed
once per scan provided the input remains on. The table
Aaaa

3 pointer will reset to 1 when the value equals the last location
in the table. The function parameters are loaded into the first
level of the accumulator stack and the accumulator by two
4 additional instructions. Listed below are the steps necessary
to program the Table To Destination function.
5 Step 1: Load the length of the data table (number of V-memory locations) into the
first level of the accumulator stack. This parameter must be a HEX value, 0 to
6
FF.
Step 2: Load the starting V-memory location for the table into the accumulator.
(Remember, the starting location of the table is used as the table pointer.)
7 This parameter must be a HEX value.
Step 3: Insert the TTD instruction which specifies destination V-memory location
8 (Vaaa).
Helpful Hint: For parameters that require HEX values when referencing memory
9 locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
10 Helpful Hint: The instruction will be executed every scan if the input logic is on. If you
do not want the instruction to execute for more than one scan, a one-shot (PD) should be
11 used in the input logic.
Helpful Hint: The pointer location should be set to the value where the table operation
will begin. The special relay SP0 or a one-shot (PD) should be used so the value will only be
12 set in one scan and will not affect the instruction operation.

13 Operand Data Type DL06 Range


A aaa
14 V-memory V See memory map

A Discrete Bit Flags


SP56
Description
On when the table pointer equals the table length.

B NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed,
or the end of the scan. The pointer for this instruction starts at 0 and resets when the table length is
C reached. At first glance it may appear that the pointer should reset to 0. However, it resets to 1,
not 0.
D

5-150 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the 1
accumulator. Remember, V1400 is used as the pointer location, and is not actually part of the
table data source. The destination location (V1500) is specified in the Table to Destination
instruction. The table pointer (V1400 in this case) will be increased by 1 after each
2
execution of the TTD instruction.
DirectSOFT
DirectSOFT32 3
X1 LD Load the constant value 6

4
(HEX) into the lower 16 bits
K6 of the accumulator

Convert octal 1400 to HEX


LDA

5
300 and load the value into
0 1400 the accumulator. This is the
table pointer location

Copy the specified value from

6
TTD
the table to the specified
V1500 destination (V1500)

Handheld Programmer Keystrokes

$ B
7
ENT
STR 1

SHFT L
ANDST
D
3
PREV G
6
ENT
8
SHFT L D A B E A A ENT

9
ANDST 3 0 1 4 0 0

SHFT T T D B F A A ENT
MLR MLR 3 1 5 0 0

It is important to understand how the table


Table Table Pointer
10
locations are numbered. If you examine the 0 5 0 0 0 6 0 0 0 0 V1400

11
V1401
example table, youll notice that the first data V1402 9 9 9 9 1
location, V1401, will be used when the pointer V1403 3 0 7 4 2
Des tination
X X X X V1500
is equal to zero, and again when the pointer is
12
V1404 8 9 8 9 3

equal to six. Why? Because the pointer is only V1405 1 0 1 0 4


2 0 4 6 5
equal to zero before the very first execution. V1406

13
V1407 X X X X
From then on, it increments from one to six, S
and then resets to one. S

Also, our example uses a normal input contact


(X1) to control the execution. Since the
DirectSOFT
DirectSOFT32
X1
(optional latch example using SP56)

C0
14
PD
CPU scan is extremely fast, and the pointer
increments automatically, the table would cycle
C1
LD
K6
A
through the locations very quickly. If this is a Load the constant value 6
problem, you have an option of using SP56 in
conjunction with a one-shot (PD) and a latch C0
(HEX) into the lower 16 bits
of the accumulator

C1
B
(C1 for example) to allow the table to cycle SET

through all locations one time and then stop. SP56 C1


RST
C
The logic shown here is not required, its just an
optional method. Since Special Relays are
reset at the end of the scan,
this latch must follow the TTD
D
instruction in the program

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-151


Chapter 5: Standard RLL Instructions - Table Instructions

The following diagram shows the scan-by-scan results of the execution for our example
program. Notice how the pointer automatically cycles from 0 6, and then starts over at 1
1 instead of 0. Also, notice how SP56 is only on until the end of the scan.

2 Scan N Before TTD Execution After TTD Execution

Table Table Pointer Table Table Pointer (Automatically Incremented)

3 V1401
V1402
0
9
5
9
0
9
0
9
0 6
1
0 0 0

Destination
0 V1400 V1401
V1402
0
9
5
9
0
9
0
9
0 6
1
0 0 0

Destination
1 V1400

V1403 3 0 7 4 2 V1403 3 0 7 4 2

4 V1404
V1405
8
1
9
0
8
1
9
0
3
4
X X X

SP56
X V1500
V1404
V1405
8
1
9
0
8
1
9
0
3
4
0 5

SP56
0 0 V1500

V1406 2 0 4 6 5 V1406 2 0 4 6 5

5
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .
6 Scan N+1 Before TTD Execution

Table Table Pointer


After TTD Execution

Table Table Pointer (Automatically Incremented)

7 V1401
V1402
V1403
0
9
3
5
9
0
0
9
7
0
9
4
0 6
1
2
0 0 0

Destination
1 V1400 V1401
V1402
V1403
0
9
3
5
9
0
0
9
7
0
9
4
0 6
1
2
0 0 0

Destination
2 V1400

8
0 5 0 0 V1500 9 9 9 9 V1500
V1404 8 9 8 9 3 V1404 8 9 8 9 3
V1405 1 0 1 0 4 V1405 1 0 1 0 4
V1406 2 0 4 6 5 SP56 V1406 2 0 4 6 5 SP56
SP56 = OFF SP56 = OFF

9 V1407 X X X
.
.
X V1407 X X
.
.
X X

.
10 .
.

11 Scan N+5 Before TTD Execution

Table Table Pointer


After TTD Execution

Table Table Pointer (Automatically Incremented)

V1401 0 5 0 0 0 6 0 0 0 5 V1400 V1401 0 5 0 0 0 6 0 0 0 6 V1400

12 V1402
V1403
9
3
9
0
9
7
9
4
1
2
Destination
1 0 1 0 V1500
V1402
V1403
9
3
9
0
9
7
9
4
1
2
Destination
2 0 4 6 V1500
V1404 8 9 8 9 3 V1404 8 9 8 9 3

13 V1405
V1406
1
2
0
0
1
4
0
6
4
5 SP56
SP56 = OFF
V1405
V1406
1
2
0
0
1
4
0
6
4
5 SP56
SP56 = ON
V1407 X X X X V1407 X X X X

14
until end of scan
. . or next instruction
. . that uses SP56

Scan N+6
A Before TTD Execution After TTD Execution

Table Table Pointer Table Table Pointer (Resets to 1, not 0)

V1401 0 5 0 0 0 6 0 0 0 6 V1400 V1401 0 5 0 0 0 6 0 0 0 1 V1400

B V1402
V1403
V1404
9
3
8
9
0
9
9
7
8
9
4
9
1
2
3
Destination
2 0 4 6 V1500
V1402
V1403
V1404
9
3
8
9
0
9
9
7
8
9
4
9
1
2
3
Destination
0 5 0 0 V1500

C V1405
V1406
V1407
1
2
X
0
0
X X
1
4
0
6
X
4
5 SP56
SP56 = OFF
V1405
V1406
V1407
1
2
X
0
0
X
1
4
X
0
6
X
4
5 SP56
SP56 = OFF

. .
D . .

5-152 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

Remove from Bottom (RFB)


DS Used The Remove From Bottom instruction moves a value from
HPP Used the bottom of a V-memory table to a V-memory location and
decrements a table pointer by 1. The first V-memory location
RFB
Aaaa
1
in the table contains the table pointer which indicates the next
location in the table to be moved. The instruction will be executed 2
once per scan provided the input remains on. The instruction
will stop operation when the pointer equals 0. The function
parameters are loaded into the first level of the accumulator stack
3
and the accumulator by two additional instructions. Listed below
are the steps necessary to program the Remove From Bottom 4
function.

Step 1: Load the length of the table (number of V-memory locations) into the first level of
5
the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator. (Remember,
6
the starting location of the table blank is used as the table pointer.) This parameter must be a
HEX value. 7
Step 3: Insert the RFB instruction which specifies destination V-memory location (Vaaa).
Helpful Hint: For parameters that require HEX values when referencing memory
8
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator. 9
Helpful Hint: The instruction will be executed every scan if the input logic is on. If you
do not want the instruction to execute for more than one scan, a one-shot (PD) should be
used in the input logic.
10
Helpful Hint: The pointer location should be set to the value where the table operation
will begin. The special relay SP0 or a one-shot (PD) should be used so the value will only be
11
set in one scan and will not affect the instruction operation.
12
Operand Data Type DL06 Range
13
A aaa
V-memory V See memory map 14
Discrete Bit Flags Description A
SP56 On when the table pointer equals zero..

NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed
B
or the end of the scan The pointer for this instruction can be set to start anywhere in the table. It is
not set automatically. You must load a value into the pointer somewhere in your program. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-153


Chapter 5: Standard RLL Instructions - Table Instructions

In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
1 placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the
2 accumulator. Remember, V1400 is used as the pointer location, and is not actually part of the
table data source. The destination location (V1500) is specified in the Remove From Bottom.
The table pointer (V1400 in this case) will be decremented by 1 after each execution of the
3 RFB instruction.
DirectSOFT
DirectSOFT32

4 X1 LD

K6

Load the constant value 6

5 (HEX) into the lower 16 bits


of the accumulator

LDA

6
0 1400

Convert octal 1400 to HEX


300 and load the value into
the accumulator. This is the

7
table pointer location

RFB
V1500

8
Copy the specified value from
the table to the specified
destination (V1500)

Handheld Programmer Keystrokes

9 $
STR
L
B

D
1
ENT

G
SHFT PREV ENT
ANDST 3 6

10 SHFT L
ANDST
D
3
A
0
B
1
E
4
A
0
A
0
ENT

SHFT R F B B F A A ENT

11
ORN 5 1 1 5 0 0

It is important to understand how the table Table Table Pointer

locations are numbered. If you examine the V1401 0 5 0 0 1 0 0 0 0 V1400

12 example table, youll notice that the first data


location, V1401, will be used when the pointer
V1402
V1403
9
3
9
0
9
7
9
4
2
3
X
Des tination
X X X V1500
V1404 8 9 8 9 4

13 is equal to one. The second data location,


V1402, will be used when the pointer is equal
V1405
V1406
1
2
0
0
1
4
0
6
5
6

to two, etc. V1407 X X X X

14 S
S
DirectSOFT32 (optional
DirectSOFTDisplay one-shot
(optional metod)
one-shot method)

A Also, our example uses a normal input contact


X1 C0
PD

C0
(X1) to control the execution. Since the LD

B CPU scan is extremely fast, and the pointer


K6
Load the constant value 6
decrements automatically, the table would cycle (HEX) into the lower 16 bits

C
of the accumulator
through the locations very quickly. If this is
a problem for your application, you have an LDA
O 1400
option of using a
D one-shot (PD) to remove one value each time
Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
the input contact transitions from low to high. table pointer location.

5-154 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions -Table Instructions

The following diagram shows the scan-by-scan results of the execution for our example
program. Notice how the pointer automatically decrements from 6 to 0. Also, notice how
SP56 is only on until the end of the scan. 1
Example of Execution
Scan N Before RFB Execution After RFB Execution
2
V1401 0
Table
5 0 0 1 0
Table Pointer
0 0 6 V1400 V1401 0
Table
5 0 0 1
Table Pointer (Automatically Decremented)
0 0 0 5 V1400 3
V1402 9 9 9 9 2 V1402 9 9 9 9 2

4
Destination Destination
V1403 3 0 7 4 3 V1403 3 0 7 4 3
X X X X V1500 2 0 4 6 V1500
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405 1 0 1 0 5 V1405 1 0 1 0 5

5
SP56 SP56
V1406 2 0 4 6 6 V1406 2 0 4 6 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .

Scan N+1 Before RFB Execution After RFB Execution


6
7
Table Table Pointer Table Table Pointer (Automatically Decremented)
V1401 0 5 0 0 1 0 0 0 5 V1400 V1401 0 5 0 0 1 0 0 0 4 V1400
V1402 9 9 9 9 2 V1402 9 9 9 9 2
Destination Destination

8
V1403 3 0 7 4 3 V1403 3 0 7 4 3
2 0 4 6 V1500 1 0 1 0 V1500
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405 1 0 1 0 5 V1405 1 0 1 0 5
SP56 SP56

9
V1406 2 0 4 6 6 V1406 2 0 4 6 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .
.
.
.
10
Scan N+4 Before RFB Execution
Table Table Pointer
After RFB Execution
Table Table Pointer (Automatically Decremented)
11
V1401
V1402
V1403
0
9
3
5
9
0
0
9
7
0
9
4
1
2
3
0 0 0

Destination
2 V1400 V1401
V1402
V1403
0
9
3
5
9
0
0
9
7
0
9
4
1
2
3
0 0 0

Destination
1 V1400
12
3 0 7 4 V1500 9 9 9 9 V1500
V1404
V1405
V1406
8
1
2
9
0
0
8
1
4
9
0
6
4
5
6 SP56
V1404
V1405
V1406
8
1
2
9
0
0
8
1
4
9
0
6
4
5
6 SP56
13
SP56 = OFF SP56 = OFF

14
V1407 X X X X V1407 X X X X
. .
. .

Scan N+5 Before RFB Execution

Table Table Pointer


After RFB Execution

Table Table Pointer


A
V1401 0 5 0 0 1 0 0 0 1 V1400 V1401 0 5 0 0 1 0 0 0 0 V1400

V1402
V1403
9
3
9
0
9
7
9
4
2
3
Destination
V1402
V1403
9
3
9
0
9
7
9
4
2
3
Destination B
9 9 9 9 V1500 0 5 0 0 V1500
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405
V1406
1
2
0
0
1
4
0
6
5
6 SP56
V1405
V1406
1
2
0
0
1
4
0
6
5
6 SP56
C
SP56 = OFF SP56 = ON
V1407 X X X X V1407 X X X X
. .
D
until end of scan
. . or next instruction
that uses SP56

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-155


Chapter 5: Standard RLL Instructions - Table Instructions

Source to Table (STT)


The Source To Table instruction moves a value from
1 DS
HPP
Used
Used
a V-memory location into a V-memory table and
increments a table pointer by 1. When the table pointer
reaches the end of the table, it resets to 1. The first STT

2 V-memory location in the table contains the table pointer


which indicates the next location in the table to store a
V aaa

3 value. The instruction will be executed once per scan,


provided the input remains on. The function parameters
are loaded into the first level of the accumulator stack and
4 the accumulator with two additional instructions. Listed
below are the steps necessary to program the Source To
5 Table function.
Step 1: Load the length of the table (number of V-memory locations) into the first
level of the accumulator stack. This parameter must be a HEX value, 0 to FF.
6 Step 2: Load the starting V-memory location for the table into the accumulator.
(Remember, the starting location of the table is used as the table pointer.)
7 This parameter must be a HEX value.
Step 3: Insert the STT instruction which specifies the source V-memory location
8 (Vaaa). This is where the value will be moved from.
Helpful Hint: For parameters that require HEX values when referencing memory
9 locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
10 Helpful Hint: The instruction will be executed every scan if the input logic is on. If you do
not want the instruction to execute for more than one scan, a one-shot (PD) should be used
in the input logic.
11 Helpful Hint: The table counter value should be set to indicate the starting point for the
operation. Also, it must be set to a value that is within the length of the table. For example,
12 if the table is 6 words long, then the allowable range of values that could be in the pointer
should be between 0 and 6. If the value is outside of this range, the data will not be moved.
13 Also, a one-shot (PD) should be used so the value will only be set in one scan and will not
affect the instruction operation.

14 Operand Data Type DL06 Range


A
V-memory
A
V
aaa
See memory map

B Discrete Bit Flags Description


SP56 On when the table pointer equals the table length.
C NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed,
or the end of the scan. The pointer for this instruction starts at 0 and resets to 1 automatically when
D the table length is reached.

5-156 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions -Table Instructions

In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400), which is the starting location for the destination table and table
1
pointer, is loaded into the accumulator. The data source location (V1500) is specified in the
Source to Table instruction. The table pointer will be increased by 1 after each time the 2
instruction is executed.
DirectSOFT
DirectS OF T 32

X1 LD
3
K6

Load the constant value 6


(HEX) into the the lower 16 bits
4
5
of the accumulator

LDA
0 1400

Convert octal 1400 to HEX


300 and load the value into
the accumulator
6
STT
V1500
7
Copy the specified value
from the source location
(V1500) to the table
8
9
Handheld Programmer Keystrokes

$ B ENT
STR 1
L D G
SHFT

SHFT
ANDST

L D
3

A
PREV

B
6
ENT

E A A ENT
10
ANDST 3 0 1 4 0 0

SHFT S
RST
SHFT
T
MLR
T
MLR
B
1
F
5
A
0
A
0
Table
ENT

Table Pointer
11
It is important to understand how the table locations
are numbered. If you examine the example table,
V1401
V1402
X
X
X
X
X
X
X
X
0 6
1
0 0 0 0 V1400
12
youll notice that the first data storage location, V1403 X X X X 2
Data S ource

V1401, will be used when the pointer is equal to


zero, and again when the pointer is equal to six.
V1404
V1405
X
X
X
X
X
X
X
X
3
4
0 5 0 0 V1500
13
Why? Because the pointer is only equal to zero
14
V1406 X X X X 5

before the very first execution. From then on, it V1407 X X X X


S
increments from one to six, and then resets to one.
A
S
Also, our example uses a normal input contact DirectSOFT
DirectSOFT32 (optional one-shot method)

(X1) to control the execution. Since the CPU X1 C0

B
PD
scan is extremely fast, and the pointer increments C0
LD
automatically, the source data would be moved K6

into all the table locations very quickly. If this is a Load the constant value 6

problem for your application, you have an option of


(HEX) into the lower 16 bits
of the accumulator

LDA
C
using a one-shot (PD) to move one value each time O 1400

the input contact transitions from low to high. Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
starting table location.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-157


Chapter 5: Standard RLL Instructions - Table Instructions

The following diagram shows the scan-by-scan results of the execution for our example
program. Notice how the pointer automatically cycles from 0 to 6, and then starts over at 1
1 instead of 0. Also, notice how SP56 is affected by the execution. Although our example does
not show it, we are assuming that there is another part of the program that changes the value
in V1500 (data source) prior to the execution of the STT instruction. This is not required,
2 but it makes it easier to see how the data source is copied into the table.

3 Scan N Before STT Execution

Table Table Pointer


After STT Execution

Table Table Pointer (Automatically Incremented)

4
V1401 X X X X 0 6 0 0 0 0 V1400 V1401 0 5 0 0 0 6 0 0 0 1 V1400
V1402 X X X X 1 V1402 X X X X 1
Source Source
V1403 X X X X 2 V1403 X X X X 2
0 5 0 0 V1500 0 5 0 0 V1500

5
V1404 X X X X 3 V1404 X X X X 3

V1405 X X X X 4 V1405 X X X X 4
SP56 SP56
V1406 X X X X 5 V1406 X X X X 5
SP56 = OFF SP56 = OFF
X X X X X X X X

6
V1407 V1407
. .
. .

7 Scan N+1 Before STT Execution


Table Table Pointer
After STT Execution

Table Table Pointer (Automatically Incremented)


V1401 0 5 0 0 0 6 0 0 0 1 V1400 V1401 0 5 0 0 0 6 0 0 0 2 V1400

8 V1402
V1403
X
X
X
X
X
X
X
X
1
2
9
Source
9 9 9 V1500
V1402
V1403
9
X
9
X
9
X
9
X
1
2
9
Source
9 9 9 V1500
V1404 X X X X 3 V1404 X X X X 3

9 V1405
V1406
X
X
X
X
X
X
X
X
X
X
X
X
4
5 SP56
SP56 = OFF
V1405
V1406
X
X
X
X
X
X
X
X
4
5 SP56
SP56 = OFF
V1407 V1407 X X X X
. .
10 .
.
.
.
11 .
Scan N+5 Before STT Execution After STT Execution

12 V1401 0
Table
5 0 0 0 6
Table Pointer
0 0 0 5 V1400 V1401 0
Table
5 0 0 0 6
Table Pointer (Automatically Incremented)
0 0 0 6 V1400
V1402 9 9 9 9 1 V1402 9 9 9 9 1

13 V1403
V1404
3
8
0
9
7
8
4
9
2
3
2
Source
0 4 6 V1500
V1403
V1404
3
8
0
9
7
8
4
9
2
3
2
Source
0 4 6 V1500

V1405 1 0 1 0 4 V1405 1 0 1 0 4

14 V1406
V1407
X
X
X X
X X
X
X
5 SP56
SP56 = OFF
V1406
V1407
2
X
0
X
4
X
6
X
5 SP56
SP56 = ON
until end of scan
. . or next instruction
. .
A
that uses SP56

Scan N+6 Before STT Execution After STT Execution

B V1401
V1402
0
9
Table
5
9
0
9
0
9
0 6
1
Table Pointer
0 0 0 6 V1400 V1401
V1402
1
9
Table
2
9
3
9
4
9
0 6
1
Table Pointer (Resets to 1, not 0)
0 0 0 1 V1400

Source Source

C V1403 3 0 7 4 2 V1403 3 0 7 4 2
1 2 3 4 V1500 1 2 3 4 V1500
V1404 8 9 8 9 3 V1404 8 9 8 9 3
V1405 1 0 1 0 4 V1405 1 0 1 0 4

D
V1406 2 0 4 6 5 SP56 V1406 2 0 4 6 5 SP56
V1407 SP56 = OFF SP56 = OFF
X X X X V1407 X X X X
. .
. .

5-158 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
Remove from Table (RFT)
DS Used The Remove From Table instruction pops a value off a table and
stores it in a V-memory location. When a value is removed from
HPP Used
the table all other values are shifted up 1 location. The first RFT 1
V-memory location in the table contains the table length V aaa
counter. The table counter decrements by 1 each time the
instruction is executed. If the length counter is zero or greater
2
than the maximum table length (specified in the first level of the
accumulator stack) the instruction will not execute and SP56 3
will be On.

The instruction will be executed once per scan, provided the input remains on. The function
4
parameters are loaded into the first level of the accumulator stack and the accumulator by two
additional instructions. Listed below are the steps necessary to program the Remove From 5
Table function.
Step 1: Load the length of the table (number of V-memory locations) into the first 6
level of the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator. 7
(Remember, the starting location of the table is used as the table length
counter.) This parameter must be a HEX value. 8
Step 3: Insert the RFT instructions which specifies destination V-memory location
(Vaaa). This is where the value will be moved to. 9
Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
10
Helpful Hint: The instruction will be executed every scan if the input logic is on. If you do
not want the instruction to execute for more than one scan, a one-shot (PD) should be used 11
in the input logic.
Helpful Hint: The table counter value should be set to indicate the starting point for the 12
operation. Also, it must be set to a value that is within the length of the table. For example, if
the table is 6 words long, then the allowable range of values that could be in the table counter
should be between 1 and 6. If the value is outside of this range or zero, the data will not be
13
moved from the table. Also, a one-shot (PD) should be used so the value will only be set in
one scan and will not affect the instruction operation. 14
Operand Data Type DL06 Range
A aaa
A
V-memory V See memory map

Discrete Bit Flags Description


B
SP56 On when the table pointer equals zero.
C
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed,
or the end of the scan The pointer for this instruction can be set to start anywhere in the table. It is D
not set automatically. You must load a value into the pointer somewhere in your program.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-159


Chapter 5: Standard RLL Instructions - Table Instructions

In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
1 address 1400 (V1400) is the starting location for the source table and is loaded into the
accumulator. The destination location (V1500) is specified in the Remove from Table
2 instruction. The table counter will be decreased by 1 after the instruction is executed.

3 DirectSOFT
DirectSOFT32 Display

X1
LD
Load the constant value 6
(Hex.) into the lower 16 bits
K6 of the accumulator

4
LDA Convert octal 1400 to HEX

5
300 and load the value into
O 1400 the accumulator

6 RFT
V1500
Copy the specified value
from the table to the
specified location (V1500)

7
Handheld Programmer Keystrokes

8 $
STR
B
1
ENT

SHFT L D PREV G ENT

9 SHFT
ANDST

L
ANDST
D
3

3
A
0
B
6

1
E
4
A
0
A
0
ENT

10 SHFT R
ORN
F
5
T
MLR
B
1
F
5
A
0
A
0
ENT

11 Since the table counter specifies the range of data


that will be removed from the table, it is important to
Table Table C ounter

V1401 0 5 0 0 1 0 0 0 6 V1400
understand how the table locations are numbered. If
12 you examine the example table, youll notice that the
V1402
V1403
9
3
9
0
9
7
9
4
2
3
Des tination
data locations are numbered from the top of the table. X X X X V1500

13 V1404 8 9 8 9 4
For example, if the table counter started at 6, then V1405 1 0 1 0 5
all six of the locations would be affected during the V1406 2 0 4 6 6

14 instruction execution. V1407 X X

S
X X

S
A Also, our example uses a normal input contact (X1) to
DirectSOFT32 Display (optional one-shot method)
X1 C0
PD

B control the execution. Since the CPU scan is extremely


fast, and the pointer decrements automatically, the data
C0
LD
K6

would be removed from the table very quickly. If this is Load the constant value 6

C a problem for your application, you have an option of


(HEX) into the lower 16 bits
of the accumulator

using a one-shot (PD) to remove one value each time LDA

D
O 1400
the input contact transitions from low to high. Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
table pointer location.

5-160 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

The following diagram shows the scan-by-scan results of the execution for our example
program. In our example, we show the table counter set to 4, initially. (Remember, you can
set the table counter to any value that is within the range of the table.) The table counter
automatically decrements from 4 to 0 as the instruction is executed. Notice how the last two 1
table positions, 5 and 6, are not moved up through the table. Also, notice that SP56, which
comes on when the table counter is zero, is only on until the end of the scan. 2
3
Scan N
Before RFT Execution

Table Table Counter


0 0 0 4 V1400
After RFT Execution

Table
0
Table Counter
(Automatically d ecremented)
0 0 3 V1400
4
Table Counter V1401 0 5 0 0 1 V1401 9 9 9 9 1 0
5

5
indicates that 9 9 9 9 2 4 0 7 9 2 0
V1402 V1402
these 4 Destination 0
Destination
positions will V1403 3 0 7 4 3 V1403 8 9 8 9 3
be X X X X V1500 0 5 0 0 V1500
V1404 8 9 8 9 4 Start here V1404 8 9 8 9 4
used

6
V1405 1 0 1 0 5 V1405 1 0 1 0 5
SP56 SP56
V1406 2 0 4 6 6 V1406 2 0 4 6 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .
Scan N+1
7
Before RFT Execution After RFT Execution

8
Table Counter
Table Table Counter Table (Automatically decremented)
V1401 9 9 9 9 1 0 0 0 3 V1400 V1401 4 0 7 9 1 9 0 0 0 2 V1400
9
V1402 4 0 7 9 2 V1402 8 9 8 9 2 9
9

9
Destination Destination
V1403 8 9 8 9 3 Start here V1403 8 9 8 9 3
0 5 0 0 V1500 9 9 9 9 V1500
V1404 8 9 8 9 4 V1404 8 9 8 9 4

V1405 1 0 1 0 5 V1405 1 0 1 0 5

10
V1406 2 0 4 6 6 SP56 V1406 2 0 4 6 6 SP56
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .

Scan N+2 Before RFT Execution After RFT Execution


11
Table Counter
Table Counter

12
Table Table (Automatically decremented)
V1401 4 0 7 9 1 0 0 0 2 V1400 V1401 8 9 8 9 1 4 0 0 0 1 V1400
0
V1402 8 9 8 9 2 Start here V1402 8 9 8 9 2 7
Destination 9
8 9 8 9 3 8 9 8 9 3 Destination
V1403 V1403
V1404
V1405
8
1
9
0
8
1
9
0
4
5
9 9 9 9 V1500
V1404
V1405
8
1
9
0
8
1
9
0
4
5
4 0 7 9 V1500
13
V1406 2 0 4 6 6 SP56 V1406 2 0 4 6 6 SP56

14
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. .
Scan N+3 Before RFT Execution

Table
Table Counter
After RFT Execution

Table
Table Counter
(Automatically decremented)
A
V1401 8 9 8 9 1 0 0 0 1 V1400 Start here V1401 8 9 8 9 1 8 0 0 0 0 V1400

V1402
V1403
8
8
9
9
8
8
9
9
2
3
Destinatio
4 0 7 9 V1500
V1402
V1403
8
8
9
9
8
8
9
9
2
3
9
8
9
Destination
8 9 8 9 V1500
B
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405
V1406
1
2
0
0
1
4
0
6
5
6 SP56
SP56 = OFF
V1405
V1406
1
2
0
0
1
4
0
6
5
6 SP56
SP56 = ON
C
V1407 X X X X V1407 X X X X
. . until end of scan
. . or next instruction
that uses SP56 D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-161


Chapter 5: Standard RLL Instructions - Table Instructions

Add to Top (ATT)


The Add To Top instruction pushes a value on to a V-memory
1 table from a V-memory location. When the value is added to the AT T
DS Used V aaa
table all other values are pushed down 1 location.
HPP Used

2
3 The instruction will be executed once per scan, provided the input remains on. The function
parameters are loaded into the first level of the accumulator stack and the accumulator by
two additional instructions. Listed below are the steps necessary to program the Add To Top
4 function.
Step 1: Load the length of the table (number of V-memory locations) into the first
5 level of the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator.
6 (Remember, the starting location of the table is used as the table length
counter.) This parameter must be a HEX value.

7 Step 3: Insert the ATT instructions which specifies source V-memory location (Vaaa).
This is where the value will be moved from.

8 Helpful Hint: The instruction will be executed every scan if the input logic is on. If you do
not want the instruction to execute for more than one scan, a one-shot (PD) should be used
in the input logic.
9 Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
10 and load the value into the accumulator.
Helpful Hint: The table counter value should be set to indicate the starting point for the
11 operation. Also, it must be set to a value that is within the length of the table. For example, if
the table is 6 words long, then the allowable range of values that could be in the table counter
should be between 1 and 6. If the value is outside of this range or zero, the data will not be
12 moved into the table. Also, a one-shot (PD) should be used so the value will only be set in
one scan and will not affect the instruction operation.
13 Operand Data Type DL06 Range
14
V-memory
A
V
aaa
See memory map

A Discrete Bit Flags Description


SP56 On when the table pointer equal to the table size.
B
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed
C or the end of the scan. The pointer for this instruction can be set to start anywhere in the table. It is
not set automatically. You must load a value into the pointer somewhere in your program.

5-162 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400), which is the starting location for the destination table and table 1
counter, is loaded into the accumulator. The source location (V1500) is specified in the
Add to Top instruction. The table counter will be increased by 1 after the instruction is
executed.
2
3
DirectSOFT32 Display

DirectSOFT
X1 LD
K6

Load the constant value 6


(Hex.) into the lower 16 bits
of the accumulator 4
LDA
O 1400

Convert octal 1400 to HEX


300 and load the value into
5
the accumulator

ATT
V1500

Copy the specified value


6
7
from V1500 to the table

Handheld Programmer Keystrokes

$ B

8
ENT
STR 1

SHFT L D PREV G ENT


ANDST 3 6

L D A B E A A

9
SHFT ENT
ANDST 3 0 1 4 0 0

SHFT A T T B F A A ENT
0 MLR MLR 1 5 0 0

For the ATT instruction, the table counter Table Table Counter
10
determines the number of additions that can be 0 5 0 0 1 0 0 0 2 V1400
11
V1401
made before the instruction will stop executing. V1402 9 9 9 9 2
So, it is helpful to understand how the system V1403 3 0 7 4 3
Data Source
uses this counter to control the execution.
For example, if the table counter was set to 2, and
V1404
V1405
8
1
9
0
8
1
9
0
4
5
X X X X V1500
12
the table length was 6 words, then there could
13
V1406 2 0 4 6 6
only be 4 additions of data before the execution V1407 X X X X
was stopped. This can easily be calculated by:
Table length table counter = number of executions
DirectSOFT (optional
DirectSOFT32 one-shot
Display (optional
( e .g .: 6 - 2 = 4 )
method)
one-shot method)
14
Also, our example uses a normal input contact
A
X1 C0
(X1) to control the execution. Since the CPU PD

scan is extremely fast, and the table counter C0


LD

increments automatically, the data would be


moved into the table very quickly. If this is a
K6
Load the constant value 6
(HEX) into the lower 16 bits
B
problem for your application, you have an option of the accumulator

of using a one-shot (PD) to add one value each


time the input contact transitions from low to
LDA
O 1400
C
high. Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
starting table location.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-163


Chapter 5: Standard RLL Instructions - Table Instructions

The following diagram shows the scan-by-scan results of the execution for our example
program. The table counter is set to 2 initially, and it will automatically increment from 2
to 6 as the instruction is executed. Notice how SP56 comes on when the table counter is
1 6, which is equal to the table length. Plus, although our example does not show it, we are
assuming that there is another part of the program that changes the value in V1500 (data
2 source) prior to the execution of the ATT instruction.

Example of Execution
3 Scan N Before ATT Execution After ATT Execution
Table counter

4 V1401 0
Table
5 0 0 1
Table counter
0 0 0 2 V1400 V1401 1
Table
2 3 4 1 1
2
(Automatically Incremented)
0 0 0 3 V1400

V1402 9 9 9 9 2 V1402 0 5 0 0 2 3
4

5
Data Source Data Source
V1403 3 0 7 4 3 V1403 9 9 9 9 3
1 2 3 4 V1500 1 2 3 4 V1500
V1404 8 9 8 9 4 V1404 3 0 7 4 4

V1405 1 0 1 0 5 V1405 8 9 8 9 5

6
SP56 SP56
V1406 2 0 4 6 6 V1406 1 0 1 0 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. . Discard Bucket

7 Scan N+1 Before ATT Execution After ATT Execution


2046

Table counter

8 V1401
V1402
1
0
Table
2
5
3
0
4
0
1
2
Table counter
0 0 0 3 V1400 V1401
V1402
5
1
Table
6
2
7
3
8
4
1
2
5
6
7
(Automatically Incremented)
0 0 0 4 V1400

Data Source 8 Data Source

9 V1403 9 9 9 9 3 V1403 0 5 0 0 3
5 6 7 8 V1500 5 6 7 8 V1500
V1404 3 0 7 4 4 V1404 9 9 9 9 4
V1405 8 9 8 9 5 V1405 3 0 7 4 5
SP56 SP56

10 V1406 1 0 1 0 6 V1406 8 9 8 9 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
. .
. . 1010
Discard Bucket

11 Scan N+2 Before ATT Execution After ATT Execution Table counter

12 Table counter Table (Automatically Incremented)


Table
V1401 5 6 7 8 1 0 0 0 4 V1400 V1401 4 3 4 3 1 4 0 0 0 5 V1400
3
V1402 1 2 3 4 2 V1402 5 6 7 8 2 4
3 Data Source
Data Source

13
V1403 0 5 0 0 3 V1403 1 2 3 4 3
4 3 3 4 V1500 4 3 4 3 V1500
V1404 9 9 9 9 4 V1404 0 5 0 0 4
V1405 3 0 7 4 5 V1405 9 9 9 9 5

14
V1406 8 9 8 9 6 SP56 V1406 3 0 7 4 6 SP56
X X X X SP56 = OFF X X X X
SP56 = OFF
V1407 V1407
. .
. . 8989
Discard Bucket

A Scan N+3 Before ATT Execution After ATT Execution Table counter
Table counter Table (Automatically Incremented)

B
Table
V1401 4 3 4 3 1 0 0 0 5 V1400 V1401 7 7 7 7 1 7 0 0 0 6 V1400
7
V1402 5 6 7 8 2 V1402 4 3 4 3 2 7
Data Source 7
1 2 3 4 5 6 7 8 3 Data Source
V1403 3 V1403

C V1404
V1405
0
9
5
9
0
9
0
9
4
5
7 7 7 7 V1500
V1404
V1405
1
0
2
5
3
0
4
0
4
5
7 7 7 7 V1500

V1406 3 0 7 4 6 SP56 V1406 9 9 9 9 6 SP56

D V1407 X X
.
.
X X SP56 = OFF
V1407 X X
.
.
X X
Discard Bucket
SP56 = ON
until end of scan
or next instruction
that uses SP56
3074

5-164 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
Table Shift Left (TSHFL)
DS Used The Table Shift Left instruction shifts all the bits in a T S HF L
V-memory table to the left, the specified number of bit
HPP Used
positions.
A aaa
1
DS
Table Shift Right (TSHFR)
Used The Table Shift Right instruction shifts all the bits in a
TSHFR
A aaa
2
V-memory table to the right, a specified number of bit
HPP Used
positions. 3
The following description applies to both the Table Shift Left and Table Shift Right
instructions. A table is just a range of V-memory locations. The Table Shift Left and Table 4
Shift Right instructions shift bits serially throughout the entire table. Bits are shifted out the
end of one word and into the opposite end of an adjacent word. At the ends of the table,
bits are either discarded, or zeros are shifted into the table. The example tables below are
5
arbitrarily four words long.
Table Shift Left 6
Table Shift Right

V - xxxx
Shift in zeros Discard Bits
7
8
V - xxxx + 1
9
V - xxxx + 2
10
Discard Bits Shift in zeros
11
Step 1: Load the length of the table (number of V-memory locations) into the first level of
the accumulator stack. This parameter must be a HEX value, 0 to FF. 12
Step 2: Load the starting V-memory location for the table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert
an octal address to hex.
13
Step 3: Insert the Table Shift Left or Table shift Right instruction. This specifies the
number of bit positions you wish to shift the entire table. The number of bit 14
positions must be in octal.
Helpful hint: Remember that each V-memory location contains 16 bits. So, the bits of the A
first word of the table are numbered from 0 to 17 octal. If you want to shift the entire table
by 20 bits, that is 24 octal. SP 53 will be set if the number of bits to be shifted is larger than
the total bits contained within the table. Flag 67 will be set if the last bit shifted (just before it
B
is discarded) is a 1.
Operand Data Type DL06 Range
C

V-memory
A
V
aaa
See memory map
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-165


Chapter 5: Standard RLL Instructions - Table Instructions

Discrete Bit Flags Description


SP53 On when the number of bits to be shifted is larger than the total bits contained within the table
1 SP67 On when the last bit shifted (just before it is discarded) is a 1

2 NOTE: Status flags are only valid until the end of the scan or another instruction that uses the same
flag is executed.
3 The example table to the right contains V 3000 V 3000
BCD data as shown (for demonstration
4 purposes). Suppose we want to do a
table shift right by 3 BCD digits (12
1 2 3 4 6 7 8 1

bits). Converting to octal, 12 bits is


5 14 octal. Using the Table Shift Right
5 6 7 8 1 2 2 5

instruction and specifying a shift by octal


6 14, we have the resulting table shown
at the far right. Notice that the 234
1 1 2 2 3 4 4 1

3 3 4 4 5 6 6 3
7 sequence has been discarded, and the
000 sequence has been shifted in at
the bottom. 5 5 6 6 0 0 0 5
8
The following ladder example assumes the data at V3000 to V3004 already exists as shown
9 above. We will use input X0 to trigger the Table Shift Right operation. First, we will load the
table length (5 words) into the accumulator stack. Next, we load the starting address into the
10 accumulator. Since V3000 is an octal number, we have to convert it to hex by using the LDA
command. Finally, we use the Table Shift Right instruction and specify the number of bits to
be shifted (12 decimal), which is 14 octal.
11 DirectSOFT 32
DirectSOFT

12 X0 Load the constant value 5


LD (Hex.) into the lower 16 bits
K5 of the accumulator.

13 LDA
Convert octal 3000 to HEX
and load the value into the
0 3000 accumulator. This is the

14 TSHFR
table beginning.

Do a table shift right by 12


bits, which is 14 octal.

A 0 14

Handheld Programmer Keystrokes

B $
STR
A
0
ENT

C SHFT L D PREV F ENT


ANDST 3 5

SHFT L D A D A A A ENT

D
ANDST 3 0 3 0 0 0

SHFT T S H F R B E
SHFT NEXT ENT
MLR RST 7 5 ORN 1 4

5-166 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions
AND Move (ANDMOV)
The AND Move instruction copies data from a table to the ANDMO V
DS Used specified memory location, ANDing each word with the
HPP Used accumulator data as it is written.
A aaa
1
DS
OR Move (ORMOV)
Used The OR Move instruction copies data from a table to the ORMOV
2
specified memory location, ORing each word with the
HPP Used
accumulator contents as it is written
A aaa
3
Exclusive OR Move (XORMOV)
The Exclusive OR Move instruction copies data from a table
4
DS Used XO R MO V
to the specified memory location, XORing each word with the
HPP Used
accumulator value as it is written.
A aaa
5
The following description applies to the AND Move, OR Move, and Exclusive OR Move
instructions. A table is just a range of V-memory locations. These instructions copy the data 6
of a table to another specified location, preforming a logical operation on each word with the
accumulator contents as the new table is written.
Step 1: Load the length of the table (number of V-memory locations) into the first
7

level of the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator. This
8
parameter must be a HEX value. You can use the LDA instruction to convert
an octal address to hex. 9
Step 3: Load the BCD/hex bit pattern into the accumulator which will be logically
combined with the table contents as they are copied. 10
Step 4: Insert the AND Move, OR Move, or XOR Move instruction. This specifies
the starting location of the copy of the original table. This new table will 11
automatically be the same length as the original table.
Operand Data Type DL06 Range 12
A aaa
V-memory V See memory map 13
The example table to the right contains BCD V 3000 V 3100 14
data as shown (for demonstration purposes). 3 3 3 3 ANDMOV 2 2 2 2
Suppose we want to move a table of two
words at V3000 and AND it with K6666.
K 6666
A
The copy of the table at V3100 shows the F F F F 6 6 6 6
result of the AND operation for each word. B
The program on the next page performs the ANDMOV operation example above. It assumes
that the data in the table at V3000 V3001 already exists. First we load the table length (two C
words) into the accumulator. Next we load the starting address of the source table, using the
LDA instruction. Then we load the data into the accumulator to be ANDed with the table.
In the ANDMOV command, we specify the table destination, V3100.
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-167


Chapter 5: Standard RLL Instructions - Table Instructions

DirectSOFT
DirectSOFT 5
X0 LD

1 Handheld Programmer Keystrokes


$ A ENT
K2

Load the constant value 2


STR 0 (Hex.) into the lower 16

2
bits of the accumulator.
SHFT L D PREV C ENT
ANDST 3 2 LDA
L D A D A A A
SHFT
ANDST 3 0 3 0 0 0
ENT 0 3000

3 SHFT L
ANDST
D
3
PREV G
6
G
6
G
6
G
6
ENT
Convert otal 3000 to HEX
and load the value into the
accumulator. This is the
V SHFT M O V D B A A ENT table beginning.

4
AND ORST INST# AND 3 1 0 0
LD
K6666

5 The example to the right shows a table of two words at V3000 and
Load the constant value
6666 (Hex.) into the lower
16 bits of the accumulator.
logically ORs it with K8888. The copy of the table at V3100 shows ANDMOV

6 the result of the OR operation for each word.


The program to the right performs the ORMOV example above.
0 3100

Copy the table to V3100,


ANDing its contents with the

7 It assumes that the data in the table at V3000 V3001 already


exists. First we load the table length (two words) into the V 3000
accumulator as it is written.

V 3100
accumulator. Next we load the starting address of the source 1 1 1 1 OR MOV
8
9 9 9 9
K 8888
table, using the LDA instruction. Then we load the data
into the accumulator to be ORed with the table. In the 1 1 1 1 9 9 9 9

9 ORMOV command, we specify the table destination, V3100. DirectSOFT


DirectSOFT 32

X0 LD

10
Handheld Programmer Keystrokes K2
$ A ENT
STR 0 Load the constant value 2
(Hex) into the lower 16 bits
L D C
SHFT PREV ENT of the accumulator.

11
ANDST 3 2

SHFT L D A D A A A ENT LDA


ANDST 3 0 3 0 0 0
0 3000
L D I I I I

12
SHFT PREV ENT
ANDST 3 8 8 8 8
Convert octal 3000 to HEX
Q SHFT M O V D B A A ENT
and load the value into the
OR ORST INST# AND 3 1 0 0 accumulator. This is the
table beginning.

13 LD
K8888
The example to the right shows a table of two words at V3000
14 and logically XORs it with K3333. The copy of the table at
Load the constant value
8888 (Hex.) into the lower
16 bits of the accumulator.
V3100 shows the result of the XOR operation for each word.
A The ladder program example for the XORMOV is similar to the
ORMOV
0 3100
one above for the ORMOV. Just use the XORMOV instruction.
B
Copy the table to V3100,
On the handheld programmer, you must use the SHFT key and ORing its contents with the
accumulator as it is written.
spell XORMOV explicitly.

C
V 3000 V 3100
1 1 1 1 X OR MOV 2 2 2 2
K 3333

D 1 1 1 1 2 2 2 2

5-168 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Table Instructions

Find Block (FINDB)


The Find Block instruction searches for an occurrence
DS
HPP
Used
N/A
of a specified block of values in a V-memory table. The
function parameters are loaded into the first and second FINDB 1
levels of the accumulator stack and the accumulator by A aaa
three additional instructions. If the block is found, its
starting address will be stored in the accumulator. If the
2
block is not found, flag SP53 will be set.
3

Operand Data Type
A
DL06 Range
aaa
4
V-memory V See memory map
V-memory P See memory map 5
Discrete Bit Flags
SP56
Description
On when the specified block is not found.
6
The steps listed below are the steps necessary to program the Find Block function.
7
Step 1: Load the number of bytes in the block to be located. This parameter must be
a HEX value, 0 to FF.
8
Step 2: Load the length of a table (number of words) to be searched. The Find Block
will search multiple tables that are adjacent in V-memory. This parameter 9
must be a HEX value, 0 to FF.
Step 3: Load the ending location for all the tables into the accumulator. This 10
parameter must be a HEX value. You can use the LDA instruction to convert
an octal address to hex. 11
Step 4: Load the table starting location for all the tables into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert
an octal address to hex.
12
Step 5: Insert the Find Block instruction. This specifies the starting location of the
block of data you are trying to locate.
13
Start Addr. 14
Number
Table 1
Table 2
of words A
Start Addr.
Table 3
Block
Number B
of bytes
C
Table n D
End Addr.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-169


Chapter 5: Standard RLL Instructions - Table Instructions

Swap (SWAP) S WAP


The Swap instruction exchanges the
1 DS
HPP
Used
Used
data in two tables of equal length.
A aaa

Step 1: Load the length of the tables (number of V-memory locations) into the first level of
2 the accumulator stack. This parameter must be a HEX value, 0 to FF. Remember that
the tables must be of equal length.
3 Step 2: Load the starting V-memory location for the first table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert an octal
4 address to hex.
Step 3: Insert the Swap instruction. This specifies the starting address of the second table.
This parameter must be a HEX value. You can use the LDA instruction to convert an
5 octal address to hex.
Helpful hint: The data swap occurs within a single scan. If the instruction executes on
6 multiple consecutive scans, it will be difficult to know the actual contents of either table at
any particular time. So, remember to swap just on a single scan.
7 Operand Data Type DL06 Range
aaa
8 V-memory V See memory map

The example to the right shows a table of two V 3000 V 3100


9 words at V3000. We will swap its contents with 1 2 3 4 S WAP A B C D
another table of two words at 3100 by using the
10 Swap instruction. The required ladder program
given below.
5 6 7 8 0 0 0 0 is

11 The example program below uses a PD contact (triggers for one scan for off-to-on transition).
12 First, we load the length of the tables (two words) into the accumulator. Then we load the
address of the first table (V3000) into the accumulator using the LDA instruction, converting
the octal address to hex. Note that it does not matter which table we declare first, because
13 the swap results will be the same. DirectSOFT
DirectSOFT 32
X0 Load the constant value 2

14 LD
K2
(Hex.) into the lower 16 bits
of the accumulator.

A
Convert octal 3000 to HEX
LDA and load the value into the
0 3000 accumulator. This is the
table beginning.

B $
Handheld Programmer Keystrokes

P D A
SWAP
0 3100
Swap the contents of the
table in the previous
instruction with the one
SHFT ENT
STR CV 3 0 at V3100.

C SHFT

SHFT
L
ANDST

L
D

D
3

A
PREV C

D
2
ENT

A A A ENT
ANDST 3 0 3 0 0 0

D SHFT S
RST
SHFT
W
ANDN
A
0
P
CV
D
3
B
1
A
0
A
0
ENT

5-170 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Clock/Calendar Instructions

Clock/Calendar Instructions
Date (DATE)
The Date instruction can be used to set the date in the CPU. The
1
DS
HPP
Used
Used
instruction requires two consecutive V-memory locations (Vaaa)
to set the date. If the values in the specified locations are not
DAT E
V aaa 2
valid, the date will not be set. The current date can be read from
4 consecutive V-memory locations (V7771V7774). 3
In the following example, when C0 is on, the constant value (K94010301) is loaded into the
accumulator using the Load Double instruction (C0 should be a contact from a one-shot
(PD) instruction). The value in the accumulator is output to V2000 using the Out Double
4
instruction. The Date instruction uses the value in V2000 to set the date in the CPU.
5
V-memory Location (BCD)
Date Range (READ Only) 6
Year 0-99 V7774
Month 1-12 V7773 7
Day 1-31 V7772
Day of Week 0-06
The values entered for the day of week are:
V7771
8
0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday

Operand Data Type DL06 Range


9
V-memory V
aaa
See memory map
10
DirectSOFT
DirectSOFT 32

C0 LDD
9 4 0
Constant (K)
1 0 3 0 1
In this example, the Date
11
K94010301 instruction uses the value set in
Load the constant
value (K94010301)
into the accumulator
Acc. 9 4 0 1 0 3 0 1 V2000 and V2001 to set the date
in the appropriate V memory
12
locations (V7771-V7774).
OUTD

V2000
Acc. 9 4 0 1 0 3 0 1
13
14
Copy the value in 9 4 0 1 0 3 0 1
the accumulator to
V2000 and V2001 V2001 V2000
Format
DATE

Set the date in the CPU


V2000
9
V2001
4 0 1 0
V2000
3 0 1
A
using the value in V2000

$
and 2001
Handheld Programmer Keystrokes

NEXT NEXT NEXT NEXT A ENT


Year Month Day Day of Week
B
STR 0

SHFT

A
L
ANDST
D
D

A
3
D

B
3
PREV
9
E
4
A
0
B
1
ENT
C
ENT
0 3 0 1
GX
OUT
SHFT D
3
C
2
A
0
A
0
A
0
ENT D
SHFT D A T E C A A A ENT
3 0 MLR 4 2 0 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-171


Chapter 5: Standard RLL Instructions - Clock/Calendar Instructions

Time (TIME)
The Time instruction can be used to set the time (24 hour clock)
1 DS
HPP
Used
Used
in the CPU. The instruction requires two consecutive V-memory
locations (Vaaa) which are used to set the time. If the values in the
T IME
V aaa
specified locations are not valid, the time will not be set. The current
2 time can be read from memory locations V7747 and V7766V7770.

3 Date Range VMemory Location (BCD)


(READ Only)
1/100 seconds (10ms) 0-99 V7747
4 Seconds 0-59 V7766
Minutes 0-59 V7767
5 Hour 0-23 V7770

6 Operand Data Type DL06 Range


aaa
7 V-memory V See memory map

8 In the following example, when C0 is on, the constant value (K73000) is loaded into the
accumulator using the Load Double instruction (C0 should be a contact from a one-shot
(PD) instruction). The value in the accumulator is output to V2000 using the Out Double
9 instruction. The Time instruction uses the value in V2000 to set the time in the CPU.

10 DirectSOFT
DirectSOFT 32 Constant (K)
0 0 0 7 3 0 0 0 The TIME instruction uses the
11
C0 LDD
value set in V2000 and V2001 to
K73000
set the time in the appropriate
Acc. 0 0 0 7 3 0 0 0
V-memory locations (V7766-V7770)

12 OUTD Acc.
0 0 0 7 3 0 0 0

13 V2000

0 0 0 7 3 0 0 0

Format
14
V2001 V2000

V2001 V2000
TIME
0 0 0 7 3 0 0 0
A V2000

Not Hour Minutes Seconds


B Handheld Programmer Keystrokes
$
STR
NEXT NEXT NEXT NEXT A
0
ENT
Used

C SHFT L D D PREV H D A A A ENT


ANDST 3 3 7 3 0 0 0
A D A B ENT
0 3 0 1

D GX
OUT

SHFT
SHFT

T
D

SHFT
3
I
C

M
2
A

E
0
A
0
A

C
0
A
ENT

A A ENT
MLR 8 ORST 4 2 0 0 0

5-172 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - CPU Control Instructions

CPU Control Instructions


No Operation (NOP) 1
DS Used
The No Operation is an empty (not programmed) memory location. NOP
HPP Used 2
DirectSOFT
3
Direct SOFT32 Handheld Programmer Keystrokes

SHFT N O P ENT
NOP TMR INST# CV

4
End (END)
The End instruction marks the termination point of the normal
5
DS
HPP
Used
Used
program scan. An End instruction is required at the end of the main
program body. If the End instruction is omitted, an error will occur
END
6
and the CPU will not enter the Run Mode. Data labels, subroutines and interrupt routines
are placed after the End instruction. The End instruction is not conditional; therefore, no
input contact is allowed.
7
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes
8
9
SHFT E N D ENT
4 TMR 3
END

Stop (STOP)
10
DS
HPP
Used
Used
The Stop instruction changes the operational mode of the CPU
from Run to Program (Stop) mode. This instruction is typically
STOP
11
used to stop PLC operation in an error condition.
In the following example, when C0 turns on, the CPU will stop operation and switch to the
12
program mode.
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes
13
C0 $
STR
SHFT C
2
A
0
ENT 14
STOP S T O P
SHFT
RST
SHFT
MLR INST# CV
ENT
A
Discrete Bit Flags Description
B
SP16
SP53
On when the DL06 goes into the TERM_PRG mode.
On when the DL06 goes into the PRG mode. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-173


Chapter 5: Standard RLL Instructions - CPU Control Instructions

Reset Watch Dog Timer (RSTWT)


The Reset Watch Dog Timer instruction resets the CPU scan
1 DS
HPP
Used
Used
timer. The default setting for the watch dog timer is 200ms.
Scan times very seldom exceed 200ms, but it is possible.
RSTWT

2 For/next loops, subroutines, interrupt routines, and table


instructions can be programmed such that the scan becomes
longer than 200ms. When instructions are used in a manner
3 that could exceed the watch dog timer setting, this instruction
can be used to reset the timer.
4
A software timeout error (E003) will occur and the CPU will enter the program mode if the
5 scan time exceeds the watch dog timer setting. Placement of the RSTWT instruction in the
program is very important. The instruction has to be executed before the scan time exceeds
the watch dog timers setting.
6 If the scan time is consistently longer than the watch dog timers setting, the timeout value
may be permanently increased from the default value of 200ms by AUX 55 on the HPP or
7 the appropriate auxiliary function in your programming package. This eliminates the need for
the RSTWT instruction.
8 In the following example, the CPU scan timer will be reset to 0 when the RSTWT
instruction is executed. See the For/Next instruction for a detailed example.
9 DirectSOFT
Direct SOFT 32 Handheld Programmer Keystrokes

SHFT R S T W T ENT

10 RSTWT
ORN RST MLR ANDN MLR

11
12
13
14
A
B
C
D

5-174 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Program Control Instructions

Program Control Instructions


Goto Label (GOTO) (LBL) K aaa 1
DS Used The Goto / Label skips all instructions between the Goto and GOTO
HPP Used the corresponding LBL instruction. The operand value for the
Goto and the corresponding LBL instruction are the same. The
2
logic between Goto and LBL instruction is not executed when
the Goto instruction is enabled. Up to 256 Goto instructions
LBL K aaa
3
and 256 LBL instructions can be used in the program.
4
Operand Data Type DL06 Range
aaa
5
Constant K 1-FFFF
6
In the following example, when C7 is on, all the program logic between the GOTO and
the corresponding LBL instruction (designated with the same constant Kaaa value) will be 7
skipped. The instructions being skipped will not be executed by the CPU.

DirectSOFT
8
DirectS OF T32 Handheld Programmer Keys trokes

C7 K5
$
S TR
S HF T C
2
H
7
E NT 9
10
GOTO G O T O F
S HF T E NT
6 INS T# MLR INS T# 5

$ B E NT
S TR 1
X1 C2

OUT
GX
OUT
S HF T
C
2
C
2
E NT 11
12
L B L F

LBL K5 $
S HF T
ANDS T

F
1 ANDS T

E NT
5
E NT
13
S TR 5
GX
OUT
C
2
E NT 14
X5 Y2

OUT
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-175


Chapter 5: Standard RLL Instructions - Program Control Instructions

For / Next (FOR) (NEXT)


The For and Next instructions are used to execute a section of A aaa

1 DS
HPP
Used
Used
ladder logic between the For and Next instruction a specified
numbers of times. When the For instruction is enabled, the
FOR

program will loop the specified number of times. If the For


2 instruction is not energized, the section of ladder logic between
the For and Next instructions is not executed.
3 For / Next instructions cannot be nested. The normal I/O
update and CPU housekeeping are suspended while executing
4 the For / Next loop. The program scan can increase significantly,
depending on the amount of times the logic between the For and
NEXT
Next instruction is executed. With the exception of immediate
5 I/O instructions, I/O will not be updated until the program
execution is completed for that scan. Depending on the length
6 of time required to complete the program execution, it may be
necessary to reset the watch dog timer inside of the For / Next
loop using the RSTWT instruction.
7
8
9 Operand Data Type DL06 Range
aaa
10 V-memory V See memory map
Constant K 1-9999
11
12
13
14
A
B
C
D

5-176 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Program Control Instructions

In the following example, when X1 is on, the application program inside the For / Next loop
will be executed three times. If X1 is off, the program inside the loop will not be executed.
The immediate instructions may or may not be necessary, depending on your application. 1
Also, The RSTWT instruction is not necessary if the For / Next loop does not extend the
scan time beyond the Watch Dog Timer setting. For more information on the Watch Dog
Timer, refer to the RSTWT instruction.
2
DirectSOFT
Direct SOFT32
X1 K3
1 2 3
3
FOR
4
RSTWT 5
X20 Y5
OUT
6
7
NEXT
8
Handheld Programmer Keystrokes 9
$
STR
F
B

O
1
ENT

R D
10
SHFT ENT
5 INST# ORN 3

SHFT R
ORN
S
RST
T
MLR
W
ANDN
T
MLR
ENT 11
12
$ SHFT I C A ENT
STR 8 2 0
GX F ENT
OUT 5

SHFT N
TMR
E
4
X
SET
T
MLR
ENT 13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-177


Chapter 5: Standard RLL Instructions - Program Control Instructions

Goto Subroutine (GTS) (SBR)


The Goto Subroutine instruction allows a section of ladder logic
1 DS
HPP
Used
Used
to be placed outside the main body of the program, to execute
only when needed. There can be a maximum of 256 GTS
K aaa
GTS
instructions and 256 SBR instructions used in a program. The
2 GTS instructions can be nested up to 8 levels. An error E412
will occur if the maximum limits are exceeded. Typically this will
3 be used in an application where a block of program logic may be
slow to execute and is not required to execute every scan. The SBR K aaa
subroutine label and all associated logic is placed after the End
4 statement in the program. When the subroutine is called from
the main program, the CPU will execute the subroutine (SBR)
5 with the same constant number (K) as the GTS instruction
which called the subroutine.

6
By placing code in a subroutine it is only scanned and executed when needed, since it resides
7 after the End instruction. Code which is not scanned does not impact the overall scan time of
the program.
8 Subroutine Return (RT)
Operand Data Type DL06 Range
9 aaa
Constant K 1-FFFF
10
When a Subroutine Return is executed in the subroutine
11 DS
HPP
Used
Used the CPU will return to the point in the main body of the
RT
program from which it was called. The Subroutine Return
12 is used as termination of the subroutine. It must be the
last instruction in the subroutine and is a stand alone
instruction (no input contact on the rung).
13 Subroutine Return Conditional (RTC)
14 DS
HPP
Used
Used
The Subroutine Return Conditional instruction is
an optional instruction used with an input contact to
implement a conditional return from the subroutine. The RTC
A Subroutine Return (RT) is still required for termination of
the Subroutine.
B
C
D

5-178 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Program Control Instructions

In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
to the Subroutine Label K3 and the ladder logic in the subroutine will be executed. If X35 is
on, the CPU will return to the main program at the RTC instruction. If X35 is not on, Y0
Y17 will be reset to off and the CPU will return to the main body of the program.
1
DirectSOFT
Direct SOFT32 Display X1 K3
GTS
2
C0
LD
K10
3
END
4
SBR K3
5
X20 Y5
OUTI 6
X21 Y10
OUTI 7
X35
RT C
8
X35 Y0 Y17
RSTI
9
10
RT

Handheld Programmer Keystrokes

$
STR
B
1
ENT 11
SHFT G T S D ENT

12
6 MLR RST 3

E N D

13
SHFT ENT
4 TMR 3

SHFT S SHFT B R D ENT


RST 1 ORN 3
$

GX
STR
SHFT

SHFT
I

I
8
C

F
2
A

ENT
0
ENT
14
OUT 8 5
$
STR
SHFT I
8
C
2
B
1
ENT A
GX SHFT I B A ENT

$
OUT

STR
SHFT I
8

8
D
1

3
F
0

5
ENT
B
C
SHFT R T C ENT
ORN MLR 2
SP SHFT I D F ENT
STRN 8 3 5
S
RST
SHFT

R
I

T
8
A
0
B
1
H
7
ENT
D
SHFT ENT
ORN MLR

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-179


Chapter 5: Standard RLL Instructions - Program Control Instructions

In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
to the Subroutine Label K3 and the ladder logic in the subroutine will be executed. The CPU
1 will return to the main body of the program after the RT instruction is executed.
DirectSOFT
Direct SOFT32

2 X1 K3

3
GTS

4
5
END

6 SBR K3

7
X20 Y5

8 OUT

9 X21 Y10

OUT

10
11
RT

12
Handheld Programmer Keystrokes

$ B ENT
STR 1

13 SHFT G
6
T
MLR
S
RST
D
3
ENT

14 E N D
SHFT ENT
4 TMR 3

A SHFT S
RST
SHFT B
1
R
ORN
D
3
ENT

B
$ SHFT I C A ENT
STR 8 2 0
GX F ENT
OUT 5

C $
STR
SHFT I
8
C
2
B
1
ENT

GX B A

D
ENT
OUT 1 0

SHFT R T ENT
ORN MLR

5-180 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Program Control Instructions

Master Line Set (MLS)


The Master Line Set instruction allows the program to control
DS
HPP
Used
Used
sections of ladder logic by forming a new power rail controlled
K aaa
MLS
1
by the main left power rail. The main left rail is always master
line 0. When an MLS K1 instruction is used, a new power rail is created at level
1. Master Line Sets and Master Line Resets can be used to nest power rails up to seven levels
2
deep.
Operand Data Type DL06 Range
3
Constant K
aaa
1-FFFF
4
5
Master Line Reset (MLR) K aaa
DS Used The Master Line Reset instruction marks the end of control MLR 6
HPP Used for the corresponding MLS instruction. The MLR reference is
one less than the corresponding MLS.
7
Operand Data Type DL06 Range

Constant K
aaa
1-FFFF
8
Understanding Master Control Relays 9
The Master Line Set (MLS) and Master Line Reset (MLR) instructions allow you to quickly
enable (or disable) sections of the RLL program. This provides program control flexibility. 10
The following example shows how the MLS and MLR instructions operate by creating a sub
power rail for control logic.
DirectSOFT
11
Direct SOFT32
X0 K1
MLS
When contact X0 is ON, logic under the first MLS
will be executed. 12
X1 Y7
OUT 13
X2 K2
MLS
When contact X0 and X2 are ON, logic under the
second MLS will be executed.
14
X3 Y10
OUT
A
K1
MLR
B
The MLR instructions note the end of the Master
K0
MLR
Control area.
C
X10 Y11
OUT D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-181


Chapter 5: Standard RLL Instructions - Program Control Instructions

MLS/MLR Example
In the following MLS/MLR example logic between the first MLS K1 (A) and MLR K0 (B)
1 will function only if input X0 is on. The logic between the MLS K2 (C) and MLR K1 (D)
will function only if input X10 and X0 is on. The last rung is not controlled by either of the
2 MLS coils.
DirectSOFT
DirectSOFT32 Handheld Programmer Keystrokes

3 X0 K1
A $
STR
A
0
ENT
MLS

4 X1 C0
Y
MLS
B
1
ENT

OUT $ B ENT

5 X2 C1 GX
OUT
STR 1

SHFT C
2
A
0
ENT

6 X3
OUT

Y0
$
STR
C
2
ENT

GX SHFT C B ENT
7 OUT
$
OUT
D ENT
2 1

X10 K2 STR 3

8 MLS
C
GX
OUT
A
0
ENT

X5 $ B A

9
Y1 ENT
STR 1 0
OUT Y C ENT
MLS 2

10 X4 Y2

OUT
$
STR
F
5
ENT

GX B

11
ENT
OUT 1
K1
D $ E
MLR ENT
STR 4

12 X5 C2
GX
OUT
C
2
ENT

OUT T B

13 X6 Y3 $
MLR
F
1
ENT

ENT
STR 5

14
OUT
GX SHFT C C ENT
OUT 2 2
K0
B
$ G
A MLR

GX
STR
D
6
ENT

ENT
X7 Y4 OUT 3

B OUT T
MLR
A
0
ENT

C
$ H ENT
STR 7
GX E C ENT
OUT 4 2

5-182 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Interrupt Instructions

Interrupt Instructions
DS
Interrupt (INT)
Used The Interrupt instruction allows a section of ladder logic to be
1
INT O aaa
placed below the main body of the program and executed only
HPP Used
when needed. High-Speed I/O Modes 10, 20, and 40 can generate 2
an interrupt. With Mode 40, you may select an external interrupt
(input X0), or a time-based interrupt (3999 ms). 3
Typically, interrupts are used in an application when a fast response to an input is needed or
a program section must execute faster than the normal CPU scan. The interrupt label and all
associated logic must be placed after the End statement in the program. When an interrupt
4
occurs, the CPU will complete execution of the current instruction it is processing in ladder
logic, then execute the interrupt routine. After interrupt routine execution, the ladder 5
program resumes from the point at which it was interrupted.
See Chapter 3, the section on Mode 40 (Interrupt) Operation for more details on interrupt 6
configuration. In the DL06, only one software interrupt is available. The software interrupt
uses interrupt #00 (INT 0), which means the hardware interrupt #0 and the software
interrupt cannot be used together. Hardware interrupts are labeled in octal to correspond
7
with the hardware input signal (e.g. X1 will initiate INT 1).
8
Operand Data Type DL06 Range
aaa
9
Constant O 1-FFFF
10
Interrupt Return (IRT)
DS Used An Interrupt Return is normally executed as the last instruction
IRT
11
HPP Used in the interrupt routine. It returns the CPU to the point in the
main program from which it was called. The Interrupt Return is
a stand-alone instruction (no input contact on the rung).
12
Interrupt Return Conditional (IRTC) 13
DS Used The Interrupt Return Conditional instruction is a optional
HPP Used instruction used with an input contact to implement a
conditional return from the interrupt routine. The Interrupt
IRTC
14
Return is required to terminate the interrupt routine.
A
Enable Interrupts (ENI)
DS
HPP
Used
Used
The Enable Interrupt instruction is placed in the main ladder
program (before the End instruction), enabling the interrupt. ENI B
The interrupt remains enabled until the program executes a
Disable Interrupt instruction. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-183


Chapter 5: Standard RLL Instructions - Interrupt Instructions

Disable Interrupts (DISI)


DS Used A Disable Interrupt instruction in the main body of the application
DISI
1 HPP Used
program (before the End instruction) will disable the interrupt (either
external or timed). The interrupt remains disabled until the program
executes an Enable Interrupt instruction.
2
External Interrupt Program Example
3 In the following example, we do some initialization on the first scan, using the first-scan
contact SP0. The interrupt feature is the HSIO Mode 40. Then, we configure X0 as the
external interrupt by writing to its configuration register, V7634. See Appendix E, Mode 40
4 Operation for more details.
During program execution, when X2 is on, the interrupt is enabled. When X2 is off, the
5 interrupt will be disabled. When an interrupt signal (X0) occurs, the CPU will jump to
the interrupt label INT O 0. The application ladder logic in the interrupt routine will be
6 performed. The CPU will return to the main body of the program after the IRT instruction
is executed.

7
8
DirectSOFT
Handheld Programmer Keystrokes
SP0 LD Load the constant value
(K40) into the lower 16 bits $ SHFT SP A ENT
K40
of the accumulator STR STRN 0

9 OUT
V7633
Copy the value in the lower
16 bits of the accumulator to
V7633
SHFT

GX
L
ANDST
D

SHFT
3
V
SHFT

H
K

G
JMP
E

D
4
A

D
0
ENT

ENT
OUT AND 7 6 3 3

10
LD Load the constant value (K4)
K4 into the lower 16 bits of the L D K E
SHFT SHFT ENT
accumulator ANDST 3 JMP 4

Copy the value in the lower GX SHFT V H G D E ENT


OUT OUT AND 7 6 3 4
16 bits of the accumulator to

11
V7634
V7634 $ C ENT
STR 2
X2
ENI SHFT E N I ENT
4 TMR 8

12 X2
DISI
SP
STRN
C
2
ENT

SHFT D I S I ENT

13
3 8 RST 8

E N D

14
SHFT ENT
END 4 TMR 3

SHFT I N T A ENT
8 TMR MLR 0
INT O0
$ I B

A
SHFT ENT
STR 8 1
X1 Y5
X SHFT I F ENT
SETI SET 8 5

B
$ SHFT I D ENT
X3 Y7 STR 8 3
SETI
X SHFT I H ENT
SET 8 7

C IRT SHFT I R T ENT


8 ORN MLR

5-184 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Interrupt Instructions

Timed Interrupt Program Example


In the following example, we do some initialization on the first scan, using the first-scan
contact SP0. The interrupt feature is the HSIO Mode 40. Then we configure the HSIO 1
timer as a 10 mS interrupt by writing K104 to the configuration register for X0 (V7634). See
Appendix E, Mode 40 Operation for more details. 2
When X4 turns on, the interrupt will be enabled. When X4 turns off, the interrupt will be
disabled. Every 10 mS the CPU will jump to the interrupt label INT O 0. The application
ladder logic in the interrupt routine will be performed. If X3 is not on, Y0Y7 will be reset to
3
off and then the CPU will return to the main body of the program.
DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes
4
SP0

5
LD Load the constant value $ B
(K40) into the lower 16 bits ENT
K40 STR 1
of the accumulator
SHFT L D SHFT K E A ENT
ANDST 3 JMP 4 0

OUT Copy the value in the lower GX V H G D D

6
16 bits of the accumulator to SHFT ENT
OUT AND 7 6 3 3
V7633 V7633
SHFT L D SHFT K B A E ENT
ANDST 3 JMP 1 0 4

LD Load the constant value GX V H G D E


SHFT ENT
(K10) into the lower 16 bits OUT AND 7 6 3 4

7
K104 of the accumulator
$ E ENT
STR 4

OUT Copy the value in the lower SHFT E N I ENT


16 bits of the accumulator to 4 TMR 8
V7634

8
V7634
SP E ENT
STRN 4
X4
SHFT D I S I ENT
ENI 3 8 RST 8

X4
DISI
SHFT E
4
N
TMR
D
3
ENT
9
10
SHFT I N T A ENT
8 TMR MLR 0
END
$ SHFT I C ENT
STR 8 2
INT O0
X I F

11
SHFT ENT
SET 8 5
SP SHFT I D ENT
X2 Y5 STRN 8 3
SETI X SHFT I A H ENT

12
SET 8 0 7

SHFT I R T ENT
X3 Y0 Y7 8 ORN MLR
RSTI

IRT 13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-185


Chapter 5: Standard RLL Instructions - Message Instructions

Message Instructions
Fault (FAULT)
1 DS Used
The Fault instruction is used to display a message on the handheld FAULT
programmer, the optional LCD display or in the DirectSOFT
2 HPP Used
status bar. The message has a maximum of 23 characters and can
be either V-memory data, numerical constant data or ASCII text.
A aaa

3 To display the value in a V-memory location, specify the V-memory location in the
instruction. To display the data in ACON (ASCII constant) or NCON (Numerical constant)
4 instructions, specify the constant (K) value for the corresponding data label area.
See Appendix G for the ASCII conversion table.

5 Operand Data Type DL06 Range


aaa
6 V-memory V See memory map
Constant K 1-FFFF
7 Discrete Bit Flags Description
SP50 On when the FAULT instruction is executed
8
Fault Example
9 In the following example when X1 is on, the message SW 146 will display on the handheld
programmer. The NCONs use the HEX ASCII equivalent of the text to be displayed. (The
10 HEX ASCII for a blank is 20, a 1 is 31, 4 is 34 ...)

11 FAULT :
*SW 146

12
Direct SOFT32

13
Handheld Programmer Keystrokes
DirectSOFT

X1 FAULT $ B ENT
K1 STR 1

14 SHFT F
5
A
0
U
ISG
L
ANDST
T
MLR
B
1
ENT

END

A DLBL
K1 SHFT E
4
N
TMR
D
3
ENT

B SHFT D L B L B ENT
ACON
3 ANDST 1 ANDST 1
A SW
SHFT A C O N S W ENT
0 2 INST# TMR RST ANDN

C NCON
K 2031
SHFT

SHFT
N

N
TMR
C

C
2
O
INST#
O
N

N
TMR
C

D
2
A

E
0
D

D
3
B

G
1
ENT

ENT
TMR 2 INST# TMR 3 4 3 6

D NCON
K 3436

5-186 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Message Instructions

Data Label (DLBL)


DS Used The Data Label instruction marks the beginning of
HPP Used an ASCII/numeric data area. DLBLs are programmed
after the End statement. A maximum of 64 DLBL
DLBL
K aaa
1
instructions can be used in a program. Multiple
ACONs can be used in a DLBL area.
NCONs and
2
Operand Data Type DL06 Range
3
aaa
Constant K 1-FFFF 4
ASCII Constant (ACON)
The ASCII Constant instruction is used
5
DS Used
HPP Used with the DLBL instruction to store ASCII
text for use with other instructions. Two
ACON
A aaa 6
ASCII characters can be stored in an ACON
instruction. If only one character is stored in a
ACON a leading space will be inserted.
7
8
Operand Data Type DL06 Range
aaa 9
ASCII A 0-9 A-Z

Numerical Constant (NCON)


10
DS
HPP
Used
Used
The Numerical Constant instruction is used with the
DLBL instruction to store the HEX ASCII equivalent
NCON
K aaa
11
of numerical data for use with other instructions. Two
digits can be stored in an NCON instruction. 12
13
14
Operand Data Type DL06 Range
aaa
A
Constant K 1-FFFF
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-187


Chapter 5: Standard RLL Instructions - Message Instructions

Data Label Example


In the following example, an ACON and two NCON instructions are used within a DLBL
1 instruction to build a text message. See the FAULT instruction for information on displaying
messages. The DV-1000 Manual also has information on displaying messages.
2
DirectSOFT
Direct SOFT32

3
4 END

5 DLBL

6 K1

ACON

7 A SW

8
NCON

9 K 2031

10
11
NCON
K 3436

12 Handheld Programmer Keystrokes

13 SHFT E
4
N
TMR
D
3
ENT

14 SHFT D
3
L
ANDST
B
1
L
ANDST
B
1
ENT

SHFT A C O N S W ENT

A SHFT N
TMR
0
C
2

2
INST#
O
INST#
N
TMR

TMR
C
RST

2
ANDN
A
0
D
3
B
1
ENT

B SHFT N
TMR
C
2
O
INST#
N
TMR
D
3
E
4
D
3
G
6
ENT

C
D

5-188 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Message Instructions

Move Block Instruction (MOVBLK)


DS Used The Move Block instruction copies a specified number of words from MOVBLK
HPP Used a Data Label Area of program memory (ACON, NCON) to the
specified V-memory location. Below are the steps for using the Move
V aaa
1
Block function:
Step 1: Load the number of words (octal) to be copied into the 1st level of the accumulator stack. 2
Step 2: Load the source data label (LDLBL Kaaa) into the accumulator. This is where the data will
be copied from. 3
Step 3: Insert the MOVBLK instruction that specifies the V-memory destination. This is where the
data will be copied to.
4
Copy Data From a Data Label Area to V-memory
In the example below, data is copied from a Data Label Area to V-memory. When X1 is 5
on, the octal value (O4) is copied to the first level of the accumulator stack using the Load
Address (LDA) instruction. This value specifies the number of words to be copied. Load
Label (LDLBL) instruction will load the source data address (K1) into the accumulator. This
6
is where the data will be copied from. The MOVBLK instruction specifies the destination
starting location and executes the copying of data from the Data Label Area to V-memory. 7
DirectSOFT
X1 LDA
Data label area
to be copied
.
.
8
O4

Load the value 4 into the DLBL K1


X X X X V1777
9
accumulator specifying the N C O N 1 2 3 4 V2000
number of words to be copied.
K 1 2 3 4 10
N C O N 4 5 3 2 V2001
LDLBL
K1 K 4
N C
5
O
3
N
2
6 1 5 1 V2002
11
Load the value 1 into the

12
accumulator specifying the K 6 1 5 1
Data Label Area K1 as the
N C O N 8 8 4 5 V2003
starting address of the data
to be copied. K 8 8 4 5

MOVBLK
V2000
X X
.
X X V2004
13
.
V2000 is the destination
starting address for the data
14
to be copied.

A
Handheld Programmer Keystrokes

$ B ENT
B
STR 1

SHFT L
ANDST
D
3
A
0
E
4
ENT C
L D L B L B
SHFT

SHFT
ANDST
M
3
O
ANDST
V
1
B
ANDST
L K
1
ENT

C A A A ENT
D
ORST INST# AND 1 ANDST JMP 2 0 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-189


Chapter 5: Standard RLL Instructions - Message Instructions

Print Message (PRINT)


DS Used The Print Message instruction prints the embedded text
1 HPP N/A or text/data variable message (maximum 128 characters)
to the specified communications port (Port 2 on the
PRINT A aaa
Hello, this is a PLC message
DL06 CPU), which must have the communications port
2 configured.
Operand Data Type DL06 Range
3 aaa
Constant K 2
4
You may recall, from the CPU specifications in Chapter 3, that the DL06s ports are capable
5 of several protocols. Port 1 cannot be configured for the non-sequence protocol. To configure
port 2 using the Handheld Programmer, use AUX 56 and follow the prompts, making the
6 same choices as indicated below on this page. To configure a port in DirectSOFT, choose the
PLC menu, then Setup, then Setup Secondary Comm Port.
Port: From the port number list box at the top, choose Port 2.
7 P
 rotocol: Click the check box to the left of Non-sequence, and then youll see the dialog box
shown below.
8
9
10
11
12
13
14
A
Baud Rate: Choose the baud rate that matches your printer.
B Stop Bits, Parity: Choose number of stop bits and parity setting to match your printer.
M
 emory Address: Choose a V-memory address for DirectSOFT to use to store the port setup
C information. You will need to reserve 66 continguous words in V-memory for this purpose.
Before ending the setup, click the button indicated to send Port 2
D configuration to the CPU, and click Close. See Chapter 3 for port
wiring information, in order to connect your printer to the DL06.

5-190 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Message Instructions

Port 2 on the DL06 has standard RS232 levels, and should work with most printer serial
input connections.
Text element this is used for printing character strings. The character strings are defined 1
as the character (more than 0) ranged by the double quotation marks. Two hex numbers
preceded by the dollar sign means an 8-bit ASCII character code. Also, two characters
preceded by the dollar sign is interpreted according to the following table:
2
# Character code Description 3
1 $$ Dollar sign ($)
2
3
$
$L or $l
Double quotation ()
Line feed (LF)
4
4 $N or $n Carriage return line feed (CRLF)
5 $P or $p Form feed 5
6 $R or $r Carriage return (CR)
7 $T or $t Tab 6
The following examples show various syntax conventions and the length of the output to the
printer.
7
Example: 8
Length 0 without character
A Length 1 with character A 9
Length 1 with blank
$ Length 1 with double quotation mark 10
$ R $ L Length 2 with one CR and one LF
$ 0 D $ 0 A Length 2 with one CR and one LF 11
$ $ Length 1 with one $ mark
In printing an ordinary line of text, you will need to include double quotation marks before 12
and after the text string. Error code 499 will occur in the CPU when the print instruction
contains invalid text or no quotations. It is important to test your PRINT instruction data 13
during the application development.
The following example prints the message to port 2. We use a PD contact, which causes the
message instruction to be active for just one scan. Note the $N at the end of the message,
14
which produces a carriage return / line feed on the printer. This prepares the printer to print
the next line, starting from the left margin. A
X1
B
PRINT K2 Print the message to Port 2 when
Hello, this is a PLC message.$N X1 makes an off-to-on transition. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-191


Chapter 5: Standard RLL Instructions - Message Instructions

V-memory element - this is used for printing V-memory contents in the integer format or
real format. Use V-memory number or V-memory number with : and data type. The data
1 types are shown in the table below. The Character code must be capital letters.

NOTE: There must be a space entered before and after the V-memory address to separate it from the
2 text string. Failure to do this will result in an error code 499.

3 #
1
Character code
none
Description
16-bit binary (decimal number)

4 2
3
:B
:D
4 digit BCD
32-bit binary (decimal number)
4 :DB 8 digit BCD
5 5
6
:R
:E
Floating point number (real number)
Floating point number (real number with exponent)

6
Example:
7 V2000 Print binary data in V2000 for decimal number
V2000 : B Print BCD data in V2000
8 V2000 : D Print binary number in V2000 and V2001 for decimal number
V2000 : D B Print BCD data in V2000 and V2001
9 V2000 : R Print floating point number in V2000/V2001 as real number

10 V2000 : E Print floating point number in V2000/V2001 as real number with exponent

X1 PRINT K2 Print the message to Port 2


11 Reactor temperature = V2000 deg. $N

when X1 makes an off-to-on
transition.
represents a space
Message will read:

12 Reactor temperature = 0156 deg.

Example: The following example prints a message containing text and a variable. The
13 reactor temperature labels the data, which is at V2000. You can use the : B qualifier after
the V2000 if the data is in BCD format, for example. The final string adds the units of
degrees to the line of text, and the $N adds a carriage return / line feed.
14 V-memory text element - This is used for printing text stored in V-memory. Use the %
followed by the number of characters after V-memory number for representing the text.
A If you assign 0 as the number of characters, the print function will read the character
count from the first location. Then it will start at the next V-memory location and read that
B number of ASCII codes for the text from memory.
Example:
C V2000 % 16 16 characters in V2000 to V2007 are printed.
V2000 % 0 The characters in V2001 to Vxxxx (determined by the number in V2000)
D will be printed.

5-192 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Message Instructions

Bit element
This is used for printing the state of the designated bit in V-memory or a relay bit. The bit
element can be assigned by the designating point (.) and bit number preceded by the 1
V-memory number or relay number. The output type is described as shown in the table
below. 2
# Data Format Description
Print 1 for an ON state, and 0 for an
3
1 none OFF state
2 :BOOL Print TRUE for an ON state, and
FALSE for an OFF state
4
Print ON for an ON state, and
3 :ONOFF OFF for an OFF state
5
Example: 6
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format 7
C100 : BOOL Prints the status of C100 in TRUE/FALSE format
C100 : ON/OFF Prints the status of C100 in ON/OFF format
8
V2000.15 : BOOL Prints the status of bit 15 in V2000 in TRUE/FALSE format
The maximum numbers of characters you can print is 128. The number of characters for
9
each element is listed in the table below:
10
Element Type Maximum Characters
Text, 1 character 1 11
16 bit binary 6
32 bit binary
4 digit BCD
11
4
12
8 digit BCD 8
Floating point (real number) 12 13
Floating point (real with exponent) 12
V-memory/text
Bit (1/0 format)
2
1
14
Bit (TRUE/FALSE format)
Bit (ON/OFF format)
5
3 A
The handheld programmers mnemonic is PRINT followed by the DEF field. B
Special relay flags SP116 and SP117 indicate the status of the DL06 CPU ports (busy, or
communications error). See the appendix on special relays for a description. C
NOTE: You must use the appropriate special relay in conjunction with the PRINT command to
ensure the ladder program does not try to PRINT to a port that is still busy from a previous PRINT or D
WX or RX instruction.

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-193


Chapter 5: Standard RLL Instructions - Intelligent I/O Instructions

Intelligent I/O Instructions


Read from Intelligent Module (RD)
1 DS32 Used The Read from Intelligent Module instruction reads a block of RD
HPP Used data (1-128 bytes maximum) from an intelligent I/O module V aaa
2 into the CPUs V-memory. It loads the function parameters into
the first and second level of the accumulator stack and the accumulator by three additional
3 instructions.
Listed below are the steps to program the Read from Intelligent module function.
4 Step 1: Load the base number (0-3) into the first byte and the slot number (0-7) into the
second byte of the second level of the accumulator stack.

5 Step 2: Load the number of bytes to be transferred into the first level of the accumulator
stack (maximum of 128 bytes).

6 Step 3: Load the address from which the data will be read into the accumulator. This
parameter must be a HEX value.
Step 4: Insert the RD instruction which specifies the starting V-memory location (Vaaa)
7 where the data will be read into.
Helpful Hint: S Use the LDA instruction to convert an octal address to its HEX equivalent
8 and load it into the accumulator when the HEX format is required.

9 Operand Data Type DL06 Range


aaa
10 V-memory V See memory map

Discrete Bit Flags Description


11 SP54 On when RX, WX RD, WT instructions are executed with the wrong parameters.

12 NOTE: Status flags are valid only until another instruction uses the same flag.

13 In the following example, when X1 is ON, the RD instruction will read six bytes of data from
a intelligent module in base 1, slot 2, starting at address 0 in the intelligent module, and copy
the information into V-memory loacations V1400-V1402.
14 DirectSOFT
Direct SOFT 5
CPU Intelligent Module
Data

}
{
X1 The constant value K0102

A
LD specifies the base number V1400 3 4 1 2 12 Address 0
K0102 (01) and the base slot V1401 7 8 5 6 34 Address 1
number (02).
V1402 0 1 9 0 56 Address 2

LD The constant value K6 V1403 X X X X 78 Address 3


specifies the number of

B
K6 bytes to be read. V1404 X X X X 90 Address 4
01 Address 5

LD The constant value K0


Handheld Programmer Keystrokes
specifies the starting address
K0

C
in the intelligent module. $ B ENT
STR 1
V1400 is the starting location L D A B A C
RD SHFT PREV ENT
in the CPU where the specified ANDST 3 0 1 0 2
V1400 data will be stored.
L D G

D
SHFT PREV ENT
ANDST 3 6
L D A
SHFT PREV ENT
ANDST 3 0

R D B E A A
SHFT ENT
ORN 3 1 4 0 0

5-194 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Intelligent I/O Instructions
Write to Intelligent Module (WT)
WT
DS32 Used The Write to Intelligent Module instruction writes a block of data
V aaa
(1-128 bytes maximum) to an intelligent I/O module from a block
HPP Used
of V-memory in the CPU. The function parameters are loaded into 1
the first and second level of the accumulator stack and the accumulator by three additional
instructions.
Listed below are the steps to program the Read from Intelligent module function.
2
Step 1: Load the base number (0-3) into the first byte and the slot number (0-7) into the
second byte of the second level of the accumulator stack.
3
Step 2: Load the number of bytes to be transferred into the first level of the accumulator
stack (maximum of 128 bytes).
4
Step 3: Load the intelligent module address which will receive the data into the accumulator.
This parameter must be a HEX value.
5
Step 4: Insert the WT instruction which specifies the starting V-memory location (Vaaa)
where the data will be written from in the CPU. 6
Helpful Hint: S Use the LDA instruction to convert an octal address to its HEX equivalent
and load it into the accumulator when the HEX format is required. 7
Operand Data Type DL06 Range 8
aaa
V-memory V See memory map 9
Discrete Bit Flags Description 10
SP54 On when RX, WX RD, WT instructions are executed with the wrong parameters.

11
NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the WT instruction will write six bytes of data to an 12
intelligent module in base 1, slot 2,starting at address 0 in the intelligent module, and copy
the data from V-memory locations V1400-V1402.
Intelligent Module
13
CPU
Data
14
{
DirectSOFT
Direct SOFT 5
V1377 12 Address 0
X X X X

}
X1 The constant value K0102 34 Address 1
LD specifies the base number V1400 3 4 1 2
56

A
K0102 (01) and the base slot 7 8 5 6 Address 2
V1401
number (02). 78
0 1 9 0 Address 3
V1402
The constant value K6 90 Address 4
LD V1403 X X X X
specifies the number of 01 Address 5
K6 bytes to be written. V1404 X X X X

LD
K0
The constant value K0
specifies the starting address
Handheld Programmer Keystrokes
B
in the intelligent module. $ B

C
ENT
STR 1
V1400 is the starting location L D A B A C
WT SHFT PREV ENT
in the CPU where the specified ANDST 3 0 1 0 2
V1400 data will be written from.
L D G

D
SHFT PREV ENT
ANDST 3 6
L D A
SHFT PREV ENT
ANDST 3 0
W T B E A A
SHFT ENT
ANDN MLR 1 4 0 0

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-195


Chapter 5: Standard RLL Instructions - Network Instructions

Network Instructions
1 Read from Network (RX)
The Read from Network instruction is used by the master device on a
DS32 Used RX
2 HPP Used network to read a block of data from a slave device on the same network.
The function parameters are loaded into the first and second level of
A aaa

the accumulator stack and the accumulator by three additional instructions. Listed below are the steps
3 necessary to program the Read from Network function.
Step 1: L
 oad the slave address (0-- 90 BCD) into the first byte and the PLC internal port (KF2) or
4 slot number of the master DCM or ECOM (0-- 7) into the second byte of the second level
of the accumulator stack.

5 Step 2: Load the number of bytes to be transferred into the first level of the accumulator stack.
Step 3: L
 oad the address of the data to be read into the accumulator. This parameter requires a
HEX value.
6 Step 4: I nsert the RX instruction which specifies the starting Vmemory location (Aaaa) where the
data will be read from in the slave.
7 Helpful Hint: For parameters that require HEX values, the LDA instruction can be used
to convert an octal address to the HEX equivalent and load the value into the accumulator.
8
9
Operand Data Type
A
DL06 Range
aaa
10 V-memory
Pointer
V
P
See memory map
See memory map
Inputs X 0777
11 Outputs Y 0777
Control Relays C 01777

12 Stage
Timer
S
T
01777
0377
Counter CT 0177
13 Special Relay SP 0777
Program Memory $ 07680 (2K program mem.)
14
A
B
C
D

5-196 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Network Instructions

In the following example, when X1 is on and the port busy relay SP116 (see special relays) is
not on, the RX instruction will access port 2 operating as a master. Ten consecutive bytes of
data (V2000 V2004) will be read from a CPU at station address 5 and copied into
V-memory locations V2300V2304 in the CPU with the master port.
1
DirectSOFT
Direct SOFT32
2
X1 SP116 LD
KF205
3
Master Slave
The constant value KF205
specifies the port number (2)
and the slave address (5)
CPU CPU 4
LD
K10
V2277 X X X X X X X X V1777
5
The constant value K10
specifies the number of
bytes to be read
V2300
V2301
3
8
4
5
5
3
7
4
3
8
4
5
5
3
7
4
V2000
V2001 6
V2302 1 9 3 6 1 9 3 6 V2002
LDA
O 2300 V2303
V2304
9
1
5
4
7
2
1
3
9
1
5
4
7
2
1
3
V2003
V2004
7
Octal address 2300 is
converted to 4C0 HEX and
loaded into the accumulator.
V2300 is the starting
V2305 X X X X X X X X V2005
8
location for the Master CPU
where the specified data will
be read into 9
RX
V2000 10
11
V2000 is the starting
location in the for the Slave
CPU where the specified
data will be read from

Handheld Programmer Keystrokes


12
$
STR
B
1
ENT
13
W SHFT SP B B G ENT
ANDN

SHFT L
ANDST
D
3
STRN

SHFT
1
K
JMP
1

SHFT
6
F
5
SHFT C
2
A
0
F
5
ENT
14
SHFT L
ANDST
D
3
SHFT K
JMP
B
1
A
0
ENT A
SHFT L D A C D A A ENT

SHFT
ANDST
R X
3 0
C A
2
A
3
A
0

ENT
0
B
ORN SET 2 0 0 0

C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-197


Chapter 5: Standard RLL Instructions - Network Instructions

Write to Network (WX)


The Write to Network instruction is used to write a block WX
1 DS
HPP
Used
Used of data from the master device to a slave device on the A aaa
same network. The function parameters are loaded into the
2 accumulator and the first and second levels of the stack. Listed below are the program steps
necessary to execute the Write to Network function.

3 Step 1: Load the slave address (090 BCD) into the low byte and F2 into the high
byte of the accumulator (the next two instructions push this word down to the
second layer of the stack).
4 Step 2: Load the number of bytes to be transferred into the accumulator (the next
instruction pushes this word onto the top of the stack).
5 Step 3: Load the starting Master CPU address into the accumulator. This is the
memory location where the data will be written from. This parameter requires
6 a HEX value.
Step 4: Insert the WX instruction which specifies the starting V-memory location
7 (Aaaa) where the data will be written to in the slave.
Helpful Hint: For parameters that require HEX values, the LDA instruction can be used
8 to convert an octal address to the HEX equivalent and load the value into the accumulator.

Operand Data Type DL06 Range


9 A aaa
V-memory V See memory map
10 Pointer P See memory map
Inputs X 0777

11 Outputs
Control Relays
Y
C
0777
01777
Stage S 01777
12 Timer T 0377
Counter CT 0177

13 Special Relay
Program Memory
SP
$
0777
07680 (2K program mem.)

14
A
B
C
D

5-198 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - Network Instructions

In the following example, when X1 is on and the module busy relay SP116 (see special relays)
is not on, the WX instruction will access port 2 operating as a master. Ten consecutive bytes
of data are read from the Master CPU and copied to V-memory locations V2000V2004 in
the slave CPU at station address 5.
1
DirectSOFT
Direct SOFT32

X1 SP116
2
LD
KF205

The constant value KF205


Master Slave 3
specifies the port number (2) CPU CPU
and the slave address (5)

LD
4
5
K10
V2277 X X X X X X X X V1777
The constant value K10 V2300 3 4 5 7 3 4 5 7 V2000
specifies the number of
V2301 8 5 3 4 8 5 3 4 V2001
6
bytes to be written
V2302 1 9 3 6 1 9 3 6 V2002
LDA
V2303 9 5 7 1 9 5 7 1 V2003
O 2300

Octal address 2300 is


converted to 4C0 HEX and
V2304
V2305
1
X
4
X
2
X
3
X
1
X
4
X
2
X
3 V2004
X V2005
7
loaded into the accumulator.
V2300 is the starting
location for the Master CPU
where the specified data will
8
be read from.

9
WX
V2000

V2000 is the starting


10
location in the for the Slave
CPU where the specified
data will be written to 11
Handheld Programmer Keystrokes

$ B ENT
12
STR 1
W
ANDN
SHFT SP
STRN
B
1
C
1
E
6
ENT 13
14
SHFT L D SHFT K F C A F ENT
SHFT SHFT
ANDST 3 JMP 5 2 0 5

SHFT L D SHFT K B A ENT


ANDST 3 JMP 1 0

SHFT L
ANDST
D
3
A
0
C
2
D
3
A
0
A
0
ENT A
B
SHFT W X C A A A ENT
ANDN SET 2 0 0 0

C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-199


Chapter 5: Standard RLL Instructions - LCD
LCD
DS Used When enabled, the LCD instruction causes a user-defined text
LCD
HPP N/A message to be displayed on the LCD Display Panel. The display is
1 16 characters wide by 2 rows high so a total of 32 characters can be Line Number:
"text message"
Kn

displayed. Each row is addressed separately; the maximum number


2 of characters the instruction will accept is 16.
The text message can be entered directly into the message field of the instruction set-up
3 dialog, or it can be located anywhere in user V-memory. If the text is located in V-memory,
the LCD instruction is used to point to the memory location where the desired text
originates. The length of the text string is also required.
4 From the DirectSOFT project folder, use the Instruction Browser to locate the LCD
instruction. When you select the LCD instruction and click OK, the LCD dialog will appear,
5 as shown in the examples. The LCD instruction is inserted into the ladder program via this
set-up dialog box.
6 Display text strings can include embedded variables. Date and time settings and V-memory
values can be embedded in the displayed text. Examples of each are shown.

7
Direct Text Entry
8 The two dialogs to the right show the
selections necessary to create the two ladder
9 instructions below. Double quotation
marks are required to delineate the text
10 string. In the first dialog, the text Sludge
Pit Alarm uses sixteen character spaces and
will appear on line 1 when the instruction
11 is enabled. Note, the line number is K1.
Clicking the check button causes the
12 instruction to be inserted into the ladder
program.
13 LCD
Line Number: K1

14 "Sludge Pit Alarm"

LCD

A Line Number:
"Effluent Overflo"
K2

B By identifying the second Line Number


as K2, the text string Effluent Overflow
C will appear on the second line of the display
when the second instruction is enabled.
D S l
E f
u d g e P
f l u e n t
i t A l
O v e r
a
f
r m
l o

5-200 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - LCD

Embedding date and/or time variables


The date and/or time can be embedded in
the displayed text by using the variables 1
listed in the table below. These variables can
be included in the LCD message field of
the LCD dialog. In the example, the time
2
variable (12 hour format) is embedded by
adding _time:12. This time format uses a 3
maximum of seven character spaces. The
second dialog creates an instruction that
prints the date on the second line of the
4
display, when enabled.
5
Date and Time Variables and Formats
_date:us US format MM/DD/YY
6
_date:e European format DD/MM/YY
_date:a Asian format YY/MM/DD 7
_time:12 12 hour format HH:MMAM/PM
_time:24 24 hour format HH:MM:SS
8
LCD
Line Number:
"Alarm 1 " _time:12
K1
9
LCD
Line Number: K2
10
_date:us

11
A l a r m 1 1 1 : 2 1 P M
0 5 - 0 8 - 0 2 12
Embedding V-memory data
Any V-memory data can be displayed in 13
any one of six available data formats. An
example appears to the right. A list of data
formats and modifiers is on the next page.
14
Note that different data formats require
differing numbers of character positions A
on the display.

LCD
B
C
Line Number: K1
"Count = " V2500:B

C o u n t = 0 4 1 2
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-201


Chapter 5: Standard RLL Instructions - LCD
Data Format Suffixes for Embedded V-memory Data
Several data formats are available for displaying V-memory data on the LCD. The choices are
shown in the table below. A colon is used to separate the embedded V-memory location from
1 the data format suffix and modifier. An example appears on the previous page.

2 Data Format Modifier Example


V2000 = 0000 0000 0001 0010 1 2 3 4
Displayed Characters

3 none
(16-bit format)
[:S]
V2000
V2000:S 1 8
1 8

[:C0] V2000:C0 0 0 1 8
4 [:0] V2000:0
V2000 = 0000 0000 0001 0010 1 2
1
3
8
4
5 :B
(4 digit BCD)
[:B]
[:BS]
V2000:B
V2000:BS
0
1
0
2
1 2

[:BC0] V2000:BC0 0 0 1 2
6 [:B0] V2000:B0 1 2
V2000 = 0000 0000 0000 0000 Double Word
7 :D [:D]
V2001 = 0000 0000 0000 0001
V2000:D
1 2 3 4 5 6 7 8 9 10 11
6 5 5 3 6
(32-bit decimal) [:DS]
8 [:DC0]
V2000:DS
V2000:DC0
6
0
5
0
5
0
3
0
6
0 0 6 5 5 3 6
[:D0] V2000:D0 6 5 5 3 6
9 V2000 = 0000 0000 0000 0000 Double Word
V2001 = 0000 0000 0000 0011 1 2 3 4 5 6 7 8
10 :DB
(8 digit BCD)
[:DB]
[:DBS]
V2000:DB
V2000:DBS
0
3
0
0
0
0
3
0
0
0
0 0 0

[:DBC0] V2000:DBC0 0 0 0 3 0 0 0 0
11 [:DB0] V2000:DB0 3 0 0 0 0
V2001/V2000 = 222.11111 Double Word
12 :R
(real number) 1 2 3 4 5 6 7 8 9 10 11 12 13
(DWord floating [:R] V2000:R f 2 2 2 . 1 1 1 1 1

13 point number) [:RS]


[:RC0]
V2000:RS
V2000:RC0
f
f
2
0
2
0
2
0
.
2
1
2
1
2
1
.
1
1
1
1 1 1 1
[:R0] V2000:R0 f 2 2 2 . 1 1 1 1 1
14 V2001/V2000 = 222.1 Double Word
:E (real number) 1 2 3 4 5 6 7 8 9 10 11 12 13
A (DWord floating [:E]
point number [:ES]
V2000:E
V2000:ES
f 2 . 2
f 2 . 2 2
2
1
1
0
0
0
0
E
E
+
+
0
0
2
2

with exponent) [:EC0]


B [:E0]
V2000:EC0
V2000:E0
f 2 . 2 2
f 2 . 2 2
1
1
0
0
0
0
E
E
+
+
0
0
2
2
f = plus/minus flag (plus = no symbol, minus = - )
C 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.
D 0 is a modification of C0. 0 eliminates any leading zeros in the C0 format version and
converts them to spaces.

5-202 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - LCD

Text Entry from V-memory


Alternatively, text that resides in V-memory can be displayed on the LCD following the
example on this page. The LCD dialog is used twice, once for each line on the display. The 1
dialog requires the address of the first character to be displayed and the number of characters
to be displayed. 2
For example, the two dialogs shown on this page would create the two LCD instructions
below. When enabled, these instructions would cause the ASCII characters in V10000 to
V10017 to be displayed. The ASCII characters and their corresponding memory locations are
3
shown in the table below.
4
5
6
7
8
9
10
V10000
V10001
d
i
A
m
11
LCD V10002 n
Line Number: K1 V10003 f O 12
Starting V Memory Address: V10000 V10004 i f
Number of Characters: K16 V10005
V10006
e c
13
V10007
LCD
Line Number: K2 V10010 i H 14
Starting V Memory Address: V10010 V10011 h g
Number of Characters: K16 V10012
V10013
T
m e
A
V10014 p
V10015 l A B
V10016 r a
A d m i n O f f i c e
H i g h T e m p A l a r m
V10017 m C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-203


Chapter 5: Standard RLL Instructions - MODBUS

MODBUS RTU Instructions


1 MODBUS Read from Network (MRX)
The MODBUS Read from Network (MRX) instruction is used by the DL06 network master
DS Used

2 HPP N/A to read a block of data from a connected slave device and to write the data into Vmemory
addresses within the master. The instruction allows the user to specify the MODBUS
Function Code, slave station address, starting master and slave memory addresses, number of
3 elements to transfer, MODBUS data format and the Exception Response Buffer.
CPU/DCM: select either CPU or DCM module
4 for communications
Slot Number: select PLC option slot number if
5 using a DCM module.
Port Number: must be DL06 Port 2 (K2)
6 Slave Address: specify a slave station address
(0247)
7 F  unction Code: The following MODBUS function
codes are supported by the MRX instruction:
8 01 Read a group of coils
02 Read a group of inputs
9 03 Read holding registers
04 Read input registers
10 07 Read Exception status
Start Slave Memory Address: specifies the starting slave memory address of the data to be
11 read. See the table on the following page.
S  tart Master Memory Address: specifies the starting memory address in the master where
12 the data will be placed. See the table on the following page.
N  umber of Elements: specifies how many coils, inputs, holding registers or input register
13 will be read. See the table on the following page.
M  ODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used
14 Exception Response Buffer: specifies the master memory address where the Exception Response will
be placed (6-bytes in length). See the table on the following page.The exception response buffer uses 3
A words. These bytes are swapped in the MRX/MWX exception response buffer V-memory so:
V-Memory 1 Hi Byte = Function Code Byte (Most Significant Bit Set)

B V-Memory 1 Lo Byte = Address Byte


V-Memory 2 Hi Byte = One of the CRC Bytes

C V-Memory 2 Lo Byte = Exception Code


V-Memory 3 Hi Byte = 0

D V-Memory 3 Lo Byte = Other CRC Byte

5-204 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - MODBUS

MRX Slave Address Ranges

Function Code
01 Read Coil
MODBUS Data Format
484 Mode
Slave Address Range(s)
1999
1
01 Read Coil 584/984 Mode 165535
02 Read Input Status 484 Mode 10011999 2
02 Read Input Status 584/984 Mode 1000119999 (5 digit) or 100001

03 Read Holding Register 484 Mode


165535 (6 digit)
40014999 3
03 Read Holding Register 584/984 Mode 4000149999 (5 digit) or 4000001

04 Read Input Register 484 Mode


465535 (6 digit)
30013999
4
3000139999 (5 digit) or 3000001
04 Read Input Register
07 Read Exception Status
584/984 Mode
484 and 584/984 Mode
365535 (6 digit)
N/A
5
6
7
MRX Master Memory Address Ranges
Operand Data Type DL06 Range 8
Inputs X 01777
Outputs
Control Relays
Y
C
01777
03777
9
Stage Bits S 01777
Timer Bits T 0377 10
Counter Bits CT 0377
Special Relays
Vmemory
SP
V
0777
all
11
Global Inputs GX 03777
Global Outputs GY 03777 12
13
Number of Elements 14
Operand Data Type DL06 Range
Vmemory
Constant
V
K
all
Bits: 12000 Registers: 1125
A
B
Exception Response Buffer
Operand Data Type
Vmemory V
DL06 Range
all
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-205


Chapter 5: Standard RLL Instructions - MODBUS

MRX Example
DL06 port 2 has two Special Relay contacts associated with it (see Appendix D for comm
1 port special relays). One indicates Port busy(SP116), and the other indicates Port
Communication Error(SP117). The Port Busy bit is on while the PLC communicates
2 with the slave. When the bit is off, the program can initiate the next network request.
The Port Communication Error bit turns on when the PLC has detected an error. Use
of this bit is optional. When used, it should be ahead of any network instruction boxes,
3 since the error bit is reset when an MRX or MWX instruction is executed. Typically,
network communications will last longer than 1 CPU scan. The program must wait for the
4 communications to finish before starting the next transaction.

5
6
7
8
9
10
11
NOTE: See Chapter 4, page 4-21, for an RLL example using multiple Read and Write interlocks with
12 MRX/MWX instructions.

13
14
A
B
C
D

5-206 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - MODBUS

MODBUS Write to Network (MWX)


The MODBUS Write to Network (MWX) instruction is used to write a block of data from
DS
HPP
Used
N/A
the network masterss (DL06) memory to MODBUS memory addresses within a slave device 1
on the network. The instruction allows the user to specify the MODBUS Function Code,
slave station address, starting master and slave memory addresses, number of elements to
transfer, MODBUS data format and the Exception Response Buffer.
2
CPU/DCM: select either CPU or DCM module for
communications
3
Slot Number: select PLC option slot number if
using a DCM module 4
Port Number: must be DL06 Port 2 (K2)
S  lave Address: specify a slave station address
5
(0247)
F  unction Code: MODBUS function codes 6
supported by the MWX instruction:
05 Force Single coil 7
06 Preset Single Register
15 Force Multiple Coils
8

S
16 Preset Multiple Registers
 tart Slave Memory Address: specifies the starting
9
S
slave memory address where the data will be written
 tart Master Memory Address: specifies the starting address of the data in the master that is
10
to be written to the slave
N  umber of Elements: specifies how many consecutive coils or registers will be written to. 11
This field is only active when either function code 15 or 16 is selected.
M  ODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used 12
E  xception Response Buffer: specifies the master memory address where the Exception Response will
be placed (6-bytes in length). See the table on the following page.The exception response buffer uses 3 13
words. These bytes are swapped in the MRX/MWX exception response buffer V-memory so:
V-Memory 1 Hi Byte = Function Code Byte (Most Significant Bit Set) 14
V-Memory 1 Lo Byte = Address Byte
V-Memory 2 Hi Byte = One of the CRC Bytes A
V-Memory 2 Lo Byte = Exception Code
V-Memory 3 Hi Byte = 0 B
V-Memory 3 Lo Byte = Other CRC Byte
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-207


Chapter 5: Standard RLL Instructions - MODBUS

1 MWX Slave Address Ranges


MWX Slave Address Ranges
2 Function Code MODBUS Data Format Slave Address Range(s)
05 Force Single Coil 484 Mode 1999

3 05 Force Single Coil


06 Preset Single Register
584/984 Mode
484 Mode
165535
40014999
4000149999 (5 digit) or 400001
4 06 Preset Single Register
15 Force Multiple Coils
584/984 Mode
484 Mode
465535 (6 digit)
1999

5 15 Force Multiple Coils


16 Preset Multiple Registers
585/984 Mode
484 Mode
165535
40014999
16 Preset Multiple Registers 584/984 Mode 4000149999 (5 digit) or 4000001
6 465535 (6 digit)

7 MWX Master MWX Master Memory Address Ranges


Operand Data Type DL06 Range
8 Memory Address
Ranges Inputs X 01777
Outputs Y 01777
9 Control Relays
Stage Bits
C
S
03777
01777

10 Timer Bits
Counter Bits
T
CT
0377
0377
Special Relays SP 0777
11 Vmemory
Global Inputs
V
GX
all
03777

12 Global Outputs GY 03777

13
Number of Elements
14 MWX Number of
Operand Data Type DL06 Range
Elements Vmemory V all
A Constant K Bits: 12000 Registers: 1125

B
C MWX Exception Number of Elements
Operand Data Type DL06 Range
D Response Buffer Vmemory V all

5-208 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - MODBUS

MWX Example
DL06 port 2 has two Special Relay contacts associated with it (see Appendix D for comm
port special relays). One indicates Port busy(SP116), and the other indicates Port 1
Communication Error(SP117). The Port Busy bit is on while the PLC communicates
with the slave. When the bit is off, the program can initiate the next network request. The
Port Communication Error bit turns on when the PLC has detected an error. Use of this
2
bit is optional. When used, it should be ahead of any network instruction boxes since the
error bit is reset when an MRX or MWX instruction is executed. 3
Typically, network communications will last longer than 1 CPU scan. The program must
wait for the communications to finish before starting the next transaction. 4
This rung does a MODBUS write to the first holding register 40001 of slave address
number six. It will write the values over that reside in V2000. This particular function
5
code only writes to 1 register. Use Function Code 16 to write to multiple registers.
Only one Network instruction (WX, RX, MWX, MRX) can be enabled in one scan.
That is the reason for the interlock bits.
6
X1 C100
7
2 SET
8
Port 2 busy bit Instruction Interlock bit

3
SP116 C100
MWX
Port Number: K2
9
Slave Address: K6
Function Code: 06-Preset Single Register
Start Slave Memory Address: 40001
10
Start Master Memory Address: V2000
Number of Elements:
Modbus Data type:
Exception Response Buffer:
n/a
584/984 Mode
V400
11
Instruction Interlock bit 12
C100
RST
13
14
NOTE: See Chapter 4, page 4-21, for an RLL example using multiple Read and Write interlocks with A
MRX/MWX instructions.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-209


Chapter 5: Standard RLL Instructions - ASCII

ASCII Instructions
1 The DL06 CPU supports several instructions and methods that allow ASCII strings to be
read into and written from the PLC communications ports. Specifically, port 2 on the DL06
2 can be used for either reading or writing raw ASCII strings, but cannot be used for both at
the same time. The DL06 can also decipher ASCII embedded within a supported protocol
(KSequence, DirectNet, Modbus) via the CPU port.
3 Reading ASCII Input Strings
4 There are several methods that the DL06 can use to read ASCII input strings.
1) ASCII IN (AIN) This instruction configures port 2 for raw ASCII input strings with
5 parameters such as fixed and variable length ASCII strings, termination characters, byte
swapping options, and instruction control bits. Use barcode scanners, weight scales, etc. to
write raw ASCII input strings into port 2 based on the (AIN) instructions parameters.
6 2) Write embedded ASCII strings directly to Vmemory from an external HMI or similar
master device via a supported communications protocol using the CPU ports. The AIN
7 instruction is not used in this case. 3) If a DL06 PLC is a master on a network, the
Network Read instruction (RX) can be used to read embedded ASCII data from a slave
8 device via a supported communications protocol using port 2. The RX instruction places
the data directly into Vmemory.

9 Writing ASCII Output Strings


The following instructions can be used to write ASCII output strings:
10 1) Print from Vmemory (PRINTV) Use this instruction to write raw ASCII strings out
of port 2 to a display panel or a serial printer, etc. The instruction features the starting
11 Vmemory address, string length, byte swapping options, etc. When the instructions
permissive bit is enabled, the string is written to port 2.
2) Print to Vmemory (VPRINT) Use this instruction to create precoded ASCII strings
12 in the PLC (i.e. alarm messages). When the instructions permissive bit is enabled, the
message is loaded into a predefined Vmemory address location. Then the (PRINTV)
13 instruction may be used to write the precoded ASCII string out of port 2. American,
European and Asian Time/Date stamps are supported.
14 Additionally, if a DL06 PLC is a master on a network, the Network Write instruction (WX)
can be used to write embedded ASCII data to an HMI or slave device directly from V
memory via a supported communications protocol using port 2.
A
B
C
D

5-210 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

Managing the ASCII Strings


The following instructions can be helpful in managing the ASCII strings within the CPUs
Vmemory: 1
ASCII Find (AFIND) Finds where a specific portion of the ASCII string is located in
continuous Vmemory addresses. Forward and reverse searches are supported. 2
ASCII Extract (AEX) Extracts a specific portion (usually some data value) from the ASCII
find location or other known ASCII data location. 3
Compare Vmemory (CMPV) This instruction is used to compare two blocks of V
memory addresses and is usually used to detect a change in an ASCII string. Compared data
types must be of the same format (i.e., BCD, ASCII, etc.).
4
Swap Bytes (SWAPB) usually used to swap Vmemory bytes on ASCII data that
was written directly to Vmemory from an external HMI or similar master device via
5
a communications protocol. The AIN and AEX instructions have a builtin byte swap
feature. 6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-211


Chapter 5: Standard RLL Instructions - ASCII

ASCII Input (AIN)


The ASCII Input instruction allows the CPU to receive ASCII strings through the specified
1 DS
HPP
Used
N/A
communications port and places the string into a series of specified Vmemory registers.
The ASCII data can be received as a fixed number of bytes or as a variable length string with
2 specified termination character(s). Other features include, Byte Swap preferences, Character
Timeout, and user defined flag bits for Busy, Complete and Timeout Error.
3 AIN Fixed Length Configuration
L  ength Type: select fixed
4 length based on the length of
the ASCII string that will be
sent to the CPU port
5 P  ort Number: must be DL06
port 2 (K2)
6 D  ata Destination: specifies
where the ASCII string will be
7 placed in Vmemory
F  ixed Length: specifies the
8 length, in bytes, of the fixed
length ASCII string the port
9 will receive
I ntercharacter Timeout: if
the amount of time between
10 incoming ASCII characters
exceeds the set time, the
11 specified Timeout Error bit
will be set. No data will be stored at the Data Destination Vmemory location. The bit
will reset when the AIN instruction permissive bits are disabled. 0ms selection disables this
12 feature.
First Character Timeout: if the amount of time from when the AIN is enabled to the time
13 the first character is received exceeds the set time, the specified First Character Timeout bit
will be set. The bit will reset when the AIN instruction permissive bits are disabled. 0ms
14 selection disables this feature.
B  yte Swap: swaps the highbyte and lowbyte within each Vmemory register of the Fixed
A B
Length ASCII string. See the SWAPB instruction for details.
 usy Bit: is ON while the AIN instruction is receiving ASCII data
B C  omplete Bit: is set once the ASCII data has been received for the specified fixed length
and reset when the AIN instruction permissive bits are disabled.
C I ntercharacter Timeout Error Bit: is set when the Character Timeout is exceeded. See
Character Timeout explanation above.

D First Character Timeout Error Bit: is set when the First Character Timeout is exceeded.
See First Character Timeout explanation above.

5-212 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

Parameter
Data Destination All Vmemory 1
Fixed Length K1128
Bits: Busy, Complete,
Timeout Error, Overflow C03777 2
3
AIN Fixed Length Examples

Fixed Length example when the PLC is reading the port continuously and timing is not critical
4
5
6
7
8
9
10
11
Fixed Length example when character to character timing is critical 12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-213


Chapter 5: Standard RLL Instructions - ASCII

AIN Variable Length Configuration:


Length Type: select Variable Length if the ASCII string length followed by termination
1 characters will vary in length
P  ort Number: must be DL06 port
2 2 (K2)
D  ata Destination: specifies where
3 the ASCII string will be placed in
Vmemory
4 M  aximum Variable Length:
specifies, in bytes, the maximum
5 length of a Variable Length ASCII
string the port will receive
I ntercharacter Timeout: if the
6 amount of time between incoming
ASCII characters exceeds the set
7 time, the Timeout Error bit will
be set. No data will be stored at
8 the Data Destination Vmemory
location. The Timeout Error bit will reset when the AIN instruction permissive bits are
disabled. 0ms selection disables this feature.
9 F  irst Character Timeout: if the amount of time from when the AIN is enabled to the time
the first character is received exceeds the set time, the specified First Character Timeout bit
10 will be set. The bit will reset when the AIN instruction permissive bits are disabled. 0ms
selection disables this feature.
11 B  yte Swap: swaps the highbyte and lowbyte within each Vmemory register of the
Variable Length ASCII string. See the SWAPB instruction for details.

12 T  ermination Code Length: consists of either 1 or 2 characters. Refer to Appendix G,


ASCII Table.

13 B
C
 usy Bit: is ON while the AIN instruction is receiving ASCII data
 omplete Bit: is set once the ASCII data has been received up to the termination code
characters. It will be reset when the AIN instruction permissive bits are disabled.
14 I ntercharacter Timeout Error Bit: is set when the Character Timeout is exceeded. See
Character Timeout explanation above.
A F  irst Character Timeout Error Bit: is set when the First Character Timeout is exceeded.
See First Character Timeout explanation above.
B O  verflow Error Bit: is set when the ASCII data received exceeds the Maximum Variable
Length specified.
C
D

5-214 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

Parameter 1
Data Destination All Vmemory
Fixed Length
Bits: Busy, Complete,
K1128
C03777
2
Timeout Error, Overflow
3
4
AIN Variable Length Example 5
AIN variable length example used to read barcodes on boxes (PE = photoelectric sensor) 6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-215


Chapter 5: Standard RLL Instructions - ASCII

ASCII Find (AFIND)


The ASCII Find instruction locates a specific ASCII string or portion of an ASCII string
1 DS
HPP
Used
N/A
within a range of Vmemory registers and places the strings Found Index number (byte
number where desired string is found), in Hex, into a specified Vmemory register. Other
2 features include, Search Starting Index number for skipping over unnecessary bytes before
beginning the FIND operation, Forward or Reverse direction search, and From Beginning
and From End selections to reference the Found Index Value.
3 Base Address: specifies the beginning Vmemory register where the entire ASCII string is
stored in memory
4 T  otal Number of Bytes: specifies the total number of bytes to search for the desired ASCII
string
5 S  earch Starting Index: specifies which byte to skip to (with respect to the Base Address)
before beginning the search
6 Direction: Forward begins the search from lower numbered Vmemory registers to higher
numbered Vmemory registers. Reverse does the search from higher numbered Vmemory
7 registers to lower numbered Vmemory registers.
F  ound Index Value: specifies whether the Beginning or the End byte of the ASCII string
8 found will be loaded into the Found Index register
Found Index: specifies the Vmemory register where the Found Index Value will be stored.
9 A value of FFFF will result if the desired string is not located in the memory registers
specified.

10 Search for String: up to 128 characters.

Parameter DL06 Range


11 Base Address All Vmemory
Total Number of Bytes All Vmemory or K1128
12 Search Starting Index
Found Index
All Vmemory or K0127
All Vmemory

13
14
A
B
C
D

5-216 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

AFIND Search Example


In the following example, the AFIND instruction is used to search for the day portion
of Friday in the ASCII string Today is Friday., which had previously been loaded into 1
Vmemory. Note that a Search Starting Index of constant (K) 5 combined with a Forward
Direction Search is used to prevent finding the day portion of the word Today. The
Found Index will be placed into V4000.
2
3
4
5
6
7
8
9
10
ASCII Characters
HEX Equivalent 11
Base Address 0
1
T
o
54h
6Fh
Low
High V3000 12
Reverse Direction Search 2 d 64h Low
3
4
a
y
61h
79h
High
Low
V3001
13
Search start Index Number V3002
5 20h High
6
7
i
s
69h
73h
Low
High V3003 14
8 20h Low
Forward Direction Search
9
10
F
r
46h
72h
High
Low
V3004
A
V3005
i High
Beginning Index Number
11
12
13
d
a
69h
64h
61h
Low
High
V3006
B
y
End Index Number 14
15 .
79h
2Eh
Low
High
V3007 C
Found Index Number = 0012 V4000
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-217


Chapter 5: Standard RLL Instructions - ASCII

AFIND Example Combined with AEX Instruction


When an AIN instruction has executed, its Complete bit can be used to trigger an AFIND
1 instruction to search for a desired portion of the ASCII string. Once the string is found, the
AEX instruction can be used to extract the located string.
2
AIN Complete AFIND
3 15
C1
Base Address: V2001
Total Number of Bytes: K32

4 Search Starting Index:


Direction: Forward
K0

Found Index Value: From Beginning

5 Found Index:
Code 39
V2200

Give delay time for

6 C7
AFIND instruction
to complete
SET
7 Give delay time for
AFIND instruction
to complete Search string not found Data not found with
8 16
C7
in table
V2200 Kffff AFIND
C10
SET

9 Give delay time for


AFIND instruction
to complete
10 C7
RST
Give delay time for

11 AFIND instruction
to complete
Data not found with
AFIND
TMR
Delay for
C7 C10 AFIND to complete

12 17 T0
K2

13 Delay time for


AFIND to complete
T0
AEX
18

14 Source Base Address:


Extract at Index:
Number of Bytes:
K0
V2001

K4
Shift ASCII Option: None
A Byte Swap:
Convert ASCII:
All
To BCD (HEX)
Destination Base Address: V3000
B Give delay time for
AFIND instruction

C C7
to complete

RST

5-218 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

ASCII Extract (AEX)


The ASCII Extract instruction extracts a specified number of bytes of ASCII data from one
DS
HPP
Used
N/A series of Vmemory registers and places it into another series of Vmemory registers. Other 1
features include, Extract at Index for skipping over unnecessary bytes before beginning the
Extract operation, Shift ASCII Option, for One Byte Left or One Byte Right, Byte Swap and
Convert data to a BCD format number.
2
S ource Base Address: specifies the beginning Vmemory register where the entire ASCII
string is stored in memory
3
E xtract at Index: specifies which byte to skip to (with respect to the Source Base Address)
before extracting the data 4
N umber of Bytes: specifies the number of bytes to be extracted
S hift ASCII Option: shifts all extracted data one byte left or one byte right to displace
5
unwanted characters if necessary
B yte Swap: swaps the highbyte and the lowbyte within each Vmemory register of the 6
extracted data. See the SWAPB instruction for details.
C onvert BCD(Hex) ASCII to BCD (Hex): if enabled, this will convert ASCII numerical 7
characters to Hexadecimal numerical values
D estination Base Address: specifies the Vmemory register where the extracted data will be 8
stored
See the previous page for an example using the AEX instruction. 9
10
Parameter DL06 Range
Source Base Address All Vmemory 11
Extract at Index All Vmemory or K0127
Number of Bytes Constant range: V-memory location
Convert BCD (HEX) ASCII K1128 containing BCD value: 12
not checked 1128
Number of Bytes Constant range: V-memory
Convert BCD (HEX) ASCII K14
location
containing BCD value:
13
checked 14
Destination Base
Address
All Vmemory 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-219


Chapter 5: Standard RLL Instructions - ASCII

ASCII Compare (CMPV)


The ASCII Compare instruction compares two
1 DS
HPP
Used
N/A
groups of Vmemory registers. The CMPV
will compare any data type (ASCII to ASCII,
2 BCD to BCD, etc.) of one series (group) of
Vmemory registers to another series of V
memory registers for a specified byte length.
3 Compare from Starting Address: specifies
the beginning Vmemory register of the first
4 group of Vmemory registers to be compared
SP61 = 1, the result is equal
SP61 = 0, the result is not equal
from.
5 Compare to Starting Address: specifies the beginning Vmemory register of the second
group of Vmemory registers to be compared to.
6 Number of Bytes: specifies the length of each Vmemory group to be compared

7
8 Parameter DL06 Range
Compare from Starting Address All Vmemory
9 Compare to Starting Address All Vmemory
Number of Bytes K0127
10 CMPV Example

11 The CMPV instruction executes when the AIN instruction is complete. If the compared V
memory tables are equal, SP61 will turn ON.

12
13
AIN Complete

C1
CMPV

14 "Compare from" Starting Address: V2001


"Compare to" Starting Address: V10001
Number of Bytes: K32

A
Strings are equal

B SP61 C11
OUT

C
D

5-220 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII
ASCII Print to Vmemory (VPRINT)
The ASCII Print to Vmemory
instruction will write a specified ASCII
DS
HPP
Used
N/A
string into a series of Vmemory
registers. Other features include Byte
1
Swap, options to suppress or convert
leading zeros or spaces, and _Date and 2
_Time options for U.S., European, and
Asian date formats and 12 or 24 hour
time formats.
3
B yte Swap: swaps the highbyte and
lowbyte within each Vmemory
4
register the ASCII string is printed to.
See the SWAPB instruction for details. 5
P rint to Starting Vmemory Address:
specifies the beginning of a series of 6
Vmemory addresses where the ASCII
string will be placed by the VPRINT
instruction.
7
S tarting Vmemory Address: the
first Vmemory register of the series
8
of registers specified will contain the
ASCII strings length in bytes. 9
S tarting Vmemory Address +1: the
2nd and subsequent registers will 10
contain the ASCII string printed to Vmemory.
VPRINT Time/Date Stamping the codes in the table below can be used in the VPRINT 11
Parameter DL06 Range
Print to Starting Vmemory Address All Vmemory 12
13
ASCII string message to print to Vmemory the current time and/or date.
14
# Character code Date / Time Stamp Options
1 _date:us American standard (month/day/2 digit year) A
2 _date:e European standard (day/month/2 digit year)
3
4
_date:a
_time:12
Asian standard (2 digit year/month/day)
standard 12 hour clock (012 hour:min am/pm)
B
5 _time:24 standard 24 hour clock (023 hour:min am/pm)
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-221


Chapter 5: Standard RLL Instructions - ASCII
VPRINT V-memory element the following modifiers can be used in the VPRINT ASCII
string message to print to Vmemory register contents in integer format or real format. Use
V-memory number or V-memory number with : and data type. The data types are shown in
1 the table below. The Character code must be capital letters.

2 NOTE: There must be a space entered before and after the V-memory address to separate it from the
text string. Failure to do this will result in an error code 499.

3 # Character code Description


1 none 16-bit binary (decimal number)
4 2
3
:B
:D
4 digit BCD
32-bit binary (decimal number)

5 4
5
:DB
:R
8 digit BCD
Floating point number (real number)
6 :E Floating point number (real number with exponent)
6 Examples:
V2000 Print binary data in V2000 for decimal number
7 V2000 : B Print BCD data in V2000

8 V2000 : D Print binary number in V2000 and V2001 for decimal number
V2000 : D B Print BCD data in V2000 and V2001
9 V2000 : R Print floating point number in V2000/V2001 as real number
V2000 : E Print floating point number in V2000/V2001 as real number with exponent
10 The following modifiers can be added to any of the modifies above to suppress or convert
leading zeros or spaces. The character code must be capital letters.
11 #
1
Character code
S Suppresses leading spaces
Description

12 2
3
C0
0
Converts leading spaces to zeros
Suppresses leading zeros

13 Example with V2000 = 0018 (binary format)


Vmemory Register Number of Characters
14 with Modifier 1 2 3 4
V2000 0 0 1 8

A V2000:B
V2000:B0
0
1
0
2
1 2

B Example with V2000 = sp sp18 (binary format) where sp = space


Vmemory Register Number of Characters
C with Modifier 1 2 3 4
V2000 sp sp 1 8

D V2000:B
V2000:BS
sp
1
sp
2
1 2

V2000:BC0 0 0 1 2

5-222 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII
VPRINT V-memory text element the following is used for printing to Vmemory text
stored in registers. Use the % followed by the number of characters after V-memory number
for representing the text. If you assign 0 as the number of characters, the function will read
the character count from the first location. Then it will start at the next V-memory location 1
and read that number of ASCII codes for the text from memory.
Example: 2
V2000 % 16 16 characters in V2000 to V2007 are printed.
V2000 % 0 The characters in V2001 to Vxxxx (determined by the number in V2000) will be 3
printed.
VPRINT Bit element the following is used for printing to Vmemory the state of the 4
designated bit in V-memory or a control relay bit. The bit element can be assigned by the
designating point (.) and bit number preceded by the V-memory number or relay number. 5
The output type is described as shown in the table below.

# Data format Description


6
1
2
none
: BOOL
Print 1 for an ON state, and 0 for an OFF state
Print TRUE for an ON state, and FALSE for an OFF state
7
3 : ONOFF Print ON for an ON state, and OFF for an OFF state
8
Example:
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format 9
C100 Prints the status of C100 in 1/0 format
C100 : BOOL Prints the status of C100 in TRUE/FALSE format 10
C100 : ON/OFF Prints the status of C100 in ON/OFF format
V2000.15 : BOOL Prints the status of bit 15 in V2000 in TRUE/FALSE format 11
The maximum numbers of characters you can VPRINT is 128. The number of characters
required for each element, regardless of whether the :S, :C0 or :0 modifiers are used, is listed 12
in the table below.

Maximum
13
Element type Characters
Text, 1 character 1 14
16 bit binary 6
32 bit binary
4 digit BCD
11
4
A
8 digit BCD 8
Floating point (real number) 3 B
Floating point (real with exponent) 13
V-memory/text
Bit (1/0 format)
2
1
C
Bit (TRUE/FALSE format) 5
Bit (ON/OFF format) 3 D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-223


Chapter 5: Standard RLL Instructions - ASCII

Text element the following is used for printing to Vmemory character strings. The
character strings are defined as the character (more than 0) ranged by the double quotation
1 marks. Two hex numbers preceded by the dollar sign means an 8-bit ASCII character code.
Also, two characters preceded by the dollar sign is interpreted according to the following
2 table:

# Character code Description


3 1 $$ Dollar sign ($)
2 $ Double quotation ()

4 3
4
$Lor $l
$N or $n
Line feed (LF)
Carriage return line feed (CRLF)
5 $P or $p Form feed
5 6 $R or $r Carriage return (CR)
7 $T or $t Tab

6
The following examples show various syntax conventions and the length of the output to the
7 printer.

Length 0 without character


8 A Length 1 with character A
Length 1 with blank
9 $
$R$L
Length 1 with double quotation mark
Length 2 with one CR and one LF

10 $0D$0A
$$
Length 2 with one CR and one LF
Length 1 with one $ mark

11 In printing an ordinary line of text, you will need to include double quotation marks before
and after the text string. Error code 499 will occur in the CPU when the print instruction
12 contains invalid text or no quotations. It is important to test your VPRINT instruction data
during the application development.

13
14
A
B
C
D

5-224 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

1
VPRINT Example Combined with PRINTV Instruction
2
3
The VPRINT instruction is used to create a string in Vmemory. The PRINTV is used to print the string out
of port 2.

28
Create String Permissive
C12 VPRINT
Byte Swap: All
4
"Print to" Address V4000

"STX" V3000:B"$0D" 5
Delay permissive for

C13
VPRINT 6
SET
Delay permissive for
VPRINT
C13 TMR
7
29
Delay for VPRINT
to complete
8
T1

K10
9
Delay for Vprint to

30
complete
T1 PRINTV
Port Number: K2
10
Start Address: V4001
Number of Bytes:
Append:
Byte Swap:
V4000
None
None
11
Busy:
Complete:
C15
C16 12
Delay Permissive for
C13
VPRINT

RST
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-225


Chapter 5: Standard RLL Instructions - ASCII

ASCII Print from Vmemory (PRINTV)


DS Used The ASCII Print from Vmemory instruction will send an ASCII string out of the designated
1 HPP N/A communications port from a specified series of Vmemory registers for a specified length in
number of bytes. Other features include user specified Append Characters to be placed after
the desired data string for devices that require specific termination character(s), Byte Swap
2 options, and user specified flags for Busy and Complete.
P ort Number: must be DL06 port 2 (K2)
3 S tart Address: specifies the beginning of
series of Vmemory registers that contain
4 the ASCII string to print
N umber of Bytes: specifies the length of
5 the string to print
A ppend Characters: specifies ASCII
6 characters to be added to the end of the
string for devices that require specific
termination characters
7 B yte Swap: swaps the highbyte
and lowbyte within each V
8 memory register of the string while
printing. See the SWAPB instruction for
9 details.
Busy Bit: will be ON while the instruction is
10 C
printing ASCII data
 omplete Bit: will be set
11 once the ASCII data has been printed
and reset when the PRINTV instruction
permissive bits are disabled.
12 See the previous page for an example using the PRINTV instruction.

13 Parameter DL06 Range


Port Number port 2 (K2)
14 Start Address All Vmemory
Number of Bytes All Vmemory or k1128

A Bits: Busy, Complete C03777

B
C
D

5-226 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions - ASCII

ASCII Swap Bytes (SWAPB)


The ASCII Swap Bytes instruction swaps byte positions (highbyte to lowbyte and low
DS
HPP
Used
N/A byte to highbyte) within each Vmemory register of a series of Vmemory registers for a 1
specified number of bytes.
Starting Address: specifies the beginning of a series
of Vmemory registers the instruction will use to
2
N
begin byte swapping
 umber of Bytes: specifies the number of bytes,
3
B
beginning with the Starting Address, to byte swap.
 yte Swap:
4
All - swap all bytes specified.
All but null - swap all bytes specified except the 5
bytes with a null

Parameter DL06 Range


6
Starting Address
Number of Bytes
All Vmemory
All Vmemory or K1128 7
Discrete Bit Flags Description 8
SP53 On if the CPU cannot execute the instruction.
SP71 On when a value used by the instruction is invalid. 9
Byte

Byte Swap
No Byte Swapping High Low 10
(AIN, AEX, PRINTV, VPRINT)
Preferences
A B C D E xx
V2477
V2500 B
0005h
A
11
V2501
V2502
D
xx
C
E 12
Byte Swap All Byte
High Low
13
A B C D E xx
V2477
V2500 A
0005h
B
14
V2501
B A D C xx E V2502
C
E
D
xx
A
Byte Swap All but Null Byte B
High Low
A B C D E xx
V2477 0005h
C
V2500 B A
V2501 D C D
B A D C E xx V2502 xx E

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-227


Chapter 5: Standard RLL Instructions - ASCII

SWAPB Example
The AIN Complete bit is used to trigger the SWAPB instruction. Use a oneshot so the
1 SWAPB only executes once.

2
3
4
5 ASCII Clear Buffer (ACRB)
The ASCII Clear Buffer instruction will clear the ASCII receive buffer of the specified
6 DS Used
communications port number. Port Number: must be DL06 port 2 (K2)
HPP N/A
7
8
9
10 ACRB Example
The AIN Complete bit or the AIN diagnostic bits are used to clear the ASCII buffer.
11
12
13
14
A
B
C
D

5-228 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Standard RLL Instructions

1
2
3
4
5
6
7
This page intentionally left blank.
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-229


Chapter 5: Intelligent Box (IBox) Instructions

Intelligent Box (IBox) Instructions


The Intelligent Box Instructions (IBox) listed in this section are additional instructions
1 made available when using DirectSOFT to program your DL06 PLC (the DL06 CPU
requires firmware version v2.10 or later to use the new features in DirectSOFT). For more
2 information on DirectSOFT and to download a free demo version, please visit our Web site
at: www.automationdirect.com.
3 Analog Helper IBoxes
Instruction Ibox # Page
4 Analog Input / Output Combo Module Pointer Setup (ANLGCMB)
Analog Input Module Pointer Setup (ANLGIN)
IB-462
IB-460
5-232
5-234
Analog Output Module Pointer Setup (ANLGOUT) IB-461 5-236
5 Analog Scale 12 Bit BCD to BCD (ANSCL) IB-423 5-238
Analog Scale 12 Bit Binary to Binary (ANSCLB) IB-403 5-239
6 Filter Over Time - BCD (FILTER)
Filter Over Time - Binary (FILTERB)
IB-422
IB-402
5-240
5-242
Hi/Low Alarm - BCD (HILOAL) IB-421 5-244
7 Hi/Low Alarm - Binary (HILOALB) IB-401 5-246

8 Discrete Helper IBoxes


Instruction Ibox # Page
9 Off Delay Timer (OFFDTMR)
On Delay Timer (ONDTMR)
IB-302
IB-301
5-248
5-250
One Shot (ONESHOT) IB-303 5-252
10 Push On / Push Off Circuit (PONOFF) IB-300 5-253

11 Memory IBoxes
Instruction Ibox # Page
12 Move Single Word (MOVEW)
Move Double Word (MOVED)
IB-200
IB-201
5-254
5-255

13 Instruction
Math IBoxes
Ibox # Page
14 BCD to Real with Implied Decimal Point (BCDTOR)
Double BCD to Real with Implied Decimal Point (BCDTORD)
IB-560
IB-562
5-256
5-257
Math - BCD (MATHBCD) IB-521 5-258
A Math - Binary (MATHBIN)
Math - Real (MATHR)
IB-501
IB-541
5-260
5-262

B Real to BCD with Implied Decimal Point and Rounding (RTOBCD)


Real to Double BCD with Implied Decimal Point and Rounding (RTOBCDD)
IB-561
IB-563
5-263
5-264
Square BCD (SQUARE) IB-523 5-265
C Square Binary (SQUAREB) IB-503 5-266
Square Real(SQUARER) IB-543 5-267

D Sum BCD Numbers (SUMBCD)


Sum Binary Numbers (SUMBIN)
IB-522
IB-502
5-268
5-269
Sum Real Numbers (SUMR) IB-542 5-270

5-230 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Communication IBoxes
Instruction Ibox # Page
1
ECOM100 Configuration (ECOM100)
ECOM100 Disable DHCP (ECDHCPD)
IB-710
IB-736
5-272
5-274 2
ECOM100 Enable DHCP (ECDHCPE) IB-735 5-276
ECOM100 Query DHCP Setting (ECDHCPQ)
ECOM100 Send E-mail (ECEMAIL)
IB-734
IB-711
5-278
5-280
3
ECOM100 Restore Default E-mail Setup (ECEMRDS)
ECOM100 E-mail Setup (ECEMSUP)
IB-713
IB-712
5-283
5-286
4
ECOM100 IP Setup (ECIPSUP) IB-717 5-290
ECOM100 Read Description (ECRDDES)
ECOM100 Read Gateway Address (ECRDGWA)
IB-726
IB-730
5-292
5-294
5
ECOM100 Read IP Address (ECRDIP)
ECOM100 Read Module ID (ECRDMID)
IB-722
IB-720
5-296
5-298
6
ECOM100 Read Module Name (ECRDNAM) IB-724 5-300
ECOM100 Read Subnet Mask (ECRDSNM) IB-732 5-302 7
ECOM100 Write Description (ECWRDES) IB-727 5-304
ECOM100 Write Gateway Address (ECWRGWA)
ECOM100 Write IP Address (ECWRIP)
IB-731
IB-723
5-306
5-308
8
ECOM100 Write Module ID (ECWRMID) IB-721 5-310
ECOM100 Write Name (ECWRNAM) IB-725 5-312 9
ECOM100 Write Subnet Mask (ECWRSNM) IB-733 5-314
ECOM100 RX Network Read (ECRX)
ECOM100 WX Network Write(ECWX)
IB-740
IB-741
5-316
5-319
10
NETCFG Network Configuration (NETCFG) IB-700 5-322
Network RX Read (NETRX) IB-701 5-324 11
Network WX Write (NETWX) IB-702 5-327

Counter I/O IBoxes (Works with H0-CTRIO and H0-CTRIO2) 12


Instruction Ibox # Page
CTRIO Configuration (CTRIO) IB-1000 5-330 13
CTRIO Add Entry to End of Preset Table (CTRADPT) IB-1005 5-332
CTRIO Clear Preset Table (CTRCLRT)
CTRIO Edit Preset Table Entry (CTREDPT)
IB-1007
IB-1003
5-335
5-338
14
CTRIO Edit Preset Table Entry and Reload (CTREDRL) IB-1002 5-342
CTRIO Initialize Preset Table (CTRINPT) IB-1004 5-346 A
CTRIO Initialize Preset Table (CTRINTR) IB-1010 5-350
CTRIO Load Profile (CTRLDPR)
CTRIO Read Error (CTRRDER)
IB-1001
IB-1014
5-354
5-357
B
CTRIO Run to Limit Mode (CTRRTLM) IB-1011 5-359
CTRIO Run to Position Mode (CTRRTPM) IB-1012 5-362 C
CTRIO Velocity Mode (CTRVELO) IB-1013 5-365
CTRIO Write File to ROM (CTRWFTR) IB-1006 5-368 D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-231


Chapter 5: Intelligent Box (IBox) Instructions

Analog Input/Output Combo Module Pointer Setup (ANLGCMB) (IB-462)


The Analog Input/Output Combo Module Pointer Setup instruction generates the logic to
1 DS
HPP
Used
N/A configure the pointer method for an analog input/output combination module on the first
PLC scan following a Program to Run transition.
2 The ANLGCMB IBox instruction
determines the data format and Pointer
3 addresses based on the CPU type, the
Base# and the module Slot#.

4 The Input Data Address is the starting


location in user V-memory where the
analog input data values will be stored,
5 one location for each input channel
enabled.
6 The Output Data Address is the starting
location in user V-memory where the
7 analog output data values will be placed
by ladder code or external device, one location for each output channel enabled.
Since the IBox logic only executes on the first scan, the instruction cannot have any input logic.
8 ANLGCMB Parameters

9 Base # (K0-Local): must be 0 for DL06 PLC


Slot #: specifies which PLC option slot is occupied by the analog module (14)

10 Number of Input Channels: specifies the number of analog input channels to scan
Input Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the
binary format may be used for displaying data on some OI panels
11 Input Data Address: specifies the starting V-memory location that will be used to store the analog
input data
12 Number of Output Channels: specifies the number of analog output channels that will be used
Output Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or
13 Binary)
Output Data Address: specifies the starting V-memory location that will be used to source the
14 analog output data

A Parameter DL06 Range


Base # (K0-Local) K K0 (local base only)
B Slot # K K1-4
Number of Input Channels K K1-8

C Input Data Format (0-BCD 1-BIN)


Input Data Address
K
V
BCD: K0; Binary: K1
See DL06 V-memory map - Data Words
Number of Output Channels K K1-8
D Output Data Format (0-BCD 1-BIN) K BCD: K0; Binary: K1
Output Data Address V See DL06 V-memory map - Data Words

5-232 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ANLGCMB Example
In the following example, the ANLGCMB instruction is used to setup the pointer method
for an analog I/O combination module that is installed in option slot 2. Four input channels 1
are enabled and the analog data will be written to V2000 - V2003 in BCD format. Two
output channels are enabled and the analog values will be read from V2100 - V2101 in BCD
format.
2
3
4
Permissive contacts or input
5
logic cannot be used with this
instruction. 6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-233


Chapter 5: Intelligent Box (IBox) Instructions

Analog Input Module Pointer Setup (ANLGIN) (IB-460)


Analog Input Module Pointer Setup generates the logic to configure the pointer method for
1 DS
HPP
Used
N/A one analog input module on the first PLC scan following a Program to Run transition.
This IBox determines the data format and Pointer addresses based on the CPU type, the
2 Base#, and the Slot#.
The Input Data Address is the starting
3 location in user V-memory where the
analog input data values will be stored,
4 one location for each input channel
enabled.
Since this logic only executes on the first
5 scan, this IBox cannot have any input
logic.
6
ANLGIN Parameters
7 Base # (K0-Local): must be 0 for DL06 PLC
Slot #: specifies which PLC option slot is occupied by the analog module (14)
8 Number of Input Channels: specifies the number of input channels to scan
Input Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the
9 binary format may be used for displaying data on some OI panels
Input Data Address: specifies the starting V-memory location that will be used to store the analog
10 input data

11
Parameter DL06 Range
12 Base # (K0-Local)
Slot #
K
K
K0 (local base only)
K1-4

13 Number of Input Channels


Input Data Format (0-BCD 1-BIN)
K
K
K1-8
BCD: K0; Binary: K1
Input Data Address V See DL06 V-memory map - Data Words
14
A
B
C
D

5-234 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ANLGIN Example
In the following example, the ANLGIN instruction is used to setup the pointer method for
an analog input module that is installed in option slot 1. Eight input channels are enabled 1
and the analog data will be written to V2000 - V2007 in BCD format.
2
3
4
Permissive contacts or input logic
cannot be used with this instruction. 5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-235


Chapter 5: Intelligent Box (IBox) Instructions

Analog Output Module Pointer Setup (ANLGOUT) (IB-461)


Analog Output Module Pointer Setup generates the logic to configure the pointer method for
1 DS
HPP
Used
N/A one analog output module on the first PLC scan following a Program to Run transition.
This IBox determines the data format
2 and Pointer addresses based on the CPU
type, the Base#, and the Slot#.
3 The Output Data Address is the starting
location in user V-memory where the
4 analog output data values will be placed
by ladder code or external device, one
location for each output channel enabled.
5 Since this logic only executes on the first
scan, this IBox cannot have any input
6 logic.

7 ANLGOUT Parameters
Base # (K0-Local): must be 0 for DL06 PLC
8 Slot #: specifies which PLC option slot is occupied by the analog module (14)
Number of Output Channels: specifies the number of analog output channels that will be used
9 Output Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or
Binary)
10 Output Data Address: specifies the starting V-memory location that will be used to source the
analog output data

11
12 Parameter DL06 Range
Base # (K0-Local) K K0 (local base only)
13 Slot #
Number of Output Channels
K
K
K1-4
K1-8

14 Output Data Format (0-BCD 1-BIN)


Output Data Address
K
V
BCD: K0; Binary: K1
See DL06 V-memory map - Data Words

A
B
C
D

5-236 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ANLGOUT Example
In the following example, the ANLGOUT instruction is used to setup the pointer method
for an analog output module that is installed in option slot 3. Two output channels are 1
enabled and the analog data will be read from V2100 - V2101 in BCD format.
2
3
4
Permissive contacts or input logic cannot 5
be used with this instruction.
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-237


Chapter 5: Intelligent Box (IBox) Instructions
Analog Scale 12 Bit BCD to BCD (ANSCL) (IB-423)
DS Used Analog Scale 12 Bit BCD to BCD scales a 12 bit BCD analog value (0-4095 BCD) into
HPP N/A BCD engineering units. You specify the engineering unit high value (when raw is 4095), and
1 the engineering low value (when raw is 0), and the output V-Memory address you want the
to place the scaled engineering unit value. The
2 engineering units are generated as BCD and can
be the full range of 0 to 9999 (see ANSCLB -
Analog Scale 12 Bit Binary to Binary if your raw
3 units are in Binary format).
Note that this IBox only works with unipolar
4 unsigned raw values. It does NOT work with
bipolar or sign plus magnitude raw values.
5
ANSCL Parameters
6 Raw (0-4095 BCD): specifies the V-memory location of the unipolar unsigned raw 0-4095
unscaled value
7 High Engineering: specifies the high engineering value when the raw input is 4095
Low Engineering: specifies the low engineering value when the raw input is 0
8 Engineering (BCD): specifies the V-memory location where the scaled engineering BCD value will
be placed

9 ANSCL Example

10 Raw (0-4095 BCD)


Parameter
V,P
DL06 Range
See DL06 V-memory map - Data Words
High Engineering K K0-9999
11 Low Engineering K K0-9999
Engineering (BCD) V,P See DL06 V-memory map - Data Words
12 In the following example, the ANSCL instruction is used to scale a raw value (0-4095 BCD)
13 that is in V2000. The engineering scaling range is set 0-100 (low engineering value - high
engineering value). The scaled value will be placed in V2100 in BCD format.

14
A 1

B
C
D

5-238 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Analog Scale 12 Bit Binary to Binary (ANSCLB) (IB-403)


DS Used Analog Scale 12 Bit Binary to Binary scales a 12 bit binary analog value (0-4095 decimal)
HPP N/A into binary (decimal) engineering units. You specify the engineering unit high value (when
raw is 4095), and the engineering low value (when
1
raw is 0), and the output V-Memory address you
want to place the scaled engineering unit value. 2
The engineering units are generated as binary and
can be the full range of 0 to 65535 (see ANSCL
- Analog Scale 12 Bit BCD to BCD if your raw
3
units are in BCD format).
Note that this IBox only works with unipolar
4
unsigned raw values. It does NOT work with
bipolar, sign plus magnitude, or signed 2s complement raw values. 5
ANSCLB Parameters
6
Raw (12 bit binary): specifies the V-memory location of the unipolar unsigned raw decimal
unscaled value (12 bit binary = 0-4095 decimal) 7
High Engineering: specifies the high engineering value when the raw input is 4095 decimal
Low Engineering: specifies the low engineering value when the raw input is 0 decimal 8
Engineering (binary): specifies the V-memory location where the scaled engineering decimal value
will be placed 9
Parameter DL06 Range
Raw (12 bit binary) V,P See DL06 V-memory map - Data Words 10
High Engineering K K0-65535
Low Engineering
Engineering (binary)
K
V,P
K0-65535
See DL06 V-memory map - Data Words
11
12
ANSCLB Example
In the following example, the ANSCLB instruction is used to scale a raw value (0-4095
binary) that is in V2000. The engineering scaling range is set 0-1000 (low engineering value -
13
high engineering value). The scaled value will be placed in V2100 in binary format.
14
A
1 B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-239


Chapter 5: Intelligent Box (IBox) Instructions

Filter Over Time - BCD (FILTER) (IB-422)


Filter Over Time BCD will perform a first-order filter on the Raw Data on a defined time
1 DS
HPP
Used
N/A interval. The equation is:
New = Old + [(Raw - Old) / FDC]
2 where,
New: New Filtered Value
3 Old: Old Filtered Value
FDC: Filter Divisor Constant
4 Raw: Raw Data
The Filter Divisor Constant is an integer in the
5 range K1 to K100, such that if it equaled K1 then
no filtering would be done.
6 The rate at which the calculation is performed is specified by time in hundredths of a
second (0.01 seconds) as the Filter Freq Time parameter. Note that this Timer instruction is
7 embedded in the IBox and must NOT be used anywhere else in your program. Power flow
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
8 calculation a consistent starting point.

9 FILTER Parameters

10 Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction
Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed

11 Raw Data (BCD): specifies the V-memory location of the raw unfiltered BCD value
Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase
the smoothing effect of the filter. A value of 1 results with no filtering.
12 Filtered Value (BCD): specifies the V-memory location where the filtered BCD value will be placed

13
Parameter DL06 Range
14 Filter Frequency Timer
Filter Frequency Time (0.01 sec)
T
K
T0-377
K0-9999
Raw Data (BCD) V See DL06 V-memory map - Data Words
A Filter Divisor (1-100) K K1-100
Filtered Value (BCD) V See DL06 V-memory map - Data Words
B
C
D

5-240 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

FILTER Example
In the following example, the Filter instruction is used to filter a BCD value that is in V2000.
Timer(T0) is set to 0.5 sec, the rate at which the filter calculation will be performed. The 1
filter constant is set to 2. A larger value will increase the smoothing effect of the filter. A value
of 1 results with no filtering. The filtered value will be placed in V2100. 2
3
4
1
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-241


Chapter 5: Intelligent Box (IBox) Instructions

Filter Over Time - Binary (FILTERB) (IB-402)


Filter Over Time in Binary (decimal) will perform a first-order filter on the Raw Data on a
1 DS
HPP
Used
N/A
defined time interval. The equation is
New = Old + [(Raw - Old) / FDC] where
2 New: New Filtered Value

3 Old: Old Filtered Value


FDC: Filter Divisor Constant
4 Raw: Raw Data
The Filter Divisor Constant is an integer in the
5 range K1 to K100, such that if it equaled K1 then
no filtering would be done.
6 The rate at which the calculation is performed is specified by time in hundredths of a
second (0.01 seconds) as the Filter Freq Time parameter. Note that this Timer instruction is
7 embedded in the IBox and must NOT be used any other place in your program. Power flow
controls whether the calculation is enabled. If it is disabled, the Filter Value is not updated.
8 On the first scan from Program to Run mode, the Filter Value is initialized to 0 to give the
calculation a consistent starting point.

9
FILTERB Parameters
10 Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction
Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed
11 Raw Data (Binary): specifies the V-memory location of the raw unfiltered binary (decimal) value
Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase
12 the smoothing effect of the filter. A value of 1 results with no filtering.
Filtered Value (Binary): specifies the V-memory location where the filtered binary (decimal) value

13 will be placed

Parameter DL06 Range


14 Filter Frequency Timer T T0-377
Filter Frequency Time (0.01 sec) K K0-9999
A Raw Data (Binary)
Filter Divisor (1-100)
V
K
See DL06 V-memory map - Data Words
K1-100

B Filtered Value (Binary) V See DL06 V-memory map - Data Words

C
D

5-242 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

FILTERB Example
In the following example, the FILTERB instruction is used to filter a binary value that is in
V2000. Timer (T1) is set to 0.5 sec, the rate at which the filter calculation will be performed. 1
The filter constant is set to 3.0. A larger value will increase the smoothing effect of the filter.
A value of 1 results with no filtering. The filtered value will be placed in V2100 2
3
4
1
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-243


Chapter 5: Intelligent Box (IBox) Instructions

Hi/Low Alarm - BCD (HILOAL) (IB-421)


Hi/Low Alarm - BCD monitors a BCD value V-Memory location and sets four possible
1 DS
HPP
Used
N/A alarm states, High-High, High, Low, and Low-Low whenever the IBox has power flow. You
enter the alarm thresholds as constant K BCD values (K0-K9999) and/or BCD value
2 V-Memory locations.
You must ensure that threshold limits are valid, that
3 is HH >= H > L >= LL. Note that when the High-
High or Low-Low alarm condition is true, that the
4 High and Low alarms will also be set, respectively.
This means you may use the same threshold limit
5 and same alarm bit for the High-High and the High
alarms in case you only need one High alarm. Also
note that the boundary conditions are inclusive.
6 That is, if the Low boundary is K50, and the
Low-Low boundary is K10, and if the Monitoring
7 Value equals 10, then the Low Alarm AND the
Low-Low alarm will both be ON. If there is no power flow to the IBox, then all alarm bits
8 will be turned off regardless of the value of the Monitoring Value parameter.

9 HILOAL Parameters
Monitoring Value (BCD): specifies the V-memory location of the BCD value to be monitored
10 High-High Limit: V-memory location or constant specifies the high-high alarm limit
High-High Alarm: On when the high-high limit is reached
11 High Limit: V-memory location or constant specifies the high alarm limit
High Alarm: On when the high limit is reached
12 Low Limit: V-memory location or constant specifies the low alarm limit
Low Alarm: On when the low limit is reached
13 Low-Low Limit: V-memory location or constant specifies the low-low alarm limit
Low-Low Alarm: On when the low-low limit is reached
14
A Parameter
Monitoring Value (BCD) V
DL06 Range
See DL06 V-memory map - Data Words
High-High Limit V, K K0-9999; or see DL06 V-memory map - Data Words
B High-High Alarm X, Y, C, GX,GY, B See DL06 V-memory map
High Limit V, K K0-9999; or see DL06 V-memory map - Data Words
C High Alarm
Low Limit
X, Y, C, GX,GY, B
V, K
See DL06 V-memory map
K0-9999; or see DL06 V-memory map - Data Words

D Low Alarm
Low-Low Limit
X, Y, C, GX,GY,B
V, K
See DL06 V-memory map
K0-9999; or see DL06 V-memory map - Data Words
Low-Low Alarm X, Y, C, GX,GY, B See DL06 V-memory map

5-244 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

HILOAL Example
In the following example, the HILOAL instruction is used to monitor a BCD value that is
in V2000. If the value in V2000 meets/exceeds the high limit of K900, C101 will turn on. If 1
the value continues to increase to meet/exceed the high-high limit, C100 will turn on. Both
bits would be on in this case. The high and high-high limits and alarms can be set to the same
value if one high limit or alarm is desired to be used.
2
If the value in V2000 meets or falls below the low limit of K200, C102 will turn on. If the
value continues to decrease to meet or fall below the low-low limit of K100, C103 will turn
3
on. Both bits would be on in this case. The low and low-low limits and alarms can be set to
the same value if one low limit or alarm is desired to be used. 4
5
1 6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-245


Chapter 5: Intelligent Box (IBox) Instructions

Hi/Low Alarm - Binary (HILOALB) (IB-401)


Hi/Low Alarm - Binary monitors a binary (decimal) V-Memory location and sets four
1 DS
HPP
Used
N/A possible alarm states, High-High, High, Low, and Low-Low whenever the IBox has power
flow. You enter the alarm thresholds as constant K decimal values (K0-K65535) and/or
2 binary (decimal) V-Memory locations.
You must ensure that threshold limits are valid,
3 that is HH >= H > L >= LL. Note that when the
High-High or Low-Low alarm condition is true,
4 that the High and Low alarms will also be set,
respectively. This means you may use the same
5 threshold limit and same alarm bit for the High-
High and the High alarms in case you only need
one High alarm. Also note that the boundary
6 conditions are inclusive. That is, if the Low
boundary is K50, and the Low-Low boundary
7 is K10, and if the Monitoring Value equals 10,
then the Low Alarm AND the Low-Low alarm will both be ON. If there is no power flow to
8 the IBox, then all alarm bits will be turned off regardless of the value of the Monitoring Value
parameter.
9
HILOALB Parameters
10 Monitoring Value (Binary): specifies the V-memory location of the Binary value to be monitored
High-High Limit: V-memory location or constant specifies the high-high alarm limit
11 High-High Alarm: On when the high-high limit is reached
High Limit: V-memory location or constant specifies the high alarm limit
12 High Alarm: On when the high limit is reached
Low Limit: V-memory location or constant specifies the low alarm limit
13 Low Alarm: On when the low limit is reached
Low-Low Limit: V-memory location or constant specifies the low-low alarm limit
14 Low-Low Alarm: On when the low-low limit is reached

A Parameter
Monitoring Value (Binary) V
DL06 Range
See DL06 V-memory map - Data Words
High-High Limit V, K K0-65535; or see DL06 V-memory map - Data Words
B High-High Alarm X, Y, C, GX,GY, B See DL06 V-memory map
High Limit V, K K0-65535; or see DL06 V-memory map - Data Words

C High Alarm
Low Limit
X, Y, C, GX,GY, B
V, K
See DL06 V-memory map
K0-65535; or see DL06 V-memory map - Data Words
Low Alarm X, Y, C, GX,GY,B See DL06 V-memory map
D Low-Low Limit V, K K0-65535; or see DL06 V-memory map - Data Words
Low-Low Alarm X, Y, C, GX,GY, B See DL06 V-memory map

5-246 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

HILOALB Example
In the following example, the HILOALB instruction is used to monitor a binary value that is
in V2000. If the value in V2000 meets/exceeds the high limit of the binary value in V2011, 1
C101 will turn on. If the value continues to increase to meet/exceed the high-high limit value
in V2010, C100 will turn on. Both bits would be on in this case. The high and high-high
limits and alarms can be set to the same V-memory location/value if one high limit or
2
alarm is desired to be used.
If the value in V2000 meets or falls below the low limit of the binary value in V2012, C102
3
will turn on. If the value continues to decrease to meet or fall below the low-low limit in
V2013, C103 will turn on. Both bits would be on in this case. The low and low-low limits 4
and alarms can be set to the same V-memory location/value if one low limit or alarm is
desired to be used. 5
6
1
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-247


Chapter 5: Intelligent Box (IBox) Instructions

Off Delay Timer (OFFDTMR) (IB-302)


Off Delay Timer will delay the turning off of the Output parameter by the specified Off
1 DS
HPP
Used
N/A Delay Time (in hundredths of a second) based on the power flow into the IBox. Once the
IBox receives power, the Output bit will turn on
2 immediately. When the power flow to the IBox
turns off, the Output bit WILL REMAIN ON
for the specified amount of time (in hundredths
3 of a second). Once the Off Delay Time has
expired, the output will turn Off. If the power
4 flow to the IBox comes back on BEFORE the
Off Delay Time, then the timer is RESET and
5 the Output will remain On - so you must continuously have NO power flow to the IBox for
AT LEAST the specified Off Delay Time before the Output will turn Off.
This IBox utilizes a Timer resource (TMRF), which cannot be used anywhere else in your
6 program.

7 OFFDTMR Parameters

8 Timer Number: specifies the Timer(TMRF) number which is used by the OFFDTMR instruction
Off Delay Time (0.01sec): specifies how long the Output will remain on once power flow to the
Ibox is removed
9 Output: specifies the output that will be delayed turning off by the Off Delay Time.

10
11 Timer Number
Parameter
T
DL06 Range
T0-377
Off Delay Time K,V K0-9999; See DL06 V-memory map - Data Words
12 Output X, Y, C, GX,GY, B See DL06 V-memory map

13
14
A
B
C
D

5-248 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

OFFDTMR Example
In the following example, the OFFDTMR instruction is used to delay the turning offof
output C20. Timer 2 (T2) is set to 5 seconds, the off-delay period. 1
When C100 turns on, C20 turns on and will remain on while C100 is on. When C100 turns
off, C20 will remain for the specified Off Delay Time (5s), and then turn off. 2
3
4
5
6
7
8
9
Example timing diagram
10
C100 11
5 sec 5 sec

C20
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-249


Chapter 5: Intelligent Box (IBox) Instructions

On Delay Timer (ONDTMR) (IB-301)


On Delay Timer will delay the turning on of the Output parameter by the specified
1 DS
HPP
Used
N/A amount of time (in hundredths of a second) based on the power flow into the IBox. Once
the IBox loses power, the Output is turned
2 off immediately. If the power flow turns off
BEFORE the On Delay Time, then the timer
is RESET and the Output is never turned on,
3 so you must have continuous power flow to the
IBox for at least the specified On Delay Time
4 before the Output turns On.
This IBox utilizes a Timer resource (TMRF),
5 which cannot be used anywhere else in your program.

6 ONDTMR Parameters
Timer Number: specifies the Timer(TMRF) number which is used by the ONDTMR instruction
7 On Delay Time (0.01sec): specifies how long the Output will remain off once power flow to the
Ibox is applied.

8 Output: specifies the output that will be delayed turning on by the On Delay Time.

9
Parameter DL06 Range
10 Timer Number
On Delay Time K,V
T T0-377
K0-9999; See DL06 V-memory map - Data Words

11 Output X, Y, C, GX,GY, B See DL06 V-memory map

12
13
14
A
B
C
D

5-250 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ONDTMR Example
In the following example, the ONDTMR instruction is used to delay the turning on of
output C21. Timer 1 (T1) is set to 2 seconds, the on-delay period. 1
When C101 turns on, C21 is delayed turning on by 2 seconds. When C101 turns off, C21
turns off immediately. 2
3
4
5
6
7
8
9
Example timing diagram
10
C101
11
2 sec 2 sec
12
C21

13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-251


Chapter 5: Intelligent Box (IBox) Instructions

One Shot (ONESHOT) (IB-303)


One Shot will turn on the given bit output parameter for one scan on an OFF to ON
1 DS
HPP
Used
N/A
transition of the power flow into the IBox. This IBox is simply a different name for the PD
Coil (Positive Differential).
2
ONESHOT Parameters
3 Discrete Output: specifies the output that will
be on for one scan
4
5 Parameter DL06 Range
6 Discrete Output X, Y, C See DL06 V-memory map

7 ONESHOT Example
In the following example, the ONESHOT instruction is used to turn C100 on for one PLC
scan after C0 goes from an off to on transition. The input logic must produce an off to on
8 transition to execute the One Shot instruction.

9
10
11
12
13 Example timing diagram

C0
14 Scan time

A C100

B
C
D

5-252 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Push On / Push Off Circuit (PONOFF) (IB-300)


Push On/Push Off Circuit toggles an output state whenever its input power flow transitions
DS
HPP
Used
N/A
from off to on. Requires an extra bit parameter for scan-to-scan state information. This extra 1
bit must NOT be used anywhere else in the program. This is also known as a flip-flop
circuit. The PONOFF IBox cannot have any input logic. 2
PONOFF Parameters 3
Discrete Input: specifies the input that will toggle
the specified output
Discrete Output: specifies the output that will be
4
turned on/off or toggled
Internal State: specifies a work bit that is used by
5
the instruction
6
Parameter DL06 Range 7
Discrete Input X,Y,C,S,T,CT,GX,GY,SP,B,PB See DL06 V-memory map
Discrete Output
Internal State
X,Y,C,GX,GY,B
X, Y, C
See DL06 V-memory map
See DL06 V-memory map
8
9
PONOFF Example
In the following example, the PONOFF instruction is used to control the on and off states
of the output C20 with a single input C10. When C10 is pressed once, C20 turns on. When
10
C10 is pressed again, C20 turns off. C100 is an internal bit used by the instruction.
11
12
13
Permissive contacts or input logic are not
used with this instruction. 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-253


Chapter 5: Intelligent Box (IBox) Instructions

Move Single Word (MOVEW) (IB-200)


Move Single Word moves (copies) a word to a memory location directly or indirectly via a
1 DS
HPP
Used
N/A pointer, either as a HEX constant, from a memory location, or indirectly through a pointer

2 MOVEW Parameters
From WORD: specifies the word that will be
3 moved to another location
To WORD: specifies the location where the
4 From WORD will be move to

5
6 Parameter DL06 Range
From WORD V,P,K K0-FFFF; See DL06 V-memory map - Data Words
7 To WORD V,P See DL06 V-memory map - Data Words

8
9
MOVEW Example
10 In the following example, the MOVEW instruction is used to move 16-bits of data from
V2000 to V3000 when C100 turns on.
11
12
13
14
A
B
C
D

5-254 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Move Double Word (MOVED) (IB-201)


Move Double Word moves (copies) a double word to two consecutive memory locations
DS
HPP
Used
N/A directly or indirectly via a pointer, either as a double HEX constant, from a double memory 1
location, or indirectly through a pointer to a double memory location.
2
MOVED Parameters
From DWORD: specifies the double word that 3
will be moved to another location
To DWORD: specifies the location where the
From DWORD will be move to
4
5
Parameter DL06 Range 6
From DWORD V,P,K K0-FFFFFFFF; See DL06 V-memory map - Data Words
To DWORD V,P See DL06 V-memory map - Data Words 7
8
MOVED Example
In the following example, the MOVED instruction is used to move 32-bits of data from
V2000 and V2001 to V3000 and V3001 when C100 turns on.
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-255


Chapter 5: Intelligent Box (IBox) Instructions

BCD to Real with Implied Decimal Point (BCDTOR) (IB-560)


BCD to Real with Implied Decimal Point converts the given 4 digit WORD BCD value
1 DS
HPP
Used
N/A to a Real number, with the implied number of
decimal points (K0-K4).
2 For example, BCDTOR K1234 with an implied
number of decimal points equal to K1, would
3 yield R123.4

4
BCDTOR Parameters
5 Value (WORD BCD): specifies the word or constant that will be converted to a Real number
Number of Decimal Points: specifies the number of implied decimal points in the Result DWORD
6 Result (DWORD REAL): specifies the location where the Real number will be placed

7 Parameter DL06 Range


Value (WORD BCD) V,P,K K0-9999; See DL06 V-memory map - Data Words
8 Number of Decimal Points
Result (DWORD REAL)
K
V
K0-4
See DL06 V-memory map - Data Words

9
BCDTOR Example
10 In the following example, the BCDTOR instruction is used to convert the 16-bit data in
V2000 from a 4-digit BCD data format to a 32-bit REAL (floating point) data format and
11 stored into V3000 and V3001 when C100 turns on.
K2 in the Number of Decimal Points implies the data will have two digits to the right of the
12 decimal point.

13
14
A
B
C
D

5-256 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Double BCD to Real with Implied Decimal Point (BCDTORD) (IB-562)


Double BCD to Real with Implied Decimal Point converts the given 8 digit DWORD
DS
HPP
Used
N/A BCD value to a Real number, given an implied 1
number of decimal points (K0-K8).
For example, BCDTORD K12345678 with an 2
implied number of decimal points equal to K5,
would yield R123.45678
3
4
BCDTORD Parameters
Value (DWORD BCD): specifies the Dword or constant that will be converted to a Real number 5
Number of Decimal Points: specifies the number of implied decimal points in the Result DWORD
Result (DWORD REAL): specifies the location where the Real number will be placed 6
Parameter DL06 Range 7
Value (DWORD BCD) V,P,K K0-99999999; See DL06 V-memory map - Data Words
Number of Decimal Points
Result (DWORD REAL)
K
V
K0-8
See DL06 V-memory map - Data Words
8
9
BCDTORD Example
In the following example, the BCDTORD instruction is used to convert the 32-bit data in 10
V2000 from an 8-digit BCD data format to a 32-bit REAL (floating point) data format and
stored into V3000 and V3001 when C100 turns on.
K2 in the Number of Decimal Points implies the data will have two digits to the right of the
11
decimal point.
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-257


Chapter 5: Intelligent Box (IBox) Instructions

Math - BCD (MATHBCD) (IB-521)


DS Used Math - BCD Format lets you enter complex mathematical expressions like you would in
1 HPP N/A Visual Basic, Excel, or C++ to do complex calculations, nesting parentheses up to 4 levels
deep. In addition to + - * /, you can do Modulo (% aka
Remainder), Bit-wise And (&) Or (|) Xor (^), and some
2 BCD functions - Convert to BCD (BCD), Convert to
Binary (BIN), BCD Complement (BCDCPL), Convert
3 from Gray Code (GRAY), Invert Bits (INV), and BCD/
HEX to Seven Segment Display (SEG).
4 Example: ((V2000 + V2001) / (V2003 - K100)) *
GRAY(V3000 & K001F)

5 Every V-memory reference MUST be to a single word BCD formatted value. Intermediate
6 results can go up to 32 bit values, but as long as the final result fits in a 16 bit BCD word,
the calculation is valid. Typical example of this is scaling using multiply then divide, (V2000
* K1000) / K4095. The multiply term most likely will exceed 9999 but fits within 32 bits.
7 The divide operation will divide 4095 into the 32-bit accumulator, yielding a result that will
always fit in 16 bits.
8 You can reference binary V-memory values by using the BCD conversion function on a
V-Memory location but NOT an expression. That is BCD(V2000) is okay and will convert
9 V2000 from Binary to BCD, but BCD(V2000 + V3000) will add V2000 as BCD, to V3000
as BCD, then interpret the result as Binary and convert it to BCD - NOT GOOD.
Also, the final result is a 16 bit BCD number and so you could do BIN around the entire
10 operation to store the result as Binary.

11 MATHBCD Parameters

12 WORD Result: specifies the location where the BCD result of the mathematical expression will be
placed (result must fit into 16 bit single V-memory location)
Expression: specifies the mathematical expression to be executed and the result is stored in specified
13 WORD Result. Each V-memory location used in the expression must be in BCD format.

14 Parameter DL06 Range


WORD Result V See DL06 V-memory map - Data Words
A Expression Text

B
C
D

5-258 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

MATHBCD Example
In the following example, the MATHBCD instruction is used to calculate the math
expression which multiplies the BCD value in V1200 by 1000 then divides by 4095 and 1
loads the resulting value in V2000 when C100 turns on.
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. D 5-259


Chapter 5: Intelligent Box (IBox) Instructions

Math - Binary (MATHBIN) (IB-501)


Math - Binary Format lets you enter complex mathematical expressions like you would in
1 DS
HPP
Used
N/A Visual Basic, Excel, or C++ to do complex calculations, nesting parentheses up to 4 levels
deep. In addition to + - * /, you can do Modulo (% aka
2 Remainder), Shift Right (>>) and Shift Left (<<), Bit-
wise And (&) Or (|) Xor (^), and some binary functions
- Convert to BCD (BCD), Convert to Binary (BIN),
3 Decode Bits (DECO), Encode Bits (ENCO), Invert Bits
(INV), HEX to Seven Segment Display (SEG), and Sum
4 Bits (SUM).
Example: ((V2000 + V2001) / (V2003 - K10)) *
5 SUM(V3000 & K001F)

6 Every V-memory reference MUST be to a single word binary formatted value. Intermediate
results can go up to 32 bit values, but as long as the final result fits in a 16 bit binary word,
7 the calculation is valid. Typical example of this is scaling using multiply then divide, (V2000
* K1000) / K4095. The multiply term most likely will exceed 65535 but fits within 32 bits.
The divide operation will divide 4095 into the 32-bit accumulator, yielding a result that will
8 always fit in 16 bits.
You can reference BCD V-Memory values by using the BIN conversion function on a
9 V-memory location but NOT an expression. That is, BIN(V2000) is okay and will convert
V2000 from BCD to Binary, but BIN(V2000 + V3000) will add V2000 as Binary, to V3000
10 as Binary, then interpret the result as BCD and convert it to Binary - NOT GOOD.
Also, the final result is a 16 bit binary number and so you could do BCD around the entire
operation to store the result as BCD.
11
12 MATHBIN Parameters
WORD Result: specifies the location where the binary result of the mathematical expression will be
placed (result must fit into 16 bit single V-memory location)
13 Expression: specifies the mathematical expression to be executed and the result is stored in specified
WORD Result. Each V-memory location used in the expression must be in binary format.
14
A WORD Result
Parameter
V
DL06 Range
See DL06 V-memory map - Data Words

B Expression Text

C
D

5-260 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

MATHBIN Example
In the following example, the MATHBIN instruction is used to calculate the math expression
which multiplies the Binary value in V1200 by 1000 then divides by 4095 and loads the 1
resulting value in V2000 when C100 turns on.
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. D 5-261


Chapter 5: Intelligent Box (IBox) Instructions

Math - Real (MATHR) (IB-541)


Math - Real Format lets you enter complex mathematical expressions like you would
1 DS
HPP
Used
N/A in Visual Basic, Excel, or C++ to do complex calculations, nesting parentheses up
to 4 levels deep. In addition to + - * /, you can
2 do Bit-wise And (&) Or (|) Xor (^), and many
Real functions - Arc Cosine (ACOSR), Arc
Sine (ASINR), Arc Tangent (ATANR), Cosine
3 (COSR), Convert Radians to Degrees (DEGR),
Invert Bits (INV), Convert Degrees to Radians
4 (RADR), HEX to Seven Segment Display (SEG),
Sine (SINR), Square Root (SQRTR), Tangent (TANR).
5 Example: ((V2000 + V2002) / (V2004 - R2.5)) *
SINR(RADR(V3000 / R10.0))

6 Every V-memory reference MUST be able to fit into a double word Real formatted value.

7 MATHR Parameters
DWORD Result: specifies the location where the Real result of the mathematical expression will be
8 placed (result must fit into a double word Real formatted location)
Expression: specifies the mathematical expression to be executed and the result is stored in specified
DWORD Result location. Each V-memory location used in the expression must be in Real format.
9
10 Parameter DL06 Range
DWORD Result V See DL06 V-memory map - Data Words
11 Expression Text

12
MATHR Example
13 In the following example, the MATHR instruction is used to calculate the math expression
which multiplies the REAL (floating point) value in V1200 by 10.5 then divides by 2.7 and
14 loads the resulting 32-bit value in V2000 and V2001 when C100 turns on.

A
B
C
D

5-262 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Real to BCD with Implied Decimal Point and Rounding (RTOBCD) (IB-561)
Real to BCD with Implied Decimal Point and Rounding converts the absolute value of
DS
HPP
Used
N/A the given Real number to a 4 digit BCD number, compensating for an implied number of 1
decimal points (K0-K4) and performs rounding.
For example, RTOBCD R56.74 with an implied 2
number of decimal points equal to K1, would
yield 567 BCD. If the implied number of decimal
points was 0, then the function would yield 57
3
BCD (note that it rounded up).
If the Real number is negative, the Result will 4
equal its positive, absolute value.
5
RTOBCD Parameters
Value (DWORD Real): specifies the Real Dword location or number that will be converted and
6
rounded to a BCD number with decimal points
Number of Decimal Points: specifies the number of implied decimal points in the Result WORD 7
Result (WORD BCD): specifies the location where the rounded/implied decimal points BCD value
will be placed 8
Parameter DL06 Range
9
Value (DWORD Real)
Number of Decimal Points
V,P,R
K
R ; See DL06 V-memory map - Data Words
K0-4 10
Result (WORD BCD) V See DL06 V-memory map - Data Words
11
RTOBCD Example
In the following example, the RTOBCD instruction is used to convert the 32-bit REAL
12
(floating point) data format in V3000 and V3001 to the 4-digit BCD data format and stored
in V2000 when C100 turns on. 13
14
A
B
K2 in the Number of Decimal Points implies the data will have two implied decimal points. C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-263


Chapter 5: Intelligent Box (IBox) Instructions

Real to Double BCD with Implied Decimal Point and Rounding (RTOBCDD)
1 DS
(IB-563)
Used Real to Double BCD with Implied Decimal
HPP N/A Point and Rounding converts the absolute value
2 of the given Real number to an 8 digit DWORD
BCD number, compensating for an implied
3 number of decimal points (K0-K8) and performs
rounding.
4 For example, RTOBCDD R38156.74 with an
implied number of decimal points equal to K1, would yield 381567 BCD. If the implied
number of decimal points was 0, then the function would yield 38157 BCD (note that it
5 rounded up).
If the Real number is negative, the Result will equal its positive, absolute value.
6
7 RTOBCDD Parameters
Value (DWORD Real): specifies the Dword Real number that will be converted and rounded to a
BCD number with decimal points
8 Number of Decimal Points: specifies the number of implied decimal points in the Result DWORD
Result (DWORD BCD): specifies the location where the rounded/implied decimal points
9 DWORD BCD value will be placed

Parameter DL06 Range


10 Value (DWORD Real) V,P,R R ; See DL06 V-memory map - Data Words
Number of Decimal Points K K0-8
11 Result (DWORD BCD) V See DL06 V-memory map - Data Words

12
13 RTOBCDD Example
In the following example, the RTOBCDD instruction is used to convert the 32-bit REAL
(floating point) data format in V3000 and V3001 to the 8-digit BCD data format and stored
14 in V2000 and V2001 when C100 turns on.
K2 in the Number of Decimal Points implies the data will have two implied decimal points.
A
B
C
D

5-264 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Square BCD (SQUARE) (IB-523)


Square BCD squares the given 4-digit WORD BCD number and writes it in as an 8-digit
DS
HPP
Used
N/A DWORD BCD result. 1
SQUARE Parameters 2
Value (WORD BCD): specifies the BCD Word
or constant that will be squared 3
Result (DWORD BCD): specifies the location
where the squared DWORD BCD value will be
placed
4
5
Parameter DL06 Range
Value (WORD BCD) V,P,K K0-9999 ; See DL06 V-memory map - Data Words 6
Result (DWORD BCD) V See DL06 V-memory map - Data Words
7
8
SQUARE Example
In the following example, the SQUARE instruction is used to square the 4-digit BCD value
9
in V2000 and store the 8-digit double word BCD result in V3000 and V3001 when C100
turns on. 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-265


Chapter 5: Intelligent Box (IBox) Instructions

Square Binary (SQUAREB) (IB-503)


Square Binary squares the given 16-bit WORD Binary number and writes it as a 32-bit
1 DS
HPP
Used
N/A DWORD Binary result.

2 SQUAREB Parameters
Value (WORD Binary): specifies the binary
3 Word or constant that will be squared
Result (DWORD Binary): specifies the location
4 where the squared DWORD binary value will be
placed

5
Parameter DL06 Range
6 Value (WORD Binary) V,P,K K0-65535; See DL06 V-memory map - Data Words
Result (DWORD Binary) V See DL06 V-memory map - Data Words
7
SQUAREB Example
8 In the following example, the SQUAREB instruction is used to square the single word Binary
value in V2000 and store the 8-digit double word Binary result in V3000 and V3001 when
9 C100 turns on.

10
11
12
13
14
A
B
C
D

5-266 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Square Real (SQUARER) (IB-543)


Square Real squares the given REAL DWORD number and writes it to a REAL DWORD
DS
HPP
Used
N/A result. 1
SQUARER Parameters 2
Value (REAL DWORD): specifies the Real
DWORD location or number that will be 3
squared
Result (REALDWORD): specifies the location
where the squared Real DWORD value will be
4
placed
5
Parameter DL06 Range
Value (REAL DWORD) V,P,R R ; See DL06 V-memory map - Data Words 6
Result (REAL DWORD) V See DL06 V-memory map - Data Words
7
SQUARER Example
8
In the following example, the SQUARER instruction is used to square the 32-bit floating
point REAL value in V2000 and V2001 and store the REAL value result in V3000 and 9
V3001 when C100 turns on.
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-267


Chapter 5: Intelligent Box (IBox) Instructions

Sum BCD Numbers (SUMBCD) (IB-522)


DS Used Sum BCD Numbers sums up a list of consecutive 4-digit WORD BCD numbers into an
1 HPP N/A 8-digit DWORD BCD result.
You specify the groups starting and ending V-
2 memory addresses (inclusive). When enabled,
this instruction will add up all the numbers
in the group (so you may want to place a
3 differential contact driving the enable).
SUMBCD could be used as the first part of
4 calculating an average.

5 SUMBCD Parameters
Start Address: specifies the starting address of a block of V-memory location values to be added
6 together (BCD)
End Addr (inclusive): specifies the ending address of a block of V-memory location values to be
7 added together (BCD)
Result (DWORD BCD): specifies the location where the sum of the block of V-memory BCD
8 values will be placed

9 Start Address
Parameter
V
DL06 Range
See DL06 V-memory map - Data Words

10 End Address (inclusive)


Result (DWORD BCD)
V
V
See DL06 V-memory map - Data Words
See DL06 V-memory map - Data Words

11
SUMBCD Example
12 In the following example, the SUMBCD instruction is used to total the sum of all BCD
values in words V2000 thru V2007 and store the resulting 8-digit double word BCD value in
13 V3000 and V3001 when C100 turns on.

14
A
B
C
D

5-268 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Sum Binary Numbers (SUMBIN) (IB-502)


Sum Binary Numbers sums up a list of consecutive 16-bit WORD Binary numbers into a
DS
HPP
Used
N/A 32-bit DWORD binary result. 1
You specify the groups starting and
ending V- memory addresses (inclusive). 2
When enabled, this instruction will
add up all the numbers in the group
(so you may want to place a differential
3
contact driving the enable).
SUMBIN could be used as the first part of 4
calculating an average.
5
SUMBIN Parameters
Start Address: specifies the starting address of a block of V-memory location values to be added
6
together (Binary)
End Addr (inclusive): specifies the ending address of a block of V-memory location values to be 7
added together (Binary)
Result (DWORD Binary): specifies the location where the sum of the block of V-memory binary
values will be placed
8
Parameter DL06 Range 9
Start Address V See DL06 V-memory map - Data Words
End Address (inclusive)
Result (DWORD Binary)
V
V
See DL06 V-memory map - Data Words
See DL06 V-memory map - Data Words
10
11
SUMBIN Example
In the following example, the SUMBIN instruction is used to total the sum of all Binary
12
values in words V2000 thru V2007 and store the resulting 8-digit double word Binary value
in V3000 and V3001 when C100 turns on. 13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-269


Chapter 5: Intelligent Box (IBox) Instructions

Sum Real Numbers (SUMR) (IB-542)


Sum Real Numbers sums up a list of consecutive REAL DWORD numbers into a REAL
1 DS
HPP
Used
N/A DWORD result.
You specify the groups starting and ending V-
2 memory addresses (inclusive).
Remember that Real numbers are DWORDs
3 and occupy 2 words of V-Memory each, so the
number of Real values summed up is equal to
4 half the number of memory locations. Note that
the End Address can be EITHER word of the 2
word ending address, for example, if you wanted to add the 4 Real numbers stored in V2000
5 thru V2007 (V2000, V2002, V2004, and V2006), you can specify V2006 OR V2007 for the
ending address and you will get the same result.
6 When enabled, this instruction will add up all the numbers in the group (so you may want to
place a differential contact driving the enable).
7 SUMR could be used as the first part of calculating an average.

8 SUMR Parameters
Start Address (DWORD): specifies the starting address of a block of V-memory location values to
9 be added together (Real)
End Addr (inclusive) (DWORD): specifies the ending address of a block of V-memory location
10 values to be added together (Real)
Result (DWORD): specifies the location where the sum of the block of V-memory Real values will

11 be placed

12 Parameter DL06 Range


Start Address (inclusive DWORD) V See DL06 V-memory map - Data Words
13 End Address (inclusive DWORD)
Result (DWORD)
V
V
See DL06 V-memory map - Data Words
See DL06 V-memory map - Data Words

14
A
B
C
D

5-270 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

SUMR Example
In the following example, the SUMR instruction is used to total the sum of all floating point
REAL number values in words V2000 thru V2007 and store the resulting 32-bit floating 1
point REAL number value in V3000 and V3001 when C100 turns on.
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. D 5-271


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Configuration (ECOM100) (IB-710)


1 DS Used ECOM100 Configuration defines the parameters other ECOM100 IBoxes will use when
working with this specific ECOM100 module. Each ECOM100 module that will be used
2 HPP N/A
with IBox instructions will require a unique
ECOM1000 Configuration instruction. The
3 addresses used become workspaces for the IBox
instruction to use. .

4 The addresses used in this instruction must not


be used elsewhere in the program.
The instructions must be placed at the top of
5 ladder, without a contact. The instruction will
inherently run only once, on the first scan.
6 IBoxes ECEMAIL, ECRX, ECIPSUP and others require an ECOM100 Configuration before
they will operate properly.
7 In order for MOST ECOM100 IBoxes to function, DIP switch 7 on the ECOM100 circuit
board must be ON DIP switch 7 can remainOFF if ECOM100 Network Read and Write
8 IBoxes (ECRX, ECWX) are the only IBoxes that will be used.

9 ECOM100 Configuration Parameters


ECOM100#: specify a logical number to be associated with this particular ECOM100 module. All
10 other ECxxxx IBoxes that need to reference this ECOM1000 module must reference this logical
number

11 Slot: specifies the option slot the module occupies


Status: specifies a V-memory location that will be used by the instruction

12 Workspace: specifies a V-memory location that will be used by the instruction


Msg Buffer: specifies the starting address of a 65 word buffer that will be used by the module for
configuration
13
14
A
Parameter DL06 Range
B ECOM100#
Slot
K
K
K0-255
K1-4
Status V See DL06 V-memory map - Data Words
C Workspace V See DL06 V-memory map - Data Words
Msg Buffer (65 words used) V See DL06 V-memory map - Data Words
D

5-272 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Example
The ECOM100 Config IBox coordinates all of the interaction with other ECOM100 based
IBoxes (ECxxxx). You must have an ECOM100 Config IBox for each ECOM100 module 1
in your system. Configuration IBoxes must be at the top of your program and must execute
every scan. 2
This IBox defines ECOM100# K0 to be in slot 3. Any ECOM100 IBoxes that need to
reference this specific module (such as ECEMAIL, ECRX, ...) would enter K0 for their
ECOM100# parameter.
3
The Status register is for reporting any completion or error information to other ECOM100
IBoxes. This V-Memory register must not be used anywhere else in the entire program. 4
The Workspace register is used to maintain state information about the ECOM100, along
with proper sharing and interlocking with the other ECOM100 IBoxes in the program. This 5
V-Memory register must not be used anywhere else in the entire program.
The Message Buffer of 65 words (130 bytes) is a common pool of memory that is used 6
by other ECOM100 IBoxes (such as ECEMAIL). This way, you can have a bunch of
ECEMAIL IBoxes, but only need 1 common buffer for generating and sending each EMail.
These V-Memory registers must not be used anywhere else in your entire program.
7
8
9
Permissive contacts or input logic cannot K0
10
be used with this instruction. K1
V400 11
V401
V402 - V502
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-273


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Disable DHCP (ECDHCPD) (IB-736)


ECOM100 Disable DHCP will setup the ECOM100 to use its internal TCP/IP
1 DS
HPP
Used
N/A settings on a leading edge transition to the IBox. To configure the ECOM100s TCP/
IP settings manually, use the NetEdit3 utility, or
2 you can do it programmatically from your PLC
program using the ECOM100 IP Setup (ECIPSUP),
or the individual ECOM100 IBoxes: ECOM Write
3 IP Address (ECWRIP), ECOM Write Gateway
Address (ECWRGWA), and ECOM100 Write
4 Subnet Mask (ECWRSNM).
The Workspace parameter is an internal, private
5 register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
anywhere else in your program.
6 Either the Success or Error bit parameter will turn on once the command is complete. If there
is an error, the Error Code parameter will report an ECOM100 error code (less than 100), or
7 a PLC logic error (greater than 1000).
The Disable DHCP setting is stored in Flash-ROM in the ECOM100 and the execution
8 of this IBox will disable the ECOM100 module for at least a half second until it writes the
Flash-ROM. Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox
9 ONCE, on first scan. Since it requires a LEADING edge to execute, use a NORMALLY
CLOSED SP0 (STR NOT First Scan) to drive the power flow to the IBox.

10 In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
ECOM100 circuit board.

11 ECDHCPD Parameters

12 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
13 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
14 Error: specifies a bit that will turn on if the instruction is not successfully completed
Error Code: specifies the location where the Error Code will be written
A
B ECOM100#
Parameter
K
DL06 Range
K0-255
Workspace V See DL06 V-memory map - Data Words
C Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map
D Error Code V See DL06 V-memory map - Data Words

5-274 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECDHCPD Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1 6
V400
V401
V402 - V502
7
8
Rung 2: On the 2nd scan, disable DHCP in the ECOM100. DHCP is the same protocol
used by PCs for using a DHCP Server to automatically assign the ECOM100s IP Address,
Gateway Address, and Subnet Mask. Typically disabling DHCP is done by assigning a hard-
9
coded IP Address either in NetEdit or using one of the ECOM100 IP Setup IBoxes, but
this IBox allows you to disable DHCP in the ECOM100 using your ladder program. The 10
ECDHCPD is leading edge triggered, not power-flow driven (similar to a counter input leg).
The command to disable DHCP will be sent to the ECOM100 whenever the power flow
into the IBox goes from OFF to ON. If successful, turn on C100. If there is a failure, turn on
11
C101. If it fails, you can look at V2000 for the specific error code.
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-275


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Enable DHCP (ECDHCPE) (IB-735)


ECOM100 Enable DHCP will tell the ECOM100 to obtain its TCP/IP setup from a DHCP
1 DS
HPP
Used
N/A Server on a leading edge transition to the IBox.
The IBox will be successful once the ECOM100
2 has received its TCP/IP settings from the DHCP
server. Since it is possible for the DHCP server to be
3 unavailable, a Timeout parameter is provided so that
the IBox can complete, but with an Error (Error Code =
1004 decimal).
4 See also the ECOM100 IP Setup (ECIPSUP) IBox
717 to directly setup ALL of the TCP/IP parameters
5 in a single instruction - IP Address, Subnet Mask, and
Gateway Address.
6 The Workspace parameter is an internal, private register used by this IBox and MUST BE
UNIQUE in this one instruction and MUST NOT be used anywhere else in your program.
7 Either the Success or Error bit parameter will turn on once the command is complete. If there
is an error, the Error Code parameter will report an ECOM100 error code (less than 100), or
a PLC logic error (greater than 1000).
8 The Enable DHCP setting is stored in Flash-ROM in the ECOM100 and the execution
of this IBox will disable the ECOM100 module for at least a half second until it writes the
9 Flash-ROM. Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox
ONCE, on first scan. Since it requires a LEADING edge to execute, use a NORMALLY
10 CLOSED SP0 (STR NOT First Scan) to drive the power flow to the IBox.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
11 ECOM100 circuit board.
ECDHCPE Parameters
12 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
13 Timeout(sec): specifies a timeout period so that the instruction may have time to complete
Workspace: specifies a V-memory location that will be used by the instruction
14 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
A Error Code: specifies the location where the Error Code will be written

B Parameter DL06 Range


ECOM100# K K0-255
C Timeout (sec) K K5-127
Workspace V See DL06 V-memory map - Data Words

D Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
Error Code V See DL06 V-memory map - Data Words

5-276 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECDHCPE Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
1
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific 2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
3
4
5
K0
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, enable DHCP in the ECOM100. DHCP is the same protocol
8
used by PCs for using a DHCP Server to automatically assign the ECOM100s IP Address,
Gateway Address, and Subnet Mask. Typically this is done using NetEdit, but this IBox 9
allows you to enable DHCP in the ECOM100 using your ladder program. The ECDHCPE
is leading edge triggered, not power-flow driven (similar to a counter input leg). The
commands to enable DHCP will be sent to the ECOM100 whenever the power flow into
10
the IBox goes from OFF to ON. The ECDHCPE does more than just set the bit to enable
DHCP in the ECOM100, but it then polls the ECOM100 once every second to see if the 11
ECOM100 has found a DHCP server and has a valid IP Address. Therefore, a timeout
parameter is needed in case the ECOM100 cannot find a DHCP server. If a timeout does
occur, the Error bit will turn on and the error code will be 1005 decimal. The Success bit will
12
turn on only if the ECOM100 finds a DHCP Server and is assigned a valid IP Address. If
successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at V2000 13
for the specific error code.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-277


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Query DHCP Setting (ECDHCPQ) (IB-734)


ECOM100 Query DHCP Setting will determine if DHCP is enabled in the ECOM100 on a
1 DS
HPP
Used
N/A leading edge transition to the IBox. The DHCP Enabled bit parameter will be ON if DHCP
is enabled, OFF if disabled.
2 The Workspace parameter is an internal, private
register used by this IBox and MUST BE
3 UNIQUE in this one instruction and MUST NOT
be used anywhere else in your program.

4 Either the Success or Error bit parameter will turn


on once the command is complete.
In order for this ECOM100 IBox to function, you
5 must turn ON dip switch 7 on the ECOM100
circuit board.
6
ECDHCPQ Parameters
7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
8 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the instruction is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
10 DHCP Enabled: specifies a bit that will turn on if the ECOM100s DHCP is enabled or remain
off if disabled - after instruction query, be sure to check the state of the Success/Error bit state along
with DHCP Enabled bit state to confirm a successful module query
11
12 ECOM100#
Parameter
K
DL06 Range
K0-255
Workspace V See DL06 V-memory map - Data Words
13 Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map
14 DHCP Enabled X,Y,C,GX,GY,B See DL06 V-memory map

A
B
C
D

5-278 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECDHCPQ Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, read whether DHCP is enabled or disabled in the ECOM100 8
and store it in C5. DHCP is the same protocol used by PCs for using a DHCP Server to
automatically assign the ECOM100s IP Address, Gateway Address, and Subnet Mask. The
ECDHCPQ is leading edge triggered, not power-flow driven (similar to a counter input
9
leg). The command to read (Query) whether DHCP is enabled or not will be sent to the
ECOM100 whenever the power flow into the IBox goes from OFF to ON. If successful, turn 10
on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-279


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Send E-mail (ECEMAIL) (IB-711)


ECOM100 Send EMail, on a leading edge transition, will behave as an EMail client and
1 DS
HPP
Used
N/A send an SMTP request to your SMTP Server to send the EMail message to the EMail
addresses in the To: field and also to those listed in the
2 Cc: list hard coded in the ECOM100. It will send the
SMTP request based on the specified ECOM100#, which
corresponds to a specific unique ECOM100 Configuration
3 (ECOM100) at the top of your program.
The Body: field supports what the PRINT and VPRINT
4 instructions support for text and embedded variables,
allowing you to embed real-time data in your EMail (e.g.
5 V2000 = V2000:B).
The Workspace parameter is an internal, private register
6 used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be
used anywhere else in your program.
Either the Success or Error bit parameter will turn on once the request is complete. If there is
7 an error, the Error Code parameter will report an ECOM100 error code (less than 100), an
SMPT protocol error (between 100 and 999), or a PLC logic error (greater than 1000).
8 Since the ECOM100 is only an EMail Client and requires access to an SMTP Server,
you MUST have the SMTP parameters configured properly in the ECOM100 via the
9 ECOM100s Home Page and/or the EMail Setup instruction (ECEMSUP). To get to the
ECOM100s Home Page, use your favorite Internet browser and browse to the ECOM100s
IP Address, e.g. http://192.168.12.86
10 You are limited to approximately 100 characters of message data for the entire instruction,
including the To: Subject: and Body: fields. To save space, the ECOM100 supports a hard
11 coded list of EMail addresses for the Carbon Copy field (cc:) so that you can configure those
in the ECOM100, and keep the To: field small (or even empty), to leave more room for the
12 Subject: and Body: fields.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
13 ECOM100 circuit board.
ECEMAIL Parameters
14 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
A Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
B Error: specifies a bit that will turn on if the instruction is not successfully completed
Error Code: specifies the location where the Error Code will be written
C To: specifies an E-mail address that the message will be sent to
Subject: subject of the e-mail message
D Body: supports what the PRINT and VPRINT instructions support for text and embedded
variables, allowing you to embed real-time data in the EMail message

5-280 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
1
Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
2
Error Code V See DL06 V-memory map
To: Text 3
Subject: Text
Body: See PRINT and VPRINT instructions
4
ECEMAIL Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
5
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to 6
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
7
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 8
9
K0
10
K1
V400 11
V401
V402 - V502
12
13
(example continued on next page)
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-281


Chapter 5: Intelligent Box (IBox) Instructions

ECEMAIL Example (contd)


Rung 2: When a machine goes down, send an email to Joe in maintenance and to the VP
1 over production showing what machine is down along with the date/time stamp of when it
went down.
2 The ECEMAIL is leading edge triggered, not power-flow driven (similar to a counter input
leg). An email will be sent whenever the power flow into the IBox goes from OFF to ON.
3 This helps prevent self inflicted spamming.
If the EMail is sent, turn on C100. If there is a failure, turn on C101. If it fails, you can look
4 at V2000 for the SMTP error code or other possible error codes.

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

5-282 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Restore Default E-mail Setup (ECEMRDS) (IB-713)


ECOM100 Restore Default EMail Setup, on a leading edge transition, will restore the
DS
HPP
Used
N/A original EMail Setup data stored in the ECOM100 back to the working copy based on 1
the specified ECOM100#, which corresponds
to a specific unique ECOM100 Configuration
(ECOM100) at the top of your program.
2
When the ECOM100 is first powered up, it copies
the EMail setup data stored in ROM to the working
3
copy in RAM. You can then modify this working
copy from your program using the ECOM100 4
EMail Setup (ECEMSUP) IBox. After modifying the
working copy, you can later restore the original setup
data via your program by using this IBox.
5
The Workspace parameter is an internal, private register used by this IBox and MUST BE
UNIQUE in this one instruction and MUST NOT be used anywhere else in your program. 6
Either the Success or Error bit parameter will turn on once the command is complete. If there
is an error, the Error Code parameter will report an ECOM100 error code (less than 100), or 7
a PLC logic error (greater than 1000).
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the 8
ECOM100 circuit board.
9
ECEMRDS Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the 10
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
11
Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
12
Error Code: specifies the location where the Error Code will be written 13
14
Parameter DL06 Range
ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
A
Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map B
Error Code V See DL06 V-memory map - Data Words
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-283


Chapter 5: Intelligent Box (IBox) Instructions

ECEMRDS Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
1 ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
2 move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
3 IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5 K0
K1
6 V400
V401

7 V402 - V502

8 Rung 2: Whenever an EStop is pushed, ensure that president of the company gets copies of
all EMails being sent.
9 The ECOM100 EMail Setup IBox allows you to set/change the SMTP EMail settings stored
in the ECOM100.
10
11
12
13
14
A
B
C
D (example continued on next page)

5-284 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECEMRDS Example (contd)


Rung 3: Once the EStop is pulled out, take the president off the cc: list by restoring the
default EMail setup in the ECOM100. 1
The ECEMRDS is leading edge triggered, not power-flow driven (similar to a counter input
leg). The ROM based EMail configuration stored in the ECOM100 will be copied over the 2
working copy whenever the power flow into the IBox goes from OFF to ON (the working
copy can be changed by using the ECEMSUP IBox).
If successful, turn on C102. If there is a failure, turn on C103. If it fails, you can look at
3
V2001 for the specific error code.
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-285


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 E-mail Setup (ECEMSUP) (IB-712)


ECOM100 EMail Setup, on a leading edge transition, will modify the working copy of
1 DS
HPP
Used
N/A
the EMail setup currently in the ECOM100 based on the specified ECOM100#, which
corresponds to a specific unique ECOM100 Configuration
2 (ECOM100) at the top of your program.
You may pick and choose any or all fields to be modified
3 using this instruction. Note that these changes are
cumulative: if you execute multiple ECOM100 EMail
Setup IBoxes, then all of the changes are made in the
4 order they are executed. Also note that you can restore
the original ECOM100 EMail Setup that is stored in the
5 ECOM100 to the working copy by using the ECOM100
Restore Default EMail Setup (ECEMRDS) IBox.

6 The Workspace parameter is an internal, private register used by this IBox and MUST BE
UNIQUE in this one instruction and MUST NOT be used anywhere else in your program.

7 Either the Success or Error bit parameter will turn on once the command is complete. If there
is an error, the Error Code parameter will report an ECOM100 error code (less than 100), or
a PLC logic error (greater than 1000).
8 You are limited to approximately 100 characters/bytes of setup data for the entire instruction.
So if needed, you could divide the entire setup across multiple ECEMSUP IBoxes on a field-
9 by-field basis, for example do the Carbon Copy (cc:) field in one ECEMSUP IBox and the
remaining setup parameters in another.
10 In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
ECOM100 circuit board.

11
ECEMSUP Parameters
12 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
13 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
14 Error: specifies a bit that will turn on if the instruction is not successfully completed

A Error Code: specifies the location where the Error Code will be written
SMTP Server IP Addr: optional parameter that specifies the IP Address of the SMTP Server on the
ECOM100s network
B Sender Name: optional parameter that specifies the sender name that will appear in the From:
field to those who receive the e-mail
C Sender EMail: optional parameter that specifies the sender EMail address that will appear in the
From: field to those who receive the e-mail

5-286 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECEMSUP Parameters (contd)


Port Number: optional parameter that specifies the TCP/IP Port Number to send SMTP requests;
usually this does not to be configured (see your network administrator for information on this
setting)
1
Timeout (sec): optional parameter that specifies the number of seconds to wait for the SMTP
Server to send the EMail to all the recipients
2
Cc: optional parameter that specifies a list of carbon copy Email addresses to send all EMails to
3
Parameter DL06 Range
ECOM100# K K0-255
4
Workspace V See DL06 V-memory map - Data Words
Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
5
Error Code V See DL06 V-memory map - Data Words
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-287


Chapter 5: Intelligent Box (IBox) Instructions

ECEMSUP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
1 ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
2 move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
3 IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
6 K1
V400
7 V401
V402 - V502

8
9 (example continued on next page)

10
11
12
13
14
A
B
C
D

5-288 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECEMSUP Example (contd)


Rung 2: Whenever an EStop is pushed, ensure that president of the company gets copies
of all EMails being sent.The ECOM100 EMail Setup IBox allows you to set/change the 1
SMTP EMail settings stored in the ECOM100. The ECEMSUP is leading edge triggered,
not power-flow driven (similar to a counter input leg). At power-up, the ROM based EMail
configuration stored in the ECOM100 is copied to a RAM based working copy. You can
2
change this working copy by using the ECEMSUP IBox. To restore the original ROM based
configuration, use the Restore Default EMail Setup ECEMRDS IBox. 3
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code. 4
5
6
7
8
9
10
Rung 3: Once the EStop is pulled out, take the president off the cc: list by restoring the
11
default EMail setup in the ECOM100.
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-289


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 IP Setup (ECIPSUP) (IB-717)


DS Used ECOM100 IP Setup will configure the three TCP/IP parameters in the ECOM100: IP
1 HPP N/A Address, Subnet Mask, and Gateway Address, on a leading edge transition to the IBox.
The ECOM100 is specified by the ECOM100#,
which corresponds to a specific unique ECOM100
2 Configuration (ECOM100) IBox at the top of your
program.
3 The Workspace parameter is an internal, private register
used by this IBox and MUST BE UNIQUE in this one
4 instruction and MUST NOT be used anywhere else in
your program.

5 Either the Success or Error bit parameter will turn on


once the command is complete. If there is an error, the
Error Code parameter will report an ECOM100 error
6 code (less than 100), or a PLC logic error (greater than 1000).
This setup data is stored in Flash-ROM in the ECOM100 and will disable the ECOM100
7 module for at least a half second until it writes the Flash-ROM. Therefore, it is HIGHLY
RECOMMENDED that you only execute this IBox ONCE on first scan. Since it requires
8 a LEADING edge to execute, use a NORMALLY CLOSED SP0 (NOT First Scan) to drive
the power flow to the IBox.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
9 ECOM100 circuit board.
ECIPSUP Parameters
10 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
11 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
12 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
13 Error Code: specifies the location where the Error Code will be written
IP Address: specifies the modules IP Address
14 Subnet Mask: specifies the Subnet Mask for the module to use
Gateway Address: specifies the Gateway Address for the module to use
A Parameter DL06 Range
B ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map
C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words

D IP Address
Subnet Mask Address
IP Address
IP Address Mask
0.0.0.1. to 255.255.255.254
0.0.0.1. to 255.255.255.254
Gateway Address IP Address 0.0.0.1. to 255.255.255.254

5-290 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECIPSUP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
6
V400
V401
V402 - V502
7
8
Rung 2: On the 2nd scan, configure all of the TCP/IP parameters in the ECOM100:
IP Address: 192.168. 12.100 9
Subnet Mask: 255.255. 0. 0
Gateway Address: 192.168. 0. 1
10
The ECIPSUP is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the TCP/IP configuration parameters will be sent to the
11
ECOM100 whenever the power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 12
V2000 for the specific error code.
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-291


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read Description (ECRDDES) (IB-726)


ECOM100 Read Description will read the ECOM100s Description field up to the number
1 DS
HPP
Used
N/A of specified characters on a leading edge transition to the IBox.
The Workspace parameter is an internal, private register
2 used by this IBox and MUST BE UNIQUE in this one
instruction and MUST NOT be used anywhere else in
3 your program.
Either the Success or Error bit parameter will turn on
4 once the command is complete.
In order for this ECOM100 IBox to function, you must
turn ON dip switch 7 on the ECOM100 circuit board.
5
6 ECRDDES Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the

7 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
8 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
9 Description: specifies the starting buffer location where the ECOM100s Module Name will be
placed
10 Num Char: specifies the number of characters (bytes) to read from the ECOM100s Description
field

11
12 Parameter DL06 Range
ECOM100# K K0-255
13 Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map

14 Error
Description
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Num Chars K K1-128
A
B
C
D

5-292 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDDES Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
6
V400
V401 7
V402 - V502
8
Rung 2: On the 2nd scan, read the Module Description of the ECOM100 and store it in
V3000 thru V3007 (16 characters). This text can be displayed by an HMI. 9
The ECRDDES is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the module description will be sent to the ECOM100 whenever 10
the power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-293


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read Gateway Address (ECRDGWA) (IB-730)


ECOM100 Read Gateway Address will read the 4 parts of the Gateway IP address and store
1 DS
HPP
Used
N/A them in 4 consecutive V-Memory locations in decimal format, on a leading edge transition to
the IBox.
2 The Workspace parameter is an internal, private
register used by this IBox and MUST BE
3 UNIQUE in this one instruction and MUST
NOT be used anywhere else in your program.

4 Either the Success or Error bit parameter will


turn on once the command is complete.
In order for this ECOM100 IBox to function,
5 you must turn ON dip switch 7 on the
ECOM100 circuit board.
6
ECRDGWA Parameters
7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
8 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
10 Gateway IP Addr: specifies the starting address where the ECOM100s Gateway Address will be
placed in 4 consecutive V-memory locations

11
Parameter DL06 Range
12 ECOM100# K K0-255
Workspace V See DL06 V-memory map - Data Words
13 Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map

14 Gateway IP Address (4 Words) V See DL06 V-memory map - Data Words

A
B
C
D

5-294 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDGWA Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, read the Gateway Address of the ECOM100 and store it in V3000 8
thru V3003 (4 decimal numbers). The ECOM100s Gateway Address could be displayed by
an HMI. 9
The ECRDGWA is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the Gateway Address will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-295


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read IP Address (ECRDIP) (IB-722)


ECOM100 Read IP Address will read the 4 parts of the IP address and store them in 4
1 DS
HPP
Used
N/A consecutive V-Memory locations in decimal format, on a leading edge transition to the IBox.
The Workspace parameter is an internal,
2 private register used by this IBox and MUST
BE UNIQUE in this one instruction and
3 MUST NOT be used anywhere else in your
program.

4 Either the Success or Error bit parameter will


turn on once the command is complete.
In order for this ECOM100 IBox to function,
5 you must turn ON dip switch 7 on the
ECOM100 circuit board.
6
ECRDIP Parameters
7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
8 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
10 IP Address: specifies the starting address where the ECOM100s IP Address will be placed in 4
consecutive V-memory locations

11 Parameter DL06 Range


12 ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map
13 Error X,Y,C,GX,GY,B See DL06 V-memory map
IP Address (4 Words) V See DL06 V-memory map - Data Words
14
A
B
C
D

5-296 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDIP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1 6
V400
V401
V402 - V502 7
8
Rung 2: On the 2nd scan, read the IP Address of the ECOM100 and store it in V3000 thru
V3003 (4 decimal numbers). The ECOM100s IP Address could be displayed by an HMI.
9
The ECRDIP is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the IP Address will be sent to the ECOM100 whenever the
10
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-297


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read Module ID (ECRDMID) (IB-720)


ECOM100 Read Module ID will read the binary (decimal) WORD sized Module ID on a
1 DS
HPP
Used
N/A leading edge transition to the IBox.
The Workspace parameter is an internal, private
2 register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
3 anywhere else in your program.
Either the Success or Error bit parameter will turn
4 on once the command is complete.
In order for this ECOM100 IBox to function, you
must turn ON dip switch 7 on the ECOM100
5 circuit board.

6 ECRDMID Parameters

7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
8 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
9 Error: specifies a bit that will turn on if the instruction is not successfully completed
Module ID: specifies the location where the ECOM100s Module ID (decimal) will be placed
10
11 ECOM100#
Parameter
K
DL06 Range
K0-255
Workspace V See DL06 V-memory map - Data Words
12 Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map
13 Module ID V See DL06 V-memory map - Data Words

14
A
B
C
D

5-298 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDMID Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
6
V400
V401
V402 - V502
7
8
Rung 2: On the 2nd scan, read the Module ID of the ECOM100 and store it in V2000.
The ECRDMID is leading edge triggered, not power-flow driven (similar to a counter input 9
leg). The command to read the module ID will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-299


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read Module Name (ECRDNAM) (IB-724)


ECOM100 Read Name will read the Module Name up to the number of specified characters
1 DS
HPP
Used
N/A on a leading edge transition to the IBox.
The Workspace parameter is an internal, private
2 register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
3 anywhere else in your program.
Either the Success or Error bit parameter will turn on
4 once the command is complete.
In order for this ECOM100 IBox to function, you
must turn ON dip switch 7 on the ECOM100 circuit
5 board.

6 ECRDNAM Parameters

7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
8 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
9 Error: specifies a bit that will turn on if the instruction is not successfully completed
Module Name: specifies the starting buffer location where the ECOM100s Module Name will be
10 placed
Num Chars: specifies the number of characters (bytes) to read from the ECOM100s Name field
11
12 Parameter DL06 Range
ECOM100# K K0-255
13 Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map

14 Error
Module Name
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Num Chars K K1-128
A
B
C
D

5-300 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDNAM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, read the Module Name of the ECOM100 and store it in V3000 8
thru V3003 (8 characters). This text can be displayed by an HMI.
The ECRDNAM is leading edge triggered, not power-flow driven (similar to a counter input 9
leg). The command to read the module name will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-301


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Read Subnet Mask (ECRDSNM) (IB-732)


ECOM100 Read Subnet Mask will read the 4 parts of the Subnet Mask and store them in 4
1 DS
HPP
Used
N/A consecutive V-Memory locations in decimal format, on a leading edge transition to the IBox.
The Workspace parameter is an internal,
2 private register used by this IBox and MUST
BE UNIQUE in this one instruction and
3 MUST NOT be used anywhere else in your
program.

4 Either the Success or Error bit parameter will


turn on once the command is complete.

5 In order for this ECOM100 IBox to function,


you must turn ON dip switch 7 on the
ECOM100 circuit board.
6
ECRDSNM Parameters
7 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
8 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
10 Subnet Mask: specifies the starting address where the ECOM100s Subnet Mask will be placed in 4
consecutive V-memory locations

11
Parameter DL06 Range
12 ECOM100# K K0-255
Workspace V See DL06 V-memory map - Data Words

13 Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
Subnet Mask (4 Words) V See DL06 V-memory map - Data Words
14
A
B
C
D

5-302 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRDSNM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
K0
5
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, read the Subnet Mask of the ECOM100 and store it in V3000 8
thru V3003 (4 decimal numbers). The ECOM100s Subnet Mask could be displayed by an
HMI. 9
The ECRDSNM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the Subnet Mask will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-303


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write Description (ECWRDES) (IB-727)


ECOM100 Write Description will write the given Description to the ECOM100 module
1 DS
HPP
Used
N/A on a leading edge transition to the IBox. If you use a dollar sign ($) or double quote (), use
the PRINT/VPRINT escape sequence of TWO dollar
2 signs ($$) for a single dollar sign or dollar sign-double
quote ($) for a double quote character.

3 The Workspace parameter is an internal, private


register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
4 anywhere else in your program.
Either the Success or Error bit parameter will turn on
5 once the command is complete. If there is an error,
the Error Code parameter will report an ECOM100
6 error code (less than 100), or a PLC logic error
(greater than 1000).

7 The Description is stored in Flash-ROM in the ECOM100 and the execution of this IBox
will disable the ECOM100 module for at least a half second until it writes the Flash-ROM.
Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on
8 first scan. Since it requires a LEADING edge to execute, use a NORMALLY CLOSED SP0
(STR NOT First Scan) to drive the power flow to the IBox.
9 In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
ECOM100 circuit board.
10
ECWRDES Parameters
11 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must

12 reference this logical number


Workspace: specifies a V-memory location that will be used by the instruction

13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed

14 Error Code: specifies the location where the Error Code will be written
Description: specifies the Description that will be written to the module

A Parameter DL06 Range


ECOM100# K K0-255
B Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map

C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Description Text
D

5-304 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRDES Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
K0 5
K1
V400
V401
6
V402 - V502
7
8
Rung 2: On the 2nd scan, set the Module Description of the ECOM100. Typically this is
done using NetEdit, but this IBox allows you to configure the module description in the 9
ECOM100 using your ladder program.
The EWRDES is leading edge triggered, not power-flow driven (similar to a counter input 10
leg). The command to write the module description will be sent to the ECOM100 whenever
the power flow into the IBox goes from OFF to ON. 11
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code. 12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-305


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write Gateway Address (ECWRGWA) (IB-731)


ECOM100 Write Gateway Address will write the given Gateway IP Address to the
1 DS
HPP
Used
N/A ECOM100 module on a leading edge transition to the IBox. See also ECOM100 IP Setup
(ECIPSUP) IBox 717 to setup ALL of the
2 TCP/IP parameters in a single instruction - IP
Address, Subnet Mask, and Gateway Address.

3 The Workspace parameter is an internal, private


register used by this IBox and MUST BE
UNIQUE in this one instruction and MUST
4 NOT be used anywhere else in your program.
Either the Success or Error bit parameter will
5 turn on once the command is complete. If there
is an error, the Error Code parameter will report
6 an ECOM100 error code (less than 100), or a
PLC logic error (greater than 1000).

7 The Gateway Address is stored in Flash-ROM in the ECOM100 and the execution of this
IBox will disable the ECOM100 module for at least a half second until it writes the Flash-
ROM. Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox
8 ONCE, on first scan. Since it requires a LEADING edge to execute, use a NORMALLY
CLOSED SP0 (STR NOT First Scan) to drive the power flow to the IBox.
9 In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
ECOM100 circuit board.
10
ECWRGWA Parameters
11 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must

12 reference this logical number


Workspace: specifies a V-memory location that will be used by the instruction

13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed

14 Error Code: specifies the location where the Error Code will be written
Gateway Address: specifies the Gateway IP Address that will be written to the module

A Parameter DL06 Range


ECOM100# K K0-255
B Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map

C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Gateway Address 0.0.0.1. to 255.255.255.254
D

5-306 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRGWA Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1 6
V400
V401
V402 - V502
7
8
Rung 2: On the 2nd scan, assign the Gateway Address of the ECOM100 to 192.168.0.1
The ECWRGWA is leading edge triggered, not power-flow driven (similar to a counter input 9
leg). The command to write the Gateway Address will be sent to the ECOM100 whenever
the power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP
11
Setup (ECIPSUP) IBox.
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-307


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write IP Address (ECWRIP) (IB-723)


ECOM100 Write IP Address will write the given IP Address to the ECOM100 module on
1 DS
HPP
Used
N/A a leading edge transition to the IBox. See also ECOM100 IP Setup (ECIPSUP) IBox 717 to
setup ALL of the TCP/IP parameters in a single instruction - IP Address, Subnet Mask, and
2 Gateway Address.
The Workspace parameter is an internal, private
3 register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
anywhere else in your program.
4 Either the Success or Error bit parameter will turn on
once the command is complete. If there is an error,
5 the Error Code parameter will report an ECOM100
error code (less than 100), or a PLC logic error
6 (greater than 1000).
The IP Address is stored in Flash-ROM in the ECOM100 and the execution of this IBox
7 will disable the ECOM100 module for at least a half second until it writes the Flash-ROM.
Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on
first scan. Since it requires a LEADING edge to execute, use a NORMALLY CLOSED SP0
8 (STR NOT First Scan) to drive the power flow to the IBox.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
9 ECOM100 circuit board.

10 ECWRIP Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
11 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number

12 Workspace: specifies a V-memory location that will be used by the instruction


Success: specifies a bit that will turn on once the request is completed successfully

13 Error: specifies a bit that will turn on if the instruction is not successfully completed
Error Code: specifies the location where the Error Code will be written

14 IP Address: specifies the IP Address that will be written to the module

A
Parameter DL06 Range
B ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map
C Error X,Y,C,GX,GY,B See DL06 V-memory map
Error Code V See DL06 V-memory map - Data Words
D IP Address 0.0.0.1. to 255.255.255.254

5-308 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRIP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1 6
V400
V401
V402 - V502 7
Rung 2: On the 2nd scan, assign the IP Address of the ECOM100 to 192.168.12.100 8
The ECWRIP is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the IP Address will be sent to the ECOM100 whenever the 9
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 10
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP
Setup (ECIPSUP) IBox.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-309


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write Module ID (ECWRMID) (IB-721)


ECOM100 Write Module ID will write the given Module ID on a leading edge transition to
1 DS
HPP
Used
N/A the IBox
If the Module ID is set in the hardware using the
2 dipswitches, this IBox will fail and return error code
1005 (decimal).
3 The Workspace parameter is an internal, private register
used by this IBox and MUST BE UNIQUE in this one
4 instruction and MUST NOT be used anywhere else in
your program.
Either the Success or Error bit parameter will turn on
5 once the command is complete. If there is an error, the
Error Code parameter will report an ECOM100 error
6 code (less than 100), or a PLC logic error (greater than 1000).
The Module ID is stored in Flash-ROM in the ECOM100 and the execution of this IBox
7 will disable the ECOM100 module for at least a half second until it writes the Flash-ROM.
Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on
first scan. Since it requires a LEADING edge to execute, use a NORMALLY CLOSED SP0
8 (STR NOT First Scan) to drive the power flow to the IBox.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
9 ECOM100 circuit board.

10 ECWRMID Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
11 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
12 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
13 Error: specifies a bit that will turn on if the instruction is not successfully completed
Error Code: specifies the location where the Error Code will be written
14 Module ID: specifies the Module ID that will be written to the module

A Parameter DL06 Range


ECOM100# K K0-255
B Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map

C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Module ID K0-65535
D

5-310 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRMID Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
K0
5
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, set the Module ID of the ECOM100. Typically this is done using 8
NetEdit, but this IBox allows you to configure the module ID of the ECOM100 using your
ladder program. 9
The EWRMID is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the module ID will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-311


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write Name (ECWRNAM) (IB-725)


ECOM100 Write Name will write the given Name to the ECOM100 module on a leading
1 DS
HPP
Used
N/A edge transition to the IBox. If you use a dollar sign ($) or double quote (), use the PRINT/
VPRINT escape sequence of TWO dollar signs ($$) for a single dollar sign or dollar sign-
2 double quote ($) for a double quote character.
The Workspace parameter is an internal, private
3 register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used
anywhere else in your program.
4 Either the Success or Error bit parameter will turn on
once the command is complete. If there is an error,
5 the Error Code parameter will report an ECOM100
error code (less than 100), or a PLC logic error
6 (greater than 1000).
The Name is stored in Flash-ROM in the ECOM100 and the execution of this IBox will
7 disable the ECOM100 module for at least a half second until it writes the Flash-ROM.
Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on
first scan. Since it requires a LEADING edge to execute, use a NORMALLY CLOSED SP0
8 (STR NOT First Scan) to drive the power flow to the IBox.
In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
9 ECOM100 circuit board.

10 ECWRNAM Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
11 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number

12 Workspace: specifies a V-memory location that will be used by the instruction


Success: specifies a bit that will turn on once the request is completed successfully

13 Error: specifies a bit that will turn on if the instruction is not successfully completed
Error Code: specifies the location where the Error Code will be written

14 Module Name: specifies the Name that will be written to the module

A Parameter DL06 Range


ECOM100# K K0-255
B Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map

C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Module Name Text
D

5-312 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRNAM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1 6
V400
V401
V402 - V502
7
8
Rung 2: On the 2nd scan, set the Module Name of the ECOM100. Typically this is done
using NetEdit, but this IBox allows you to configure the module name of the ECOM100
using your ladder program.
9
The EWRNAM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the module name will be sent to the ECOM100 whenever the
10
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
11
V2000 for the specific error code.
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-313


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 Write Subnet Mask (ECWRSNM) (IB-733)


ECOM100 Write Subnet Mask will write the given Subnet Mask to the ECOM100
1 DS
HPP
Used
N/A module on a leading edge transition to the IBox. See also ECOM100 IP Setup (ECIPSUP)
IBox 717 to setup ALL of the TCP/IP
2 parameters in a single instruction - IP Address,
Subnet Mask, and Gateway Address.

3 The Workspace parameter is an internal, private


register used by this IBox and MUST BE
UNIQUE in this one instruction and MUST NOT
4 be used anywhere else in your program.
Either the Success or Error bit parameter will turn
5 on once the command is complete. If there is an
error, the Error Code parameter will report an
6 ECOM100 error code (less than 100), or a PLC
logic error (greater than 1000).

7 The Subnet Mask is stored in Flash-ROM in the ECOM100 and the execution of this IBox
will disable the ECOM100 module for at least a half second until it writes the Flash-ROM.
Therefore, it is HIGHLY RECOMMENDED that you only execute this IBox ONCE on
8 first scan. Since it requires a LEADING edge to execute, use a NORMALLY CLOSED SP0
(STR NOT First Scan) to drive the power flow to the IBox.
9 In order for this ECOM100 IBox to function, you must turn ON dip switch 7 on the
ECOM100 circuit board.
10
ECWRSNM Parameters
11 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must

12 reference this logical number


Workspace: specifies a V-memory location that will be used by the instruction

13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed

14 Error Code: specifies the location where the Error Code will be written
Subnet Mask: specifies the Subnet Mask that will be written to the module

A Parameter DL06 Range


ECOM100# K K0-255
B Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map

C Error
Error Code
X,Y,C,GX,GY,B
V
See DL06 V-memory map
See DL06 V-memory map - Data Words
Subnet Mask Masked IP Address
D

5-314 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWRSNM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
V400
6
V401
V402 - V502 7
Rung 2: On the 2nd scan, assign the Subnet Mask of the ECOM100 to 255.255.0.0 8
The ECWRSNM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the Subnet Mask will be sent to the ECOM100 whenever the 9
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 10
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP
Setup (ECIPSUP) IBox.
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-315


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 RX Network Read (ECRX) (IB-740)


ECOM100 RX Network Read performs the RX instruction with built-in interlocking with
1 DS
HPP
Used
N/A all other ECOM100 RX (ECRX) and ECOM100 WX (ECWX) IBoxes in your program to
simplify communications networking. It will perform the RX on the specified ECOM100#s
2 network, which corresponds to a specific unique
ECOM100 Configuration (ECOM100) IBox at the
top of your program.
3 The Workspace parameter is an internal, private
register used by this IBox and MUST BE UNIQUE
4 in this one instruction and MUST NOT be used
anywhere else in your program.
5 Whenever this IBox has power, it will read element
data from the specified slave into the given destination
6 V-Memory buffer, giving other ECOM100 RX and
ECOM100 WX IBoxes on that ECOM100# network a chance to execute.

7 For example, if you wish to read and write data continuously from 5 different slaves, you can
have all of these ECRX and ECWX instructions in ONE RUNG driven by SP1 (Always On).
They will execute round-robin style, automatically.
8
ECRX Parameters
9 ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
10 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
11 Slave ID: specifies the slave ECOM(100) PLC that will be targeted by the ECRX instruction
From Slave Element (Src): specifies the slave address of the data to be read
12 Number of Bytes: specifies the number of bytes to read from the slave ECOM(100) PLC
To Master Element (Dest): specifies the location where the slave data will be placed in the master
13 ECOM100 PLC
Success: specifies a bit that will turn on once the request is completed successfully

14 Error: specifies a bit that will turn on if the instruction is not successfully completed

A Parameter DL06 Range


B ECOM100#
Workspace
K
V
K0-255
See DL06 V-memory map - Data Words
Slave ID K K0-90
C From Slave Element (Src) X,Y,C,S,T,CT,GX,GY,V,P See DL06 V-memory map
Number of Bytes K K1-128

D To Master Element (Dest)


Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map

5-316 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECRX Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
2
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 3
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
K0
K1
V400
6
V401
V402 - V502 7
8
9
(example continued on next page)
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-317


Chapter 5: Intelligent Box (IBox) Instructions

ECRX Example (contd)


Rung 2: Using ECOM100# K0, read X0-X7 from Slave K7 and write them to slave K5 as
1 fast as possible. Store them in this local PLC in C200-C207, and write them to C300-C307
in slave K5.
2 Both the ECRX and ECWX work with the ECOM100 Config IBox to simplify all
networking by handling all of the interlocks and proper resource sharing. They also provide
3 very simplified error reporting. You no longer need to worry about any SP busy bits or
error bits, or what slot number a module is in, or have any counters or shift registers or any
other interlocks for resource management.
4 In this example, SP1 (always ON) is driving both the ECRX and ECWX IBoxes in the same
rung. On the scan that the Network Read completes, the Network Write will start that same
5 scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending ECOM100 IBoxes below the ECWX,
6 then the very next scan the ECRX would start its request again.
Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the
7 fastest the PLC can do networking. For local Serial Ports, DCM modules, or the original
ECOM modules, use the NETCFG and NETRX/NETWX IBoxes.

8
9
10
11
12
13
14
A
B
C
D

5-318 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECOM100 WX Network Write(ECWX) (IB-741)


ECOM100 WX Network Write performs the WX instruction with built-in interlocking with
DS
HPP
Used
N/A all other ECOM100 RX (ECRX) and ECOM100 WX (ECWX) IBoxes in your program to 1
simplify communications networking. It will perform the WX on the specified ECOM100#s
network, which corresponds to a specific unique
ECOM100 Configuration (ECOM100) IBox at the
2
top of your program.
The Workspace parameter is an internal, private
3
register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used 4
anywhere else in your program.
Whenever this IBox has power, it will write data 5
from the masters V-Memory buffer to the specified
slave starting with the given slave element, giving
other ECOM100 RX and ECOM100 WX IBoxes on that ECOM100# network a chance to
6
execute.
For example, if you wish to read and write data continuously from 5 different slaves, you can 7
have all of these ECRX and ECWX instructions in ONE RUNG driven by SP1 (Always On).
They will execute round-robin style, automatically. 8
ECWX Parameters 9
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
10
Workspace: specifies a V-memory location that will be used by the instruction
Slave ID: specifies the slave ECOM(100) PLC that will be targeted by the ECWX instruction
11
From Master Element (Src): specifies the location in the master ECOM100 PLC where the data
will be sourced from
12
Number of Bytes: specifies the number of bytes to write to the slave ECOM(100) PLC
To Slave Element (Dest): specifies the slave address the data will be written to
13
Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14
ECOM100#
Parameter
K
DL06 Range
K0-255
A
Workspace
Slave ID
V
K
See DL06 V-memory map - Data Words
K0-90
B
From Master Element (Src) V See DL06 V-memory map - Data Words
Number of Bytes K
To Slave Element (Dest) X,Y,C,S,T,CT,GX,GY,V,P
K1-128
See DL06 V-memory map
C
Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-319


Chapter 5: Intelligent Box (IBox) Instructions

ECWX Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
1 ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1
as ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to
2 move the module in the base to a different slot, then you only need to change this one IBox.
V400 is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx
3 IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
6 K0
K1
V400
7 V401
V402 - V502

8
9
(example continued on next page)
10
11
12
13
14
A
B
C
D

5-320 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

ECWX Example (contd)


Rung 2: Using ECOM100# K0, read X0-X7 from Slave K7 and write them to slave K5 as
fast as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 1
in slave K5.
Both the ECRX and ECWX work with the ECOM100 Config IBox to simplify all 2
networking by handling all of the interlocks and proper resource sharing. They also provide
very simplified error reporting. You no longer need to worry about any SP busy bits or
error bits, or what slot number a module is in, or have any counters or shift registers or any
3
other interlocks for resource management.
In this example, SP1 (always ON) is driving both the ECRX and ECWX IBoxes in the same 4
rung. On the scan that the Network Read completes, the Network Write will start that
same scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending ECOM100 IBoxes below the ECWX, then
5
the very next scan the ECRX would start its request again.
Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the
6
fastest the PLC can do networking. For local Serial Ports, DCM modules, or the original
ECOM modules, use the NETCFG and NETRX/NETWX IBoxes. 7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-321


Chapter 5: Intelligent Box (IBox) Instructions

NETCFG Network Configuration (NETCFG) (IB-700)


DS Used Network Config defines all the common information necessary for performing RX/WX
1 HPP N/A Networking using the NETRX and NETWX IBox instructions via a local CPU serial port,
DCM or ECOM module.
2 You must have the Network Config instruction
at the top of your ladder/stage program with any
other configuration IBoxes.
3 If you use more than one local serial port, DCM
or ECOM in your PLC for RX/WX Networking,
4 you must have a different Network Config
instruction for EACH RX/WX network in your
5 system that utilizes any NETRX/NETWX IBox instructions.
The Workspace parameter is an internal, private register used by the Network Config IBox
6 and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in
your program.

7 The 2nd parameter CPU Port or Slot is the same value as in the high byte of the first LD
instruction if you were coding the RX or WX rung yourself. This value is CPU and port
specific (check your PLC manual). Use KF2 for the DL06 CPU serial port 2. If using a DCM
8 or ECOM module, use Kx, where x equals the slot where the module is installed.
Since this logic only executes on the first scan, this IBox cannot have any input logic.
9
NETCFG Parameters
10 Network#: specifies a unique # for each ECOM(100) or DCM network to use
CPU Port or Slot: specifies the CPU port number or slot number of DCM/ECOM(100) used
11 Workspace: specifies a V-memory location that will be used by the instruction

12
13
Parameter DL06 Range
14 Network# K K0-255
CPU Port or Slot K K0-FF
A Workspace V See DL06 V-memory map - Data Words

B
C
D

5-322 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

NETCFG Example
The Network Configuration IBox coordinates all of the interaction with other Network
IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for each serial 1
port network, DCM module network, or original ECOM module network in your system.
Configuration IBoxes must be at the top of your program and must execute every scan.
This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local
2
CPU serial ports or DCM/ECOM modules, use the same value you would use in the most
significant byte of the first LD instruction in a normal RX/WX rung to reference the port or 3
module. Any NETRX or NETWX IBoxes that need to reference this specific network would
enter K0 for their Network# parameter. 4
The Workspace register is used to maintain state information about the port or module,
along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in
the program. This V-memory register must not be used anywhere else in the entire program.
5
6
7
Permissive contacts or input logic
cannot be used with this instruction.
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-323


Chapter 5: Intelligent Box (IBox) Instructions

Network RX Read (NETRX) (IB-701)


Network RX Read performs the RX instruction with built-in interlocking with all other
1 DS
HPP
Used
N/A Network RX (NETRX) and Network WX (NETWX) IBoxes in your program to simplify
communications networking. It will perform the RX
2 on the specified Network #, which corresponds to a
specific unique Network Configuration (NETCFG) at
the top of your program.
3 The Workspace parameter is an internal, private
register used by this IBox and MUST BE UNIQUE
4 in this one instruction and MUST NOT be used
anywhere else in your program.
5 Whenever this IBox has power, it will read element
data from the specified slave into the given destination
6 V-Memory buffer, giving other Network RX and Network WX IBoxes on that Network # a
chance to execute.

7 For example, if you wish to read and write data continuously from 5 different slaves, you can
have all of these NETRX and NETWX instructions in ONE RUNG driven by SP1 (Always
On). They will execute round-robin style, automatically.
8
NETRX Parameters
9 Network#: specifies the (CPU ports, DCMs, ECOMs) Network # defined by the NETCFG
instruction
10 Workspace: specifies a V-memory location that will be used by the instruction
Slave ID: specifies the slave PLC that will be targeted by the NETRX instruction
11 From Slave Element (Src): specifies the slave address of the data to be read
Number of Bytes: specifies the number of bytes to read from the slave device
12 To Master Element (Dest): specifies the location where the slave data will be placed in the master
PLC
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14
A Network#
Parameter
K
DL06 Range
K0-255

B Workspace
Slave ID
V
K, V
See DL06 V-memory map - Data Words
K0-90: See DL06 V-memory map
From Slave Element (Src) X,Y,C,S,T,CT,GX,GY,V,P See DL06 V-memory map
C Number of Bytes
To Master Element (Dest)
K
V
K1-128
See DL06 V-memory map - Data Words

D Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map

5-324 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

NETRX Example
Rung 1: The Network Configuration IBox coordinates all of the interaction with other
Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for 1
each serial port network, DCM module network, or original ECOM module network in your
system. Configuration IBoxes must be at the top of your program and must execute every
scan.
2
This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local
CPU serial ports or DCM/ECOM modules, use the same value you would use in the most
3
significant byte of the first LD instruction in a normal RX/WX rung to reference the port or
module. Any NETRX or NETWX IBoxes that need to reference this specific network would 4
enter K0 for their Network# parameter.
The Workspace register is used to maintain state information about the port or module,
along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in
5
the program. This V-Memory register must not be used anywhere else in the entire program.
6
7
Permissive contacts or input logic cannot
8
be used with this instruction.
9
10
11
(example continued on next page)
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-325


Chapter 5: Intelligent Box (IBox) Instructions

NETRX Example (contd)


Rung 2: Using Network# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast
1 as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in
slave K5.
2 Both the NETRX and NETWX work with the Network Config IBox to simplify all
networking by handling all of the interlocks and proper resource sharing. They also provide
3 very simplified error reporting. You no longer need to worry about any SP busy bits or
error bits, or what port number or slot number a module is in, or have any counters or shift
registers or any other interlocks for resource management.
4 In this example, SP1 (always ON) is driving both the NETRX and NETWX IBoxes in the
same rung. On the scan that the Network Read completes, the Network Write will start that
5 same scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending NETRX or NETWX IBoxes below this
6 IBox, then the very next scan the NETRX would start its request again.
Using the NETRX and NETWX for all of your serial port, DCM, or original ECOM
7 network reads and writes is the fastest the PLC can do networking. For ECOM100 modules,
use the ECOM100 and ECRX/ECWX IBoxes.

8
9
10
11
12
13
14
A
B
C
D

5-326 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Network WX Write (NETWX) (IB-702)


Network WX Write performs the WX instruction with built-in interlocking with all other
DS
HPP
Used
N/A Network RX (NETRX) and Network WX (NETWX) IBoxes in your program to simplify 1
communications networking. It will perform the WX
on the specified Network #, which corresponds to a
specific unique Network Configuration (NETCFG)
2
at the top of your program.
The Workspace parameter is an internal, private
3
register used by this IBox and MUST BE UNIQUE
in this one instruction and MUST NOT be used 4
anywhere else in your program.
Whenever this IBox has power, it will write data from
the masters V-Memory buffer to the specified slave
5
starting with the given slave element, giving other Network RX and Network WX IBoxes on
that Network # a chance to execute. 6
For example, if you wish to read and write data continuously from 5 different slaves, you can
have all of these NETRX and NETWX instructions in ONE RUNG driven by SP1 (Always 7
On). They will execute round-robin style, automatically.
8
NETWX Parameters
Network#: specifies the (CPU ports, DCMs, ECOMs) Network # defined by the NETCFG 9
instruction
Workspace: specifies a V-memory location that will be used by the instruction 10
Slave ID: specifies the slave PLC that will be targeted by the NETWX instruction
From Master Element (Src): specifies the location in the master PLC where the data will be sourced 11
from
Number of Bytes: specifies the number of bytes to write to the slave PLC 12
To Slave Element (Dest): specifies the slave address the data will be written to
Success: specifies a bit that will turn on once the request is completed successfully 13
Error: specifies a bit that will turn on if the instruction is not successfully completed
14
Parameter DL06 Range A
Network# K K0-255
Workspace
Slave ID
V
K,V
See DL06 V-memory map - Data Words
K0-90: See DL06 V-memory map
B
From Master Element (Src)
Number of Bytes
V
K
See DL06 V-memory map - Data Words
K1-128 C
To Slave Element (Dest) X,Y,C,S,T,CT,GX,GY,V,P See DL06 V-memory map
Success
Error
X,Y,C,GX,GY,B
X,Y,C,GX,GY,B
See DL06 V-memory map
See DL06 V-memory map
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-327


Chapter 5: Intelligent Box (IBox) Instructions

NETWX Example
Rung 1: The Network Configuration IBox coordinates all of the interaction with other
1 Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for
each serial port network, DCM module network, or original ECOM module network in your
2 system. Configuration IBoxes must be at the top of your program and must execute every
scan.

3 This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local
CPU serial ports or DCM/ECOM modules, use the same value you would use in the most
significant byte of the first LD instruction in a normal RX/WX rung to reference the port or
4 module. Any NETRX or NETWX IBoxes that need to reference this specific network would
enter K0 for their Network# parameter.
5 The Workspace register is used to maintain state information about the port or module,
along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in
6 the program. This V-Memory register must not be used anywhere else in the entire program.

7
8 Permissive contacts or input logic cannot
be used with this instruction.
9
10
11
12 (example continued on next page)

13
14
A
B
C
D

5-328 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

NETWX Example (contd)


Rung 2: Using Network# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast
as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in 1
slave K5.
Both the NETRX and NETWX work with the Network Config IBox to simplify all 2
networking by handling all of the interlocks and proper resource sharing. They also provide
very simplified error reporting. You no longer need to worry about any SP busy bits or
error bits, or what port number or slot number a module is in, or have any counters or shift
3
registers or any other interlocks for resource management.
In this example, SP1 (always ON) is driving both the NETRX and NETWX IBoxes in the 4
same rung. On the scan that the Network Read completes, the Network Write will start that
same scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending NETRX or NETWX IBoxes below this
5
IBox, then the very next scan the NETRX would start its request again.
Using the NETRX and NETWX for all of your serial port, DCM, or original ECOM
6
network reads and writes is the fastest the PLC can do networking. For ECOM100 modules,
use the ECOM100 and ECRX/ECWX IBoxes. 7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-329


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Configuration (CTRIO) (IB-1000)


CTRIO Config defines all the common information for one specific CTRIO module which
1 DS
HPP
Used
N/A is used by the other CTRIO IBox instructions (for example, CTRLDPR - CTRIO Load
Profile, CTREDRL - CTRIO Edit and Reload Preset Table,
2 CTRRTLM - CTRIO Run to Limit Mode, ...).
The Input/Output parameters for this instruction can be
3 copied directly from the CTRIO Workbench configuration
for this CTRIO module. Since the behavior is slightly
4 different when the CTRIO module is in an EBC Base via an
ERM, you must specify whether the CTRIO module is in a
5 local base or in an EBC base. The DL06 PLC only supports
local base operation at this time.

6 You must have the CTRIO Config IBox at the top of your
ladder/stage program along with any other configuration

7 IBoxes.
If you have more than one CTRIO in your PLC, you must have a different CTRIO Config
8 IBox for EACH CTRIO module in your system that utilizes any CTRIO IBox instructions.
Each CTRIO Config IBox must have a UNIQUE CTRIO# value. This is how the CTRIO
IBoxes differentiate between the different CTRIO modules in your system.
9 The Workspace parameter is an internal, private register used by the CTRIO Config IBox
and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in
10 your program.
Since this logic only executes on the first scan, this IBox cannot have any input logic.
11
12 CTRIO Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number

13 Slot: specifies which PLC option slot the CTRIO module occupies
Workspace: specifies a V-memory location that will be used by the instruction

14 CTRIO Location: specifies where the module is located (local base only for DL06)
Input: This needs to be set to the same V-memory register as is specified in CTRIO Workbench as

A Starting V address for inputs for this unique CTRIO.


Output: This needs to be set to the same V-memory register as is specified in CTRIO Workbench
as Starting V address for outputs for this unique CTRIO.
B
C
D

5-330 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO#
Slot
K
K
K0-255
K1-4
1
Workspace V See DL06 V-memory map - Data Words
Input V See DL06 V-memory map - Data Words 2
Output V See DL06 V-memory map - Data Words

CTRIO Example
3
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
4
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 5
6
7
Permissive contacts or input logic cannot
be used with this instruction 8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-331


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Add Entry to End of Preset Table (CTRADPT) (IB-1005)


CTRIO Add Entry to End of Preset Table, on a leading edge transition to this IBox, will
1 DS
HPP
Used
N/A
append an entry to the end of a memory based Preset Table on a specific CTRIO Output
resource. This IBox will take more than 1 PLC
2 scan to execute. Either the Success or Error bit will
turn on when the command is complete. If the
Error Bit is on, you can use the CTRIO Read Error
3 Code (CTRRDER) IBox to get extended error
information.
4 Entry Type:
K0: Set
5 K1: Reset
K2: Pulse On (uses Pulse Time)
6 K3: Pulse Off (uses Pulse Time)

7 K4: Toggle
K5: Reset Count

8 Note that the Pulse Time parameter is ignored by some Entry Types.
The Workspace register is for internal use by this IBox instruction and MUST NOT be used
9 anywhere else in your program.

10 CTRAPT Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config)
11 Output#: specifies a CTRIO output to be used by the instruction
Entry Type: specifies the Entry Type to be added to the end of a Preset Table
12 Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
Preset Count: specifies an initial count value to begin at after Reset
13 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the instruction has successfully completed
14 Error: specifies a bit that will turn on if the instruction does not complete successfully

A Parameter DL06 Range


B CTRIO#
Output#
K
K
K0-255
K0-3
Entry Type V,K K0-5; See DL06 V-memory map - Data Words
C Pulse Time
Preset Count
V,K
V,K
K0-65535; See DL06 V-memory map - Data Words
K0-2147434528; See DL06 V-memory map

D Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map

5-332 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRADPT Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The 1
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 2
3
Permissive contacts or input logic cannot
4
be used with this instruction
5
6
Rung 2: This rung is a sample method for enabling the CTRADPT command. A C-bit is
used to allow the programmer to control the command from Data View for testing purposes. 7
Turning on C0 will cause the CTRADPT instruction to add a new preset to the preset table
for output #0 on the CTRIO in slot 2. The new preset will be a command to RESET (entry
type K1=reset), pulse time is left at zero as the reset type does not use this, and the count at
8
which it will reset will be 20.
Operating procedure for this example code is to load the CTRADPT_ex1.cwb file to your 9
CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will 10
come on and stay on for all counts past 10. Now reset the counter with C1, enable C0 to
execute CTRADPT command to add a reset for output #0 at a count of 20, turn on C2 to
enable output #0, then turn encoder to value of 10+ (output #0 should turn on) and then
11
continue on to count of 20+ (output #0 should turn off).
12
13
14
A
B
C
D
(example continued on next page)

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-333


Chapter 5: Intelligent Box (IBox) Instructions

CTRADPT Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
4 Rung 4: This rung allows the operator to enable output #0 from the ladder code.

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

5-334 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Clear Preset Table (CTRCLRT) (IB-1007)


CTRIO Clear Preset Table will clear the RAM based Preset Table on a leading edge
DS
HPP
Used
N/A transition to this IBox. This IBox will take more than 1
1 PLC scan to execute. Either the Success or Error
bit will turn on when the command is complete. If
the Error Bit is on, you can use the CTRIO Read
2
Error Code (CTRRDER) IBox to get extended error
information. 3
The Workspace register is for internal use by this
IBox instruction and MUST NOT be used anywhere 4
else in your program.
5
CTRCLRT Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config) 6
Output#: specifies a CTRIO output to be used by the instruction
Workspace: specifies a V-memory location that will be used by the instruction 7
Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully 8
9
CTRIO#
Parameter
K
DL06 Range
K0-255
10
Output# K K0-3
Workspace V See DL06 V-memory map - Data Words 11
Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-335


Chapter 5: Intelligent Box (IBox) Instructions

CTRCLRT Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
1 will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
2 through V2061 for its output data.

3
4 Permissive contacts or input logic cannot
be used with this instruction.
5
6 Rung 2: This rung is a sample method for enabling the CTRCLRT command. A C-bit is
used to allow the programmer to control the command from Data View for testing purposes.
7 Turning on C0 will cause the CTRCLRT instruction to clear the preset table for output #0
on the CTRIO in slot 2.
8 Operating procedure for this example code is to load the CTRCLRT_ex1.cwb file to your
CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
9 on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will
come on and stay on until a count of 20 is reached, where it will turn off. Now reset the
counter with C1, enable C0 to execute CTRCLRT command to clear the preset table, turn
10 on C2 to enable output #0, then turn encoder to value of 10+ (output #0 should NOT turn
on).
11
12
13
14
A
B
(example continued on next page)
C
D

5-336 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRCLRT Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
Rung 4: This rung allows the operator to enable output #0 from the ladder code. 4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-337


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Edit Preset Table Entry (CTREDPT) (IB-1003)


CTRIO Edit Preset Table Entry, on a leading edge transition to this IBox, will edit a single
1 DS
HPP
Used
N/A
entry in a Preset Table on a specific CTRIO Output resource. This IBox is good if you are
editing more than one entry in a file at a time. If you wish to do just one edit and then reload
2 the table immediately, see the CTRIO Edit and
Reload Preset Table Entry (CTREDRL) IBox.
This IBox will take more than 1 PLC scan to
3 execute. Either the Success or Error bit will turn
on when the command is complete. If the Error
4 Bit is on, you can use the CTRIO Read Error
Code (CTRRDER) IBox to get extended error
5 information.
Entry Type:

6 K0: Set
K1: Reset
7 K2: Pulse On (uses Pulse Time)
K3: Pulse Off (uses Pulse Time)
8 K4: Toggle
K5: Reset Count
9 Note that the Pulse Time parameter is ignored by some Entry Types.
The Workspace register is for internal use by this IBox instruction and MUST NOT be used
10 anywhere else in your program.

11 CTREDPT Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
12 Ibox)
Output#: specifies a CTRIO output to be used by the instruction
13 Table#: specifies the Table number of which an Entry is to be edited
Entry#: specifies the Entry location in the Preset Table to be edited
14 Entry Type: specifies the Entry Type to add during the edit
Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
A Preset Count: specifies an initial count value to begin at after Reset
Workspace: specifies a V-memory location that will be used by the instruction
B Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully
C
D

5-338 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO#
Output#
K
K
K0-255
K0-3 1
Table# V,K K0-255; See DL06 V-memory map - Data Words
Entry#
Entry Type
V,K
V,K
K0-255; See DL06 V-memory map - Data Words
K0-5; See DL06 V-memory map - Data Words
2
Pulse Time
Preset Count
V,K
V,K
K0-65535; See DL06 V-memory map - Data Words
K0-2147434528; See DL06 V-memory map
3
Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map 4
Error X,Y,C,GX,GY,B See DL06 V-memory map

5
CTREDPT Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
6
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 7
8
9
Permissive contacts or input logic cannot
be used with this instruction 10
11
(example continued on next page)
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-339


Chapter 5: Intelligent Box (IBox) Instructions

CTREDPT Example (contd)


Rung 2: This rung is a sample method for enabling the CTREDPT command. A C-bit is
1 used to allow the programmer to control the command from Data View for testing purposes.
Turning on C0 will cause the CTREDPT instruction to change the second preset from a
2 reset at a count of 20 to a reset at a count of 30 for output #0 on the CTRIO in slot 2.
Operating procedure for this example code is to load the CTREDPT_ex1.cwb file to your
3 CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will
4 come on and stay on until a count of 20 is reached, where it will turn off. Now reset the
counter with C1, enable C0 to execute CTREDPT command to change the second preset,
turn on C2 to enable output #0, then turn encoder to value of 10+ (output #0 should turn
5 on) and then continue past a count of 30 (output #0 should turn off).
Note that we must also reload the profile after changing the preset(s), this is why the
6 CTRLDPR command follows the CTREDPT command in this example.

7
8
9
10
11
12
13
14
A
B
(example continued on next page)
C
D

5-340 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTREDPT Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
Rung 4: This rung allows the operator to enable output #0 from the ladder code. 4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-341


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Edit Preset Table Entry and Reload (CTREDRL) (IB-1002)


DS Used CTRIO Edit Preset Table Entry and Reload, on a leading edge transition to this IBox,
1 HPP N/A will perform this dual operation to a CTRIO Output resource in one CTRIO command.
This IBox will take more than 1 PLC scan to
2 execute. Either the Success or Error bit will
turn on when the command is complete. If the
Error Bit is on, you can use the CTRIO Read
3 Error Code (CTRRDER) IBox to get extended error
information.
4 Entry Type:
K0: Set
5 K1: Reset
K2: Pulse On (uses Pulse Time)
6 K3: Pulse Off (uses Pulse Time)

7 K4: Toggle
K5: Reset Count

8 Note that the Pulse Time parameter is ignored by some Entry Types.
The Workspace register is for internal use by this IBox instruction and MUST NOT be used
9 anywhere else in your program.

10 CTREDRL Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
11 Ibox)
Output#: specifies a CTRIO output to be used by the instruction

12 Table#: specifies the Table number of which an Entry is to be edited


Entry#: specifies the Entry location in the Preset Table to be edited

13 Entry Type: specifies the Entry Type to add during the edit
Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types

14 Preset Count: specifies an initial count value to begin at after Reset


Workspace: specifies a V-memory location that will be used by the instruction

A Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully

B
C
D

5-342 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO# K K0-255 1
Output# K K0-3
Table#
Entry#
V,K
V,K
K0-255; See DL06 V-memory map - Data Words
K0-255; See DL06 V-memory map - Data Words
2
Entry Type V,K K0-5; See DL06 V-memory map - Data Words
Pulse Time V,K K0-65535; See DL06 V-memory map - Data Words 3
Preset Count V,K K0-2147434528; See DL06 V-memory map
Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
4
Error X,Y,C,GX,GY,B See DL06 V-memory map
5
CTREDRL Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 6
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
7
8
9
Permissive contacts or input logic cannot
be used with this instruction 10
11
(example continued on next page) 12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-343


Chapter 5: Intelligent Box (IBox) Instructions

CTREDRL Example (contd)


Rung 2: This rung is a sample method for enabling the CTREDRL command. A C-bit is
1 used to allow the programmer to control the command from Data View for testing purposes.
Turning on C0 will cause the CTREDRL instruction to change the second preset in file 1
2 from a reset at a value of 20 to a reset at a value of 30.
Operating procedure for this example code is to load the CTREDRL_ex1.cwb file to your
3 CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by
turning on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0
4 light will come on, continue to a count above 20 and the output #0 light will turn off. Now
reset the counter with C1, enable C0 to execute CTREDRL command to change the second
preset count value to 30, then turn encoder to value of 10+ (output #0 should turn on) and
5 continue on to a value of 30+ and the output #0 light will turn off.
Note that it is not necessary to reload this file separately, however, the command can only
6 change one value at a time.

7
8
9
10
11
12
13
(example continued on next page)
14
A
B
C
D

5-344 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTREDRL Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
4
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-345


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Initialize Preset Table (CTRINPT) (IB-1004)


CTRIO Initialize Preset Table, on a leading edge transition to this IBox, will create a single
1 DS
HPP
Used
N/A entry Preset Table in memory but not as a file, on a specific CTRIO Output resource.
This IBox will take more than 1 PLC scan to
2 execute. Either the Success or Error bit will turn
on when the command is complete. If the Error
3 Bit is on, you can use the CTRIO Read Error
Code (CTRRDER) IBox to get extended error
4 information.
Entry Type:
5 K0: Set
K1: Reset
6 K2: Pulse On (uses Pulse Time)
K3: Pulse Off (uses Pulse Time)
7 K4: Toggle

8 K5: Reset Count


Note that the Pulse Time parameter is ignored by some Entry Types.
9 The Workspace register is for internal use by this IBox instruction and MUST NOT be used
anywhere else in your program.
10
CTRINPT Parameters
11 CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
Ibox)
12 Output#: specifies a CTRIO output to be used by the instruction
Entry Type: specifies the Entry Type to add during the edit
13 Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
Preset Count: specifies an initial count value to begin at after Reset
14 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the instruction has successfully completed
A Error: specifies a bit that will turn on if the instruction does not complete successfully

B
C
D

5-346 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO#
Output#
K
K
K0-255
K0-3
1
Entry Type
Pulse Time
V,K
V,K
K0-5; See DL06 V-memory map - Data Words
K0-65535; See DL06 V-memory map - Data Words 2
Preset Count V,K K0-2147434528; See DL06 V-memory map
Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
3
Error X,Y,C,GX,GY,B See DL06 V-memory map
4
CTRINPT Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 5
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 6
through V2061 for its output data.
7
8
Permissive contacts or input logic cannot
be used with this instruction. 9
10
(example continued on next page) 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-347


Chapter 5: Intelligent Box (IBox) Instructions

CTRINPT Example (contd)


Rung 2: This rung is a sample method for enabling the CTRINPT command. A C-bit is used
1 to allow the programmer to control the command from Data View for testing purposes.
Turning on C0 will cause the CTRINPT instruction to create a single entry preset table, but
2 not as a file, and use it for the output #0. In this case the single preset will be a set at a count
of 15 for output #0.
3 Operating procedure for this example code is to load the CTRINPT_ex1.cwb file to your
CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
4 on C2 in Data View, turn encoder on CTRIO to value above 15 and output #0 light will
not come on. Now reset the counter with C1, enable C0 to execute CTRINPT command to
create a single preset table with a preset to set output #0 at a count of 15, then turn encoder
5 to value of 15+ (output #0 should turn on).

6
7
8
9
10
11
12 (example continued on next page)

13
14
A
B
C
D

5-348 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRINPT Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-349


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Initialize Preset Table (CTRINTR) (IB-1010)


CTRIO Initialize Preset Table, on a leading edge transition to this IBox, will create a single
1 DS
HPP
Used
N/A entry Preset Table in memory but not as a file, on a specific CTRIO Output resource.
This IBox will take more than 1 PLC scan to
2 execute. Either the Success or Error bit will turn
on when the command is complete. If the Error
3 Bit is on, you can use the CTRIO Read Error
Code (CTRRDER) IBox to get extended error
4 information.
Entry Type:
5 K0: Set
K1: Reset
6 K2: Pulse On (uses Pulse Time)
K3: Pulse Off (uses Pulse Time)
7 K4: Toggle

8 K5: Reset Count


Note that the Pulse Time parameter is ignored by some Entry Types.
9 The Workspace register is for internal use by this IBox instruction and MUST NOT be used
anywhere else in your program.
10
CTRINTR Parameters
11 CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
Ibox)
12 Output#: specifies a CTRIO output to be used by the instruction
Entry Type: specifies the Entry Type to add during the edit
13 Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
Preset Count: specifies an initial count value to begin at after Reset
14 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the instruction has successfully completed
A Error: specifies a bit that will turn on if the instruction does not complete successfully

B
C
D

5-350 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO#
Output#
K
K
K0-255
K0-3
1
Entry Type
Pulse Time
V,K
V,K
K0-5; See DL06 V-memory map - Data Words
K0-65535; See DL06 V-memory map - Data Words 2
Preset Count V,K K0-2147434528; See DL06 V-memory map
Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
3
Error X,Y,C,GX,GY,B See DL06 V-memory map
4
CTRINTR Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 5
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 6
through V2061 for its output data.
7
8
Permissive contacts or input logic cannot
be used with this instruction
9
10
(example continued on next page)
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-351


Chapter 5: Intelligent Box (IBox) Instructions

CTRINTR Example (contd)


Rung 2: This rung is a sample method for enabling the CTRINTR command. A C-bit is
1 used to allow the programmer to control the command from Data View for testing purposes.
Turning on C0 will cause the CTRINTR instruction to create a single entry preset table, but
2 not as a file, and use it for output #0, the new preset will be loaded when the current count is
reset. In this case the single preset will be a set at a count of 25 for output #0.
3 Operating procedure for this example code is to load the CTRINTR_ex1.cwb file to your
CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
4 on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will
come on. Now turn on C0 to execute the CTRINTR command, reset the counter with C1,
then turn encoder to value of 25+ (output #0 should turn on).
5
6
7
8
9
10
11
(example continued on next page)
12
13
14
A
B
C
D

5-352 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRINTR Example (contd)


Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
1
2
3
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-353


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Load Profile (CTRLDPR) (IB-1001)


CTRIO Load Profile loads a CTRIO Profile File to a CTRIO Output resource on a leading
1 DS
HPP
Used
N/A edge transition to this IBox. This IBox will take more than 1 PLC scan to execute. Either the
Success or Error bit will turn on when the command is
2 complete. If the Error Bit is on, you can use the CTRIO
Read Error Code (CTRRDER) IBox to get extended
error information.
3 The Workspace register is for internal use by this IBox
instruction and MUST NOT be used anywhere else in
4 your program.

5
6 CTRLDPR Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config)

7 Output#: specifies a CTRIO output to be used by the instruction


File#: specifies a CTRIO profile File number to be loaded

8 Workspace: specifies a V-memory location that will be used by the instruction


Success: specifies a bit that will turn on once the instruction has successfully completed

9 Error: specifies a bit that will turn on if the instruction does not complete successfully

10
Parameter DL06 Range
11 CTRIO#
Output#
K
K
K0-255
K0-3
File# V,K K0-255; See DL06 V-memory map - Data Words
12 Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map
13 Error X,Y,C,GX,GY,B See DL06 V-memory map

14
A
B
C
D

5-354 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRLDPR Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The 1
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 2
3
Permissive contacts or input logic cannot 4
be used with this instruction.
5
Rung 2: This CTRIO Load Profile IBox will load File #1 into the working memory of 6
Output 0 in CTRIO #1. This example program requires that you load CTRLDPR_IBox.cwb
into your Hx-CTRIO(2) module. 7
8
9
10
11
12
(example continued on next page)
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-355


Chapter 5: Intelligent Box (IBox) Instructions

CTRLDPR Example (contd)


Rung 3: If the file is successfully loaded, set Profile_Loaded.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

5-356 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Read Error (CTRRDER) (IB-1014)


CTRIO Read Error Code will get the decimal error code value from the CTRIO module
DS
HPP
Used
N/A (listed below) and place it into the given Error Code register, on a leading edge transition to 1
the IBox
Since the Error Code in the CTRIO is only maintained 2
until another CTRIO command is given, you must use
this instruction immediately after the CTRIO IBox that
reports an error via its Error bit parameter.
3
The Workspace register is for internal use by this IBox
instruction and MUST NOT be used anywhere else in 4
your program.
Error Codes: 5
0: No Error
100: Specified command code is unknown or unsupported 6
101: File number not found in the file system
102: File type is incorrect for specified output function
7
103: Profile type is unknown
104: Specified input is not configured as a limit on this output
8
105: Specified limit input edge is out of range 9
106: Specified input function is unconfigured or invalid
107: Specified input function number is out of range 10
108: Specified preset function is invalid
109: Preset table is full 11
110: Specified Table entry is out of range
111: Specified register number is out of range 12
112: Specified register is an unconfigured input or output
2001: Error reading Error Code - cannot access CTRIO via ERM
13
CTRRDER Parameters
14
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config)
Workspace: specifies a V-memory location that will be used by the instruction
A
Error Code: specifies the location where the Error Code will be written B
Parameter DL06 Range
C
CTRIO# K K0-255
Workspace V See DL06 V-memory map - Data Words D
Error Code V See DL06 V-memory map - Data Words

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-357


Chapter 5: Intelligent Box (IBox) Instructions

CTRRDER Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
1 will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
2 through V2061 for its output data.

3
4 Permissive contacts or input logic cannot
be used with this instruction
5
6 Rung 2: This CTRIO Read Error Code IBox will read the Extended Error information from
7 CTRIO #1. This example program requires that you load CTRRDER_IBox.cwb into your
Hx-CTRIO(2) module.

8
9
10
11
12
13
14
A
B
C
D

5-358 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Run to Limit Mode (CTRRTLM) (IB-1011)


CTRIO Run To Limit Mode, on a leading edge transition to this IBox, loads the Run to
DS
HPP
Used
N/A Limit command and given parameters on a specific Output resource. The CTRIOs Input(s) 1
must be configured as Limit(s) for this function to work.
Valid Hexadecimal Limit Values: 2
K00 - Rising Edge of Ch1/C
K10 - Falling Edge of Ch1/C 3
K20 - Both Edges of Ch1/C
K01 - Rising Edge of Ch1/D 4
K11 - Falling Edge of Ch1/D
K21 - Both Edges of Ch1/D
5
K02 - Rising Edge of Ch2/C
K12 - Falling Edge of Ch2/C
6
K22 - Both Edges of Ch2/C 7
K03 - Rising Edge of Ch2/D
K13 - Falling Edge of Ch2/D 8
K23 - Both Edges of Ch2/D
This IBox will take more than 1 PLC scan to execute. Either the Success or Error bit will 9
turn on when the command is complete. If the Error Bit is on, you can use the CTRIO Read
Error Code (CTRRDER) IBox to get extended error information. 10
The Workspace register is for internal use by this IBox instruction and MUST NOT be used
anywhere else in your program. 11
CTRRTLM Parameters 12
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
Ibox) 13
Output#: specifies a CTRIO output to be used by the instruction
Frequency: specifies the output pulse rate (H0-CTRIO: 20Hz - 25KHz / H0-CTRIO2: 20Hz -
250 KHz)
14
Limit: the CTRIOs Input(s) must be configured as Limit(s) for this function to operate
Duty Cycle: specifies the % of on time versus off time. This is a hex number. Default of 0 is 50%,
A
also entering 50 will yield 50%. 50% duty cycle is defined as on half the time and off half the time
Workspace: specifies a V-memory location that will be used by the instruction B
Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-359


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range

1 CTRIO#
Output#
K
K
K0-255
K0-3
Frequency V,K K20-20000; See DL06 V-memory map - Data Words
2 Limit
Duty Cycle
V,K
V,K
K0-FF; See DL06 V-memory map - Data Words
K0-99; See DL06 V-memory map - Data Words

3 Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map
4
CTRRTLM Example
5 Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
6 CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
7
8 Permissive contacts or input logic cannot
be used with this instruction.
9
10
Rung 2: This CTRIO Run To Limit Mode IBox sets up Output #0 in CTRIO #1 to output
11 pulses at a Frequency of 1000 Hz until Llimit #0 comes on. This example program requires
that you load CTRRTLM_IBox.cwb into your Hx-CTRIO(2) module.
12
13
14
A
B
C (example continued on next page)

5-360 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRRTLM Example (contd)


Rung 3: If the Run To Limit Mode parameters are OK, set the Direction Bit and Enable the
output. 1
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. D 5-361


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Run to Position Mode (CTRRTPM) (IB-1012)


CTRIO Run To Position Mode, on a leading edge transition to this IBox, loads the Run to
1 DS
HPP
Used
N/A Position command and given parameters on a specific Output resource.
Valid Function Values are:
2 00: Less Than Ch1/Fn1
10: Greater Than Ch1/Fn1
3 01: Less Than Ch1/Fn2

4 11: Greater Than Ch1/Fn2


02: Less Than Ch2/Fn1
5 12: Greater Than Ch2/Fn1
03: Less Than Ch2/Fn2
6 13: Greater Than Ch2/Fn2
This IBox will take more than 1 PLC scan to execute.
7 Either the Success or Error bit will turn on when the
command is complete. If the Error Bit is on, you can
8 use the CTRIO Read Error Code (CTRRDER) IBox
to get extended error information.

9 The Workspace register is for internal use by this IBox instruction and MUST NOT be used
anywhere else in your program.

10 CTRRTPM Parameters
11 CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
Ibox)

12 Output#: specifies a CTRIO output to be used by the instruction


Frequency: specifies the output pulse rate (H0-CTRIO: 20Hz - 25KHz / H0-CTRIO2: 20Hz -
250 KHz)
13 Duty Cycle: specifies the % of on time versus off time. This is a hex number. Default of 0 is 50%,
also entering 50 will yield 50%. 50% duty cycle is defined as on half the time and off half the time
14 Position: specifies the count value, as measured on the encoder input, at which the output pulse
train will be turned off
A Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the instruction has successfully completed
B Error: specifies a bit that will turn on if the instruction does not complete successfully

C
D

5-362 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

Parameter DL06 Range


CTRIO# K K0-255 1
Output# K K0-3
Frequency
Duty Cycle
V,K
V,K
K20-20000; See DL06 V-memory map - Data Words
K0-99; See DL06 V-memory map
2
Position V,K K0-2147434528; See DL06 V-memory map
Workspace V See DL06 V-memory map - Data Words 3
Success X,Y,C,GX,GY,B See DL06 V-memory map
Error X,Y,C,GX,GY,B See DL06 V-memory map 4
CTRRTPM Example
5
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
6
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 7
8
Permissive contacts or input logic cannot
be used with this instruction.
9
10
11
(example continued on next page)
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-363


Chapter 5: Intelligent Box (IBox) Instructions

CTRRTPM Example (contd)


Rung 2: This CTRIO Run To Position Mode IBox sets up Output #0 in CTRIO #1 to
1 output pulses at a Frequency of 1000 Hz, use the Greater than Ch1/Fn1 comparison
operator, until the input position of 1500 is reached. This example program requires that you
2 load CTRRTPM_IBox.cwb into your Hx-CTRIO(2) module.

3
4
5
6
7
8 Rung 3: If the Run To Position Mode parameters are OK, set the Direction Bit and Enable
the output.

9
10
11
12
13
14
A
B
C
D

5-364 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Velocity Mode (CTRVELO) (IB-1013)


CTRIO Velocity Mode loads the Velocity command and given parameters on a specific
DS
HPP
Used
N/A Output resource on a leading edge transition to this IBox. 1
This IBox will take more than 1 PLC scan to execute.
Either the Success or Error bit will turn on when the 2
command is complete. If the Error Bit is on, you can use
the CTRIO Read Error Code (CTRRDER) IBox to get 3
extended error information.
The Workspace register is for internal use by this IBox 4
instruction and MUST NOT be used anywhere else in
your program. 5
CTRVELO Parameters 6
CTRIO#: specifies a specific CTRIO module based on a
user defined number (see CTRIO Config Ibox) 7
Output#: specifies a CTRIO output to be used by the instruction
Frequency: specifies the output pulse rate (H0-CTRIO: 20Hz - 25KHz / H0-CTRIO2: 20Hz -
250 KHz)
8
Duty Cycle: specifies the % of on time versus off time. This is a hex number. Default of 0 is 50%,
also entering 50 will yield 50%. 50% duty cycle is defined as on half the time and off half the time
9
Step Count: This DWORD value specifies the number of pulses to output. A Step Count value of
-1 (or 0XFFFFFFFF) causes the CTRIO to output pulses continuously. Negative Step Count values 10
must be V-Memory references.
Workspace: specifies a V-memory location that will be used by the instruction 11
Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully 12
13
Parameter DL06 Range
14
CTRIO# K K0-255
Output# K K0-3 A
Frequency V,K K20-20000; See DL06 V-memory map - Data Words
Duty Cycle
Step Count
V,K
V,K
K0-99; See DL06 V-memory map
K0-2147434528; See DL06 V-memory map
B
Workspace
Success
V
X,Y,C,GX,GY,B
See DL06 V-memory map - Data Words
See DL06 V-memory map C
Error X,Y,C,GX,GY,B See DL06 V-memory map
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-365


Chapter 5: Intelligent Box (IBox) Instructions

CTRVELO Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
1 will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
2 through V2061 for its output data.

3
4 Permissive contacts or input logic cannot
be used with this instruction.
5
6
Rung 2: This CTRIO Velocity Mode IBox sets up Output #0 in CTRIO #1 to output
7 10,000 pulses at a Frequency of 1000 Hz. This example program requires that you load
CTRVELO_IBox.cwb into your Hx-CTRIO(2) module.
8
9
10
11
12
13 (example continued on next page)

14
A
B
C
D

5-366 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRVELO Example (contd)


Rung 3: If the Velocity Mode parameters are OK, set the Direction Bit and Enable the
output. 1
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. D 5-367


Chapter 5: Intelligent Box (IBox) Instructions

CTRIO Write File to ROM (CTRWFTR) (IB-1006)


CTRIO Write File to ROM writes the runtime changes made to a loaded CTRIO Preset
1 DS
HPP
Used
N/A Table back to Flash ROM on a leading edge transition to this IBox. This IBox will take
more than 1 PLC scan to execute. Either the Success or
2 Error bit will turn on when the command is complete.
If the Error Bit is on, you can use the CTRIO Read
3 Error Code (CTRRDER) IBox to get extended error
information.
4 The Workspace register is for internal use by this IBox
instruction and MUST NOT be used anywhere else in
5 your program.

6
CTRWFTR Parameters
7 CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
Ibox)
8 Output#: specifies a CTRIO output to be used by the instruction
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully
10
11 CTRIO#
Parameter
K
DL06 Range
K0-255
Output# K K0-3
12 Workspace V See DL06 V-memory map - Data Words
Success X,Y,C,GX,GY,B See DL06 V-memory map

13 Error X,Y,C,GX,GY,B See DL06 V-memory map

14
A
B
C
D

5-368 DL06 Micro PLC User Manual, 3rd Edition, Rev. D


Chapter 5: Intelligent Box (IBox) Instructions

CTRWFTR Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The 1
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data. 2
3
Permissive contacts or input logic cannot
4
be used with this instruction
5
Rung 2: This CTRIO Edit Preset Table Entry IBox will change Entry 0 in Table #2 to be a 6
RESET at Count 3456. This example program requires that you load CTRWFTR_IBox.cwb
into your Hx-CTRIO(2) module. 7
8
9
10
11
12
13
(example continued on next page) 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition, Rev. D 5-369


Chapter 5: Intelligent Box (IBox) Instructions

CTRWFTR Example (contd)


Rung 3: If the file is successfully edited, use a Write File To ROM IBox to save the edited
1 table back to the CTRIOs ROM, thereby making the changes retentive.

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

5-370 DL06 Micro PLC User Manual, 3rd Edition, Rev. D

You might also like