D 06 Uservol 1
D 06 Uservol 1
D 06 Uservol 1
Volume 1 of 2
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.
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.
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
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
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
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
Index
Notes
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
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
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
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
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:
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
A
B
C
D
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
90 - 120 VAC 14
Toggle Switches
UL Listed A
fuse
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
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
06
DV1000CBL
LOGIC
K oyo
C
D
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
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
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.
+
PushUP RAISE
6
X0
7
LDD
V1076
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.
Notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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.
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
MCR
C
L1 to Input Supply
(optional)
D
9
RST
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%.
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
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
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
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
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.
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
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
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.
8
9
10
11
12
13
14
A
B
C
D
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
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
8 Input
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
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
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
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
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
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
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
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
C
LOGIC
For replacement
K oyo
DV1000CBL
PORT1 PORT2 RUN STOP
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
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.
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
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
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
2-20
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
+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
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
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
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.
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.
)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
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
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
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
+
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
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
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
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
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.
connections.
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
13 Ambient Temperature ( C/ F)
14 AA
A
90-120V
VAC
INPUT point wiring
C
OUTPUT Optical
L Isolator
9$&
D COM
To LED
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
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
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.
14
INPUT point wiring
220VAC Resistive 350K 200K
220VAC Inductive 100K 50K
B
C
9$&
5 input wiring
100-240 VAC
Output point wiring
17-240
6 VAC
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
11 OUTPUT
Internal module circuitry
Optical
+V
L Isolator
12
COM
13 To LED
14
12-24
C
9'&
D 9'&
6RXUFH 6LQN
6RXUFH 6LQN
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)
10
9'&
11
12 DCStandard Outputs (Y2-Y17)
13
9'&
14 12-24 VDC
C
9'&
9'&
D
6RXUFH 6LQN
6RXUFH 6LQN
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)
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
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
14
9'&
A
B High Speed Inputs (X0-X3) DC Standard Inputs (X4-X23)
C
9'&
D
9'&
6RXUFH 6LQN
6RXUFH 6LQN
7 24VDC Inductive
110VAC Resistive
100K
500K
50K
250K
110VAC Inductive 200K 100K
8 220VAC Resistive
220VAC Inductive
350K
100K
200K
50K
10
11
12 F
A
B Equivalent Circuit, Standard Inputs (X4-X23) Equivalent Circuit, High-speed Inputs (X0-X3)
C
D 9'&
9'&
6RXUFH 6LQN
6RXUFH 6LQN
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
C
9'&
D 9'&
6RXUFH 6LQN
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
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
C
9'&
D 9'&
6RXUFH 6LQN
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)
4
9$&
open relay contacts. Each LQSXWZLULQJ RU
bank has a common terminal. 9'&
10 24VDC Resistive
24VDC Inductive
500K
100K
250K
50K
110VAC Resistive 500K 250K
11 110VAC Inductive
220VAC Resistive
200K
350K
100K
200K
9'&
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)
C
D
9'&
6RXUFH 6LQN
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.
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
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.
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.
CPU Specifications
1
Specifications
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
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
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
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
6 Status Indicators
The status indicator LEDs on the CPU front panels have specific functions which can help in
7 programming and troubleshooting.
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 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
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.
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
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
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.
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
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
C Fatal error
YES
NO
D
Force CPU into
PGM mode
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
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.
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.
LOGIC 06
K oyo
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
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
segment.
8 You may recall that you can force various types
Write Outputs from Specialty I/O
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.
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
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
In this case, you can calculate the response time by simply adding the following items:
9 Input Delay + Scan Time + Output Delay = Response Time
12 Solve
Scan
13 Read
Inputs
Write
Outputs
14 Field Input
A
CPU Reads CPU Writes
Inputs Outputs
Input
Off/On Delay
B Output
Off/On Delay
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
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
1 The scan time covers all the cyclical tasks that are performed
by the operating system. You can use DirectSOFT or Initialize hardware
Program Execution
7 Output Update
CPU Bus Communication
The one you have the most control over is the amount of
time it takes to execute the application program. This is PGM
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
C
Fatal error
YES
Force CPU into
D PGM mode
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
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.
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.
V-memory storage 0 1 0 0
4
1 0 0 1
9
0 0 1 1
3
0 1 1 0
6
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
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
numbering system works for the discrete PORT1 PORT2 RUN STOP
Y20
X1
S2
JMP
11
Present S6
or RESET instructions. This allows you to easily X1
JMP
12
S0002
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
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
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
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
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
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
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
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
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.
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
C NOTE: This memory area can be used for additional Data Words.
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
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
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
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
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
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.
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
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
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)
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+
PORT 2
impedence rating of the 14 CTS+
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
0V
network wiring, matching RTS+ 0V RTS+
CTS+
RTS TXD+
RXD+
CTS+
RTS
10
15
15
5
TXD TXD
DL06 CPU Port 2 DL06 CPU Port 2
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.
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.
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
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
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
C
D
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
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
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
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
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.
LD
C WX or RX instruction. The value to be loaded
is in BCD format (decimal), from 1 to 128
K64
bytes.
D
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
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
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
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
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.
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
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
A Constant K 12000
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
A Constant K 12000
D Vmemory V All
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.
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
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
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
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
4 Out (OUT)
Out Double (OUTD)
564
564
Store Bit-of-Word (STRB)
Store If Equal (STRE)
511
526
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
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
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
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
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
Diagnostics D
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
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
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
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
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.
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
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
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
C
STR 1 ENT
ORN SHFT B V 1 4 0 0
K 7
D
ENT
OUT 7 ENT
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 .
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
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
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
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
$
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
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
GX
E
4
A
D
0
F
ENT
5
A
0
ENT
B
OUT 3
C
D
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.
7 Constant
Timer
K
TA
0377
09999
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
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.
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
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
6
7 Operand Data Type DL06 Range
aaa
8 Inputs X 0777
X1 Y2 $ SHFT I B ENT
10 OUT
GX
OUT
STR
C
8
2
ENT
1
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.
3
ENT
OUT STR 1
Q SHFT I C ENT
X2 OR 8 2
GX F
4
ENT
OUT 5
6
OUT STR 1
R SHFT I C ENT
X2 ORN 8 2
GX F ENT
7
OUT 5
$ B
A
ENT
STR 1
B
OUT
V SHFT I C ENT
AND 8 2
GX F ENT
OUT 5
X1 X2 Y5
OUT
$
W
STR
B
I
1
ENT
C
D
SHFT ENT
ANDN 8 2
GX F ENT
OUT 5
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
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
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
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
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
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
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
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
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
12 Y30 - Y37
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
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
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#
9 NOTE: A V-memory preset is required only if the ladder program or an Operator Interface unit must
change the preset.
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.
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
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.
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
X1
K30
C10
5
C10
Y7 T6
T6
OUT Current 0 10 10 20 30 40 50 0
6
Value
$ 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
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
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
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
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
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
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
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
$
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
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.
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
6
$ B ENT GX B A ENT
STR 1 OUT 1 0
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
$
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
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
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
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
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
$
STR
B
C
1
ENT
ENT
11
STR 2
12
From C0
X2 $ D
Clock Input ENT
STR 3
13
X3 RST ORN 0
Reset Input
B H ENT
1 7
7 V2000
8 lator
Acc. 0 0 0 0 88 99 33 55
9 OUT
V2010 8 9 3 5
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
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
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
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
V2011
9 9 0
V2010
7 2
D
V2011
6 X1 LD
K3245
Constant
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
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
Acc. 0 0 0 0 66 33 66 33
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.
1
X1 POP Previous Acc. value
Acc. X X X X XX XX XX X
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
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.
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
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
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
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
C
OUT
the accumulator to V2200 V2200 2 6 3 5
V 2200
V2201 X X X X
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
$ 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
4 Constant K 0FFFFFFFF
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
12
13 OUTD
V2010
6 7 3
V2011
9 5 0 2
V2010
6
$ 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
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
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
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
12 Acc. 0 0 0 0 4 1 0 0
13 OUT
4 1 0 0
V2000
14
V2000
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
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
6 Constant K 1-FFFF
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
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
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
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
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
10
Accumulator
K7
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
4 C0 POP
Previous Acc. value
Acc. X X X X XX XX XX XX
Accumulator Stack
Current Acc. value
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
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
11 POP
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 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
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
D SHFT
GX
P
CV
SHFT
SHFT
O
INST#
V
P
C
CV
A
ENT
A C ENT
OUT AND 2 0 0 2
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
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
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
C
Acc.
$ 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
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
$ 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
4 V-memory V
aaa
See memory map
Pointer P See memory map
5 Constant K 0FFFFFFFF
11 V2000
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
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
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
D GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
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
C
Handheld Programmer Keystrokes
C20 K4 ON OFF OFF OFF
$ B ENT
STR 1
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
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
(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
OUTD
V1500
$
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
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
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
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
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).
11
5 4 7 E 2 8 7 A
V2000
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 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 ENT
STR 1
C SHFT L
ANDST
D
3
D
3
C
2
A
0
A
0
A
0
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
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
C
C23 C22 C21 C20
$ B ENT
STR 1 C20 K4 ON ON ON OFF
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
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
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
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
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
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
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
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
$ X B
B
SHFT ENT
C
STR SET 1
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
5 Pointer
Constant
P
K
See memory map
0FFFFFFFF
11
V2000
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
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
STR 1
B SHFT L
ANDST
X
D
Q
3
D
3
D
C
2
A
0
A
K
0
A
0
ENT
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
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
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
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
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
V1501
3 9 4 2
V1500
4 2
$ B
A
ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
C
D
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
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
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
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
Acc. 4 5 2 6 7 2 9 9
13 CMPD
Compared
with
V2010
A SP60 C30
OUT
$ B ENT
STR 1
C SHFT L
ANDST
D
3
D
3
C
2
A
0
A
0
A
0
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
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
B
Acc.
location (Y20-- Y23)
SP60 C30 Compared
Y23 Y22 Y21 Y20 with
OUT
ON ON ON OFF
E
C
D
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
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
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
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
SP62
for decimal 6 CMPR 4 0 D 0 0 0 0 0
14
C1
OUT
A
B
C
D
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
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
13 ADD
V2006
+
0 0 0 0 4
2
9
5 0
3 5
0
(Accumulator)
(V2006)
A OUT
V2010 7 4 3 5
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
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)
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
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.
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
14
ADDR
A R15.0
C OUTD
V1400
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
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
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
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
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
14 OUTD
V2010
0 0 3 9 0 8 9 9
V2011 V2010
$
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
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
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
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.
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
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 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
11
Kbc614e the accumulator.
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.
A
accumulator to V1402
V1402 and V1403 using the
OUTD instruction.
Handheld Programmer Keystrokes
B
$ B ENT
STR 1
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
2 point format).
4 Pointer
Real Constant
P
R
See memory map
-3.402823E +38 to + -3.402823E +38
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
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
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
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
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
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
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
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
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
A
OUTD
V1500 0 0 0 3 0 0 0 0
B and V1501
POP
Handheld Programmer Keystrokes
$ B 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
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
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.
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
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
C V1400 by 1.
8
V1400
9 3 4
SHFT D E C B E A A ENT
3 4 2 1 4 0 0
12
DirectSOFT V-memory
V1400
X1 0 A 0 5
LD LD
V1400 K2565
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
SHFT A D D B V 1 4 2 0 ENT
OU T SHFT D V 1 5 0 0 ENT
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
13
and V1401 into the BIN
accumulator 0 0 0 0 0 A 0 1 (Accumulator)
ADDBD Acc. 1 0 0 0 C A 1 1
14 V1420
A OUTD
V1500
1 0
V1501
0 0 C A
V1500
1 1
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
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
0
0
A
2
0
4
B
(Accumulator)
(V1420) 14
0 6 1 9
A
Acc.
OUT
V1500
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
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
(Accumulator)
0 0 0 6 0 0 F F
14 SUBBD
V1420
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
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
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
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
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
13 DIVB
bits are set to zero
_..
0 0 0 0 F A 0 1 (Accumulator)
V1420 0 0 5 0 (V1420)
the remainder
A OUT
V1500 0 3 2 0
B
Copy the value in the lower 16 V1500
bits of the accumulator to V1500
D SHFT L D V 1 4 0 0 ENT
SHFT D I V B V 1 4 2 0 ENT
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
D
SHFT ENT
Decrement the binary value 3 4 2 1 2 0 0 0
in V2000 by1 V2000
4 A ?
3 B
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
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
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
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
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
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
B
OUTF Y10 accumulator to discrete the remainder
K4 locations Y10-- Y13
$
STR
L
G
D
6
ENT
F A E
OFF ON OFF OFF
C
SHFT ENT
D
ANDST 3 5 0 4
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
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
A
after 2nd LDD
B
0 0 5 6 7 0 8 2 Level 3 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
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
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
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
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
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
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
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
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
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
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
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
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
12
V1420
Level 8 X X X X X X X X
Acc. 0 0 0 0 0 0 1 4
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
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
D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
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
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
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.
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).
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
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
13 OUT
V1500
0 0 0
V1500
5
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
C OUT 1 5 0 0
10
V2001 V2000
X1 LDD 6 7 0 5 33 31 10 01
V2000
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
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
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
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
A
B 1 9
V2011
C 1 4 C
V2010
4 0
C $
STR
B
1
ENT
L D D C A A A
D
SHFT ENT
ANDST 3 3 2 0 0 0
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
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
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
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
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
14 and V1501
A 5 9 C 1 4 C 4 0
$ 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
D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
X1
1
V2000
0 0 0
9
LD
V2000
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
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
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
6 DirectSOFT
Direct SOFT32
X14 X13 X12 X11 X10
7 X1 LDF
K5
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.
bit position to a 1
$ 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
X1 LDD
0
V2001
0 0 2 8
V2000
5 2 9
8
V2000
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
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
B
S tandard R LL
Ins tructions
$
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
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
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
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
V2011
0 2 8 5 2
V2010
9 The BCD value
copied to
V2010 and V2011
$ 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
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
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
7
0 0 0 0 0 0 8 7
X1
LDD
V2000
9 BC DC PL
Acc. 9 9 9 9 9 9 1 3
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
$ 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
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
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
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
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
B
V1500.
$ 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
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
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
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
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
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
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
9 the accumulator
10 HTA
V1400
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
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
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
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
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
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
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
9 A B C D E F 0 12
13
1 2 8 7 3 6 5 4
Result (accumulator) B
C
D
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
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.
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
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.
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
$ 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
C
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
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
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
7
copied.
N C O N 4 5 3 2 V2001
LD
K 4 5 3 2
K0
9
N C O N 8 8 4 5 V2003
destination locations
K 8 8 4 5
LDLBL X X X X V2004
.
K1
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
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
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
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
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
14
X X X X V1576
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
S
S
X X V1605
C
Handheld Programmer Keystrokes
$ B ENT
STR 1
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
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
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
4 the accumulator.
LD
S
S
5 K2
$ 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
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
X1
9
LD
K6
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
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
$
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
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.
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
4
(HEX) into the lower 16 bits
K6 of the accumulator
5
300 and load the value into
0 1400 the accumulator. This is the
table pointer location
6
TTD
the table to the specified
V1500 destination (V1500)
$ 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
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
13
V1407 X X X X
From then on, it increments from one to six, S
and then resets to one. S
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
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.
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
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 .
.
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
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 . .
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
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
LDA
6
0 1400
7
table pointer location
RFB
V1500
8
Copy the specified value from
the table to the specified
destination (V1500)
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
14 S
S
DirectSOFT32 (optional
DirectSOFTDisplay one-shot
(optional metod)
one-shot method)
C0
(X1) to control the execution. Since the LD
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.
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
. .
. .
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
. .
. .
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
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
LDA
0 1400
$ 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
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
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
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.
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
. .
. .
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
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
. .
. .
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
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
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
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
S
X X
S
A Also, our example uses a normal input contact (X1) to
DirectSOFT32 Display (optional one-shot method)
X1 C0
PD
would be removed from the table very quickly. If this is Load the constant value 6
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.
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
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
. .
. .
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
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
DirectSOFT
X1 LD
K6
ATT
V1500
$ B
8
ENT
STR 1
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
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
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
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
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
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
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
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
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
13 LDA
Convert octal 3000 to HEX
and load the value into the
0 3000 accumulator. This is the
14 TSHFR
table beginning.
A 0 14
B $
STR
A
0
ENT
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
DirectSOFT
DirectSOFT 5
X0 LD
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
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
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
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
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
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
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
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
$
and 2001
Handheld Programmer Keystrokes
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
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.
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
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
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
SHFT R S T W T ENT
10 RSTWT
ORN RST MLR ANDN MLR
11
12
13
14
A
B
C
D
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
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
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
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
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
$
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
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
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
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
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
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
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
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
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
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
7
K104 of the accumulator
$ E ENT
STR 4
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
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.
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
3
4 END
5 DLBL
6 K1
ACON
7 A SW
8
NCON
9 K 2031
10
11
NCON
K 3436
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
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
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
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
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.
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.
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.
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
B
K6 bytes to be read. V1404 X X X X 90 Address 4
01 Address 5
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
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
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
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
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
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.
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
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
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
9
WX
V2000
$ 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
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
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
LCD
A Line Number:
"Effluent Overflo"
K2
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
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
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)
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
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
10 Timer Bits
Counter Bits
T
CT
0377
0377
Special Relays SP 0777
11 Vmemory
Global Inputs
V
GX
all
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
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
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.
D First Character Timeout Error Bit: is set when the First Character Timeout is exceeded.
See First Character Timeout explanation above.
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
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
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
13
14
A
B
C
D
5 Found Index:
Code 39
V2200
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
11 AFIND instruction
to complete
Data not found with
AFIND
TMR
Delay for
C7 C10 AFIND to complete
12 17 T0
K2
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
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
A
Strings are equal
B SP61 C11
OUT
C
D
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.
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
A V2000:B
V2000:B0
0
1
0
2
1 2
D V2000:B
V2000:BS
sp
1
sp
2
1 2
V2000:BC0 0 0 1 2
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
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:
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.
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
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
B
C
D
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
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
1
2
3
4
5
6
7
This page intentionally left blank.
8
9
10
11
12
13
14
A
B
C
D
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
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
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
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
11
Parameter DL06 Range
12 Base # (K0-Local)
Slot #
K
K
K0 (local base only)
K1-4
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
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
A
B
C
D
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
9 ANSCL Example
14
A 1
B
C
D
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
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
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
C
D
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
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
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
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
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
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
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
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
12
13
14
A
B
C
D
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
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
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
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
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 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.
B
C
D
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
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
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
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
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
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
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
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 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
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
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
14
A
B
C
D
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
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
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
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
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
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
A
B
C
D
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
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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)
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
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
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
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
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
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
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
A
B
C
D
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
8
9
10
11
12
13
14
A
B
C
D
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
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
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
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
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
8
9
10
11
12
13
14
A
B
C
D
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
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
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
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
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
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)
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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
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
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
7
8
9
10
11
12
13
14
A
B
(example continued on next page)
C
D
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
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
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
7
8
9
10
11
12
13
(example continued on next page)
14
A
B
C
D
B
C
D
6
7
8
9
10
11
12 (example continued on next page)
13
14
A
B
C
D
B
C
D
5
6 CTRLDPR Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config)
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
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
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
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)
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)
C
D
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
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
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
14
A
B
C
D
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
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D