DL PHP
DL PHP
Volume 1 of 2
WARNING
Thank you for purchasing automation equipment from Automationdirect.comTM, doing business as,
AutomationDirect. We want your new automation equipment to operate safely. Anyone who installs or
uses this equipment should read this publication (and any other relevant publications) before installing or
operating the equipment.
To minimize the risk of potential safety problems, you should follow all applicable local and national codes
that regulate the installation and operation of your equipment. These codes vary from area to area and
usually change with time. It is your responsibility to determine which codes should be followed, and to
verify that the equipment, installation, and operation is in compliance with the latest revision of these
codes.
At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical
Code, and the codes of the National Electrical Manufacturer's Association (NEMA). There may be local
regulatory or government offices that can also help determine which codes and standards are necessary for
safe installation and operation.
Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes
and standards. We do not guarantee the products described in this publication are suitable for your
particular application, nor do we assume any responsibility for your product design, installation, or
operation.
Our products are not fault-tolerant and are not designed, manufactured or intended for use or resale as on-
line control equipment in hazardous environments requiring fail-safe performance, such as in the
operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life
support machines, or weapons systems, in which the failure of the product could lead directly to death,
personal injury, or severe physical or environmental damage ("High Risk Activities"). AutomationDirect
specifically disclaims any expressed or implied warranty of fitness for High Risk Activities.
For additional warranty and safety information, see the Terms and Conditions section of our catalog. If
you have any questions concerning the installation or operation of this equipment, or if you need
additional information, please call us at 770-844-4200.
This publication is based on information that was available at the time it was printed. At
AutomationDirect we constantly strive to improve our products and services, so we reserve the right to
make changes to the products and/or publications at any time without notice and without any obligation.
This publication may also discuss features that may not be available in certain revisions of the product.
Trademarks
This publication may contain references to products produced and/or offered by other companies. The
product and company names may be trademarked and are the sole property of their respective owners.
AutomationDirect disclaims any proprietary interest in the marks and names of others.
Copyright 2004, 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.comTM Incorporated. AutomationDirect retains the exclusive rights to all
information included in this document.
AVERTISSEMENT
Nous vous remercions d'avoir acheté l'équipement d'automatisation de Automationdirect.comMC, en faisant des
affaires comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d'automatisation fonctionne en
toute sécurité. Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les
autres publications pertinentes) avant de l'installer ou de l'utiliser.
Afin de réduire au minimum le risque d'éventuels problèmes de sécurité, vous devez respecter tous les codes locaux et
nationaux applicables régissant l'installation et le fonctionnement de votre équipement. Ces codes diffèrent d'une
région à l'autre et, habituellement, évoluent au fil du temps. Il vous incombe de déterminer les codes à respecter et
de vous assurer que l'équipement, l'installation et le fonctionnement sont conformes aux exigences de la version la
plus récente de ces codes.
Vous devez, à tout le moins, respecter toutes les sections applicables du Code national de prévention des incendies,
du Code national de l'électricité et des codes de la National Electrical Manufacturer's Association (NEMA). Des
organismes de réglementation ou des services gouvernementaux locaux peuvent également vous aider à déterminer
les codes ainsi que les normes à respecter pour assurer une installation et un fonctionnement sûrs.
L'omission de respecter la totalité des codes et des normes applicables peut entraîner des dommages à l'équipement
ou causer de graves blessures au personnel. Nous ne garantissons pas que les produits décrits dans cette publication
conviennent à votre application particulière et nous n'assumons aucune responsabilité à l'égard de la conception, de
l'installation ou du fonctionnement de votre produit.
Nos produits ne sont pas insensibles aux défaillances et ne sont ni conçus ni fabriqués pour l'utilisation ou la revente
en tant qu'équipement de commande en ligne dans des environnements dangereux nécessitant une sécurité absolue,
par exemple, l'exploitation d'installations nucléaires, les systèmes de navigation aérienne ou de communication, le
contrôle de la circulation aérienne, les équipements de survie ou les systèmes d'armes, pour lesquels la défaillance du
produit peut provoquer la mort, des blessures corporelles ou de graves dommages matériels ou environnementaux
(«activités à risque élevé»). La société AutomationDirect nie toute garantie expresse ou implicite d'aptitude à
l'emploi en ce qui a trait aux activités à risque élevé.
Pour des renseignements additionnels touchant la garantie et la sécurité, veuillez consulter la section Modalités et
conditions de notre documentation. Si vous avez des questions au sujet de l'installation ou du fonctionnement de cet
équipement, ou encore si vous avez besoin de renseignements supplémentaires, n'hésitez pas à nous téléphoner au
770-844-4200.
Cette publication s'appuie sur l'information qui était disponible au moment de l'impression. À la société
AutomationDirect, nous nous efforçons constamment d'améliorer nos produits et services. C'est pourquoi nous
nous réservons le droit d'apporter des modifications aux produits ou aux publications en tout temps, sans préavis ni
quelque obligation que ce soit. La présente publication peut aussi porter sur des caractéristiques susceptibles de ne
pas être offertes dans certaines versions révisées du produit.
Marques de commerce
La présente publication peut contenir des références à des produits fabriqués ou offerts par d'autres entreprises. Les
désignations des produits et des entreprises peuvent être des marques de commerce et appartiennent exclusivement à
leurs propriétaires respectifs. AutomationDirect nie tout intérêt dans les autres marques et désignations.
Copyright 2004, Automationdirect.com™ Incorporated
Tous droits réservés
Nulle partie de ce manuel ne doit être copiée, reproduite ou transmise de quelque façon que ce soit sans le
consentement préalable écrit de la société Automationdirect.com™ Incorporated. AutomationDirect conserve les
droits exclusifs à l'égard de tous les renseignements contenus dans le présent document.
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.
Second Edition 3/04 Added two appendices, removed discrete module data and made numerous
corrections
VOLUME ONE:
TABLE OF CONTENTS
Introduction
1 The Purpose of this Manual
2 Thank you for purchasing a DL06 Micro PLC. This manual shows you how to install,
program, and maintain all PLCs in the DL06 family. It also helps you understand how to
interface them to other devices in a control system.This manual contains important
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
4 running.
Supplemental Manuals
5 The D0–OPTIONS–M manual contains technical information about the option cards
available for the DL06 PLCs. This information includes specifications and wiring diagrams
that will be indispensable if you use any of the optional I/O or communications cards. If you
6 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
We strive to make our manuals the best in the industry. We rely on your feedback to let us
8 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 770–844–4200.
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
If you have a comment, question or suggestion about any of our products, services, or
12 manuals, please fill out and return the ‘Suggestions’ card that was included with this manual.
13
14
A
B
C
D
Conventions Used
1
When you see the “notepad” icon in the left-hand margin, the paragraph to
2
its immediate right will be a special note. Notes represent information that
may make your work quicker or more efficient. The word NOTE: in 3
boldface will mark the beginning of the text.
4
5
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 6
prevent injury, loss of property, or even death in extreme cases. Any warning in
this manual should be regarded as critical information that should be read in
its entirety. The word WARNING in boldface will mark the beginning of the text.
7
8
9
10
Key Topics for Each Chapter
The beginning of each chapter will list the key topics
Getting Started CHAPTER
1
11
that can be found in that chapter.
In This Chapter...
General Information .................................................................1-2
12
Specifications ...........................................................................1-4
13
14
A
B
C
D
B combines the added feature of flow chart programming (Stage) to the standard RLL language.
Both the DirectSOFT™ programming package and the handheld programmer support
RLL as well as standard RLL instructions.
PLUS
DirectSOFT32 (part number PC-PGMSW) supports the DirectLOGIC CPU families. You
can use the full version of DirectSOFT32 to program the DL05, DL06, DL105, DL205,
DL305, and DL405. (Upgrade software may be required for new CPUs when they become 1
available). A separate manual discusses DirectSOFT32 programming software.
DirectSOFT32 version 4.0 or later is needed to program the DL06. 2
Handheld Programmer
All DL06 Micro PLCs have a built-in programming port for use with the handheld
programmer (D2–HPP), 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 4
D2–HPPs with firmware version 2.0 or later will program the DL06.
5
I/O Quick Selection Guide
The eight versions of the DL06 have input/output circuits which can interface to a wide 6
variety of field devices. In several instances a particular input or output circuit can interface to
either DC or AC voltages, or both sinking and sourcing circuit arrangements. Check this
guide to find the proper DL06 Micro PLC to interface to the field devices in your application.
7
8
I/O Selection Guide
DL06 Part
INPUTS OUTPUTS 9
Number I/O type/ Voltage I/O type/ Sink/Source Voltage/ Current Ratings*
commons Sink/Source
D0–06AA AC / 5 –
Ranges
90 – 120 VAC
commons
AC / 4 – 17 – 240 VAC, 50/60 Hz 0.5A
10
D0–06AR AC / 5 – 90 – 120 VAC Relay / 4 Sink or Source 66 –– 27VDC, 2A
240 VAC, 2A 11
D0–06DA DC / 5 Sink or Source 12 – 24 VDC AC / 4 – 17 – 240 VAC, 50/60 Hz 0.5A
* See Chapter 2, Specifications for more information about a particular DL06 version. B
C
D
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 to
2 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
Unpack the DL06 and gather the parts necessary to build this demonstration system. The
4 recommended components are:
• DL06 Micro PLC
5 • AC power cord or DC power supply
• Toggle switches (see Step 2 on next page).
6 • Hook-up wire, 16-22 AWG
• DL06 User Manual (this manual)
7 • A small screwdriver, 5/8” flat or #1 Philips type
You will need at least one of the following programming options:
8 • DirectSOFT32 Programming Software V4.0 or later (PC-PGMSW or PC-PGM-BRICK),
DirectSOFT32 Manual (included with the software), and a programming cable (D2-DSCBL
9 connects the DL06 to a personal computer)
or
10 • D2-HPP Handheld Programmer, firmware version 2.0 or later, (comes with programming cable).
Please purchase Handheld Programmer Manual D2-HPP-M separately.
11
12 G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
PWR
RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA 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
06
14
LOGIC
K oyo
A
B
C
D
6
12 - 24 VDC
- 7
+
Toggle Switches
UL Listed 8
9
10
D0-06AA and D0-06AR 11
AC input only
LOGIC 06
K oyo
12
C0
X0
X1
X2
X3
C1
X4
X5
X6
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X10 X12 C3 X15 X17 X20 X22 N.C.
13
90 - 120 VAC
14
Toggle Switches
A
fuse
UL Listed
WARNING: Remove power and unplug the DL06 when wiring the
switches. Use only UL-approved switches rated for at least
B
250VAC, 1A for AC inputs. Firmly mount the switches before
using. C
D
Fuse
Fuse
fuse
4
5
G LG 0V Y0 Y2 C1 Y5 Y7 Y G LG N.C. Y0 Y2 C1 Y5 Y7 Y10 Y1
6 OUTPUT: 17-240V
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2
50 - 60Hz 0.5A PWR: 100-240V 50-60
+
OUTPUT: Sinking Output
- N.C. C0
6 - 27V
Y1 Y3
1.0A
Y4 Y6 C2
PWR: 12-24
Y11
20W
Y Y
0 1 2 3 4 5 6 7 10 11 12 13 14 15
7
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16
X X
INPUT: 90 - 120V 7 - 15mA INPUT: 12 - 24V 3 - 15mA
8
Step 4: Connect the Programming Device
9 Most programmers will use DirectSOFT32 programming software, Version 4.0 or later,
installed on a personal computer. An alternative, if you need a compact portable
10 programming device, is the Handheld Programmer (firmware version 2.20 or later). Both
devices will connect to COM port 1 of the DL06 via the appropriate cable.
11
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
13 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
Use cable part #
D2–DSCBL
14
A G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
(cable comes with HPP)
For replacement
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
B
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
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
DV–1000CBL
PORT1 PORT2 RUN STOP
C
D Note: The Handheld Programmer cannot create or access LCD, ASCII or MODBUS instructions.
X0
C
2
E
4
AUX ENT ENT CLR
11
Y0
OUT
NEXT $ A ENT
Move to the first
12
STR 0 address and enter
END
X0 contact
Enter output Y0
13
GX A ENT
OUT 0
14
E N D Enter the END
SHFT ENT
4 TMR 3 statement
A
After entering the simple example program put the PLC in Run mode by using the Mode key
on the Handheld Programmer. B
The RUN indicator on the PLC will illuminate indicating the CPU has entered the Run
mode. If not, repeat this step, ensuring the program is entered properly or refer to the
troubleshooting guide in chapter 9.
C
After the CPU enters the run mode, the output status indicator for Y0 should follow the
switch status on input channel X0. When the switch is on, the output will be on.
D
8
9 Step 3: Review the I/O Selection Criteria Input
PLC
+ –
A
Step 5: Understand the System Operation
B Before you begin to enter a program, it is very
helpful to understand how the DL06 system Power Up
processes information. This involves not only
C program execution steps, but also involves the Initialize Hardware
CMPD
K309482
DOWN LIGHT UP 8
SP62 Y0
OUT LOWER Push–
DOWN 9
After reviewing the programming concepts above, you’ll be equipped with a variety of tools to
write your application program. 10
Step 7: Choose the Instructions 11
Once you have installed the Micro PLC and TMR T1
understand the main programming concepts, you K30
can begin writing your application program. At CNT
K10
CT3 12
that time you will begin to use one of the most
powerful instruction sets available in a small PLC. 13
Step 8: Understand the Maintenance and
14
Troubleshooting Procedures
Sometimes equipment failures occur when we least
A
expect it. Switches fail, loads short and need to be
replaced, etc. In most cases, the majority of the B
troubleshooting and maintenance time is spent
trying to locate the problem. The DL06 Micro C
PLC has many built-in features such as error codes
that can help you quickly identify problems.
D
Safety Guidelines
1
NOTE: Products with CE marks perform their required functions safely and adhere to relevant standards as
2 specified by CE directives provided they are used according to their intended purpose and that the
instructions in this manual are adhered to. The protection provided by the equipment may be impaired if
this equipment is used in a manner not specified in this manual. A listing of our international affiliates is
3 available on our Web site: http://www.automationdirect.com
WARNING: Providing a safe operating environment for personnel and equipment is your responsibility
4 and should be your primary goal during system planning and installation. Automation
systems can fail and may result in situations that can cause serious injury to personnel or
5 damage to equipment. Do not rely on the automation system alone to provide a safe
operating environment. You should use external electro-mechanical devices, such as relays
or limit switches, that are independent of the PLC application to provide protection for any
6 part of the system that may cause personal injury or damage. Every automation application
is different, so there may be special requirements for your particular application. Make sure
you follow all national, state, and local government requirements for the proper installation
7 and use of your equipment.
To Disconnect
11
PLC Power
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
13
LOGIC 06
K oyo
14
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
9
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 Communication
10 Ports
11 LOGIC 06
K oyo
12 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
6
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
7
LOGIC 06
C0
X0
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
8
PORT1 PORT2 RUN STOP
9
2. From the center of the connector block, pry upward with the screwdriver until the 10
connector is loose.
The terminal blocks on DL06 PLCs have regular (m3 size) screw terminals, which will accept 11
either standard blade-type or #1 Philips screwdriver tips. Use No. 16 to 22 AWG
solid/stranded wire. Be careful not to over-tighten; maximum torque is 0.882 to 1.020 Nm
(7.806 to 9.028 inch-lbs).
12
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.
13
14
A
B
C
D
Mounting Guidelines
1 In addition to the panel layout guidelines, other specifications can affect the installation of a
PLC system. Always consider the following:
2 • Environmental Specifications
• Power Requirements
3 • Agency Approvals
• Enclosure Selection and Component Dimensions
4 Unit Dimensions
The following diagram shows the outside dimensions and mounting hole locations for all
5 versions of the DL06. Make sure you follow the installation guidelines to allow proper
spacing from other components.
6
7
8
9
10
0.71"
11 18mm
1.46"
12 37mm
13
Enclosures
14 Your selection of a proper enclosure is important to ensure safe and proper operation of your
DL06 system. Applications of DL06 systems vary and may require additional features. The
minimum considerations for enclosures include:
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
Panel
copper lugs
11
1.5"
6. A good common ground reference (Earth ground) is essential for proper operation of the
DL06. One side of all control and power circuits and the ground lead on flexible shielded
1 cable must be properly connected to Earth ground. There are several methods of providing an
adequate common ground reference, including:
2 a) Installing a ground rod as close to the panel as possible.
b) Connection to incoming power system ground.
3 7. Evaluate any installations where the ambient temperature may approach the lower or upper
limits of the specifications. If you suspect the ambient temperature will not be within the
operating specification for the DL06 system, measures such as installing a cooling/heating
4 source must be taken to get the ambient temperature within the range of specifications.
8. The DL06 systems are designed to be powered by 95-240 VAC or 12–24 VDC normally
5 available throughout an industrial environment. Electrical power in some areas where the
PLCs are installed is not always stable and storms can cause power surges. Due to this,
6 powerline filters are recommended for protecting the DL06 PLCs from power surges and
EMI/RFI noise. The Automation Powerline Filter, for use with 120 VAC and 240 VAC, 1–5
Amps, is an excellent choice (locate at www.automationdirect.com), however, you can use a
7 filter of your choice. These units install easily between the power source and the PLC.
NOTE: If you are using other components in your system, make sure you refer to the appropriate manual to
8 determine how those units can affect mounting dimensions.
13
14
A
B
C
D
2
35mm
3
4
Retaining Clip
5
NOTE: Refer to our catalog or web site for a complete listing of DINnector connection systems.
Environmental Specifications
6
The following table lists the environmental specifications that generally apply to DL06
Micro PLCs. The ranges that vary for the Handheld Programmer are noted at the bottom 7
of this chart. Certain output circuit types may have derating curves, depending on the
ambient temperature and the number of outputs ON. Please refer to the appropriate
section in this chapter pertaining to your particular DL06 PLC.
8
Environmental Specifications 9
Specification Rating
Storage temperature
Ambient operating temperature*
–4° F to 158° F (–20° C to 70° C)
32° F to 131° F (0° C to 55° C)
10
Ambient humidity** 5% – 95% relative humidity (non–condensing)
Vibration resistance MIL STD 810C, Method 514.2 11
Shock resistance MIL STD 810C, Method 516.2
Noise immunity
Atmosphere
NEMA (ICS3–304)
No corrosive gases
12
Agency approvals UL, CE (C1D2), FCC class A
* Operating temperature for the Handheld Programmer and the DV–1000 is 32° to 122° F
13
(0° to 50° C) Storage temperature for the Handheld Programmer and the DV–1000 is –4° to
158° F (–20° to70° C). 14
**Equipment will operate down to 5% relative humidity. However, static electricity problems
occur much more frequently at low humidity levels (below 30%). Make sure you take
adequate precautions when you touch the equipment. Consider using ground straps, anti-
A
static floor coverings, etc. if you use the equipment in low-humidity environments.
Agency Approvals
B
Some applications require agency approvals for particular components. The DL06 Micro
PLC agency approvals are listed below:
C
• UL (Underwriters’ Laboratories, Inc.)
• CUL (Canadian Underwriters’ Laboratories, Inc.)
D
• CE (European Economic Union)
Wiring Guidelines
1 Connect the power input wiring for the DL06. Observe all precautions stated earlier in this
manual. For more details on wiring, see Chapter 2 on Installation, Wiring, and Specifications.
2 When the wiring is complete, close the connector covers. Do not apply power at this time.
12 - 24 VDC
+ -
3 110/220 VAC Power Input 12/24 VDC Power Input
Fuse
Fuse
fuse
4
5
6 G LG 0V Y0 Y2 C1 Y5 Y7 Y G LG N.C. Y0 Y2 C1 Y5 Y7 Y10
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 + - N.C. C0 Y1 Y3 Y4 Y6 C2 Y
7 OUTPUT: 17-240V
Y
0 1 2 3
50 - 60Hz
4 5
0.5A
6 7
PWR: 100-240V
10 11 12 13
50-60
14 1
OUTPUT: Sinking Output
Y
0 1 2 3 4
6 - 27V
5 6
1.0A
7 10
PWR: 12-24
11 12 13 14
20W
15
X X
8 INPUT: 90 - 120V 7 - 15mA INPUT: 12 - 24V 3 - 15mA
9 WARNING: Once the power wiring is connected, secure the terminal block cover in the closed position.
When the cover is open there is a risk of electrical shock if you accidentally touch the
10 connection terminals or power wiring.
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
8 LOGIC 06
K oyo
9 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
10
11 I/O Point Numbering
All DL06 Micro PLCs have a fixed I/O configuration. It follows the same octal numbering
12 system used on other DirectLogic family PLCs, starting at X0 and Y0. The letter X is always
used to indicate inputs and the letter Y is always used for outputs.
13 The I/O numbering always starts at zero and does not include the digits 8 or 9. The addresses
are typically assigned in groups of 8 or 16, depending on the number of points in an I/O
14 group. For the DL06 the twenty inputs use reference numbers X0 – X23. The sixteen output
points use references Y0 – Y17.
A
B
C
D
The next figure shows the internal layout of DL06 PLCs, as viewed from the front panel. 13
Power
Input
Filter 16 Discrete Outputs Commons
14
Output Circuit 4 Optional
Card Slots A
Main
Power CPU
LCD Monitor
B
Supply
2 Comm.
DL06 Input Circuit
Ports C
PLC
To Programming De-
D
20 Discrete Commons vice, Operator Interface
Inputs or networking
DV-1000
4
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
OUTPUT: 6-240V
Y
AC(L) AC(N) 24V C0 Y1 Y3
50 - 60Hz
Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
D0-06DR
RUN
CPU
TX1
RX1
RJ12 RJ12
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
X
INPUT: 12 - 24V 3 - 15mA
TX2
RX2
phone style phone style
LOGIC 06
5
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
Use cable part no.
PORT1 PORT2 RUN STOP
DV–1000CBL
6 EZ-Touch and EZ-Text operator interface panels require separate power and communications
connections. Connect the DL06 to the proper D-shell connector on the rear of the operator
panel using the cable shown below. These panels require 24VDC (20–30VDC operating
7 range).
DL06 Micro PLC
8 OUTPUT: 6-240V
G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
50 - 60Hz
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
PWR
RUN
CPU
15-pin
VGA male
15-pin D-shell
male
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
9
RX2
INPUT: 12 - 24V 3 - 15mA
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 Use cable part no.
10 EZ-2CBL-1
PORT1 PORT2 RUN STOP
13
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
Use cable part no.
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C. D2–DSCBL
14
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
The D2-HPP Handheld Programmer comes with a communications cable. For a replacement
A part, use the cable shown below.
D0-06DR
C
Y 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
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.
For replacement
TERM
+
Load
+
14
Input Output
– Common Sensing Switch Common –
A
Sourcing Input Sourcing Output B
PLC PLC
Common Common
+ Input +
C
Sensing Output
– Input Switch Output
Load
–
D
10 Most DL06 input and output circuits are grouped into banks that share a common return
path. The best indication of I/O common grouping is on the wiring label. The I/O common
groups are separated by a bold line. A thinner line separates
11 the inputs associated with that common. To the right,
notice that X0, X1, X2, and X3 share the common
12 terminal C0, located to the left of X1.
The following complete set of labels shows five banks of
13 four inputs and four banks of four outputs. One common
is provided for each bank.
14 G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
A 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.
B This set of labels is for DC (sinking) output versions such as the D0-06DD1 and
D0-06DD1-D. One common is provided for each group of four outputs, and one designated
terminal on the output side accepts power for the output stage.
C G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V
12
Solid State Output Loads
Sometimes an application requires connecting a PLC output point to a solid state input on a 13
device. This type of connection is usually made to carry a low-level signal, not to send DC
power to an actuator. 14
The DL06 PLC family offers DC outputs that are sinking only or DC outputs that are
sourcing. All sixteen outputs have the same electrical common, even though there are four
common terminal screws. In the following circuit, the PLC output point sinks current to the
A
output common when energized. It is connected to a sourcing input of a field device input.
B
PLC DC Output Field Device
Power
+DC Power
Output Input
=>
C
(sinking) + (sourcing)
Common –
2 .25
> Ground
D
In the next example we connect a PLC DC output point to the sinking input of a field
device. This is a bit tricky, because both the PLC output and field device input are sinking
1 type. Since the circuit must have one sourcing and one sinking device, we add sourcing
capability to the PLC output by using a pull-up resistor. In the circuit below, we connect
2 Rpull-up from the output to the DC output circuit power input.
PLC DC Output
3 +DC pwr
Power
Field Device
R pull-up
4 (sinking)
(sourcing)
Output Input R input
+ (sinking)
5 Common
Supply
– Ground
6 NOTE: DO NOT attempt to drive a heavy load (>25 mA) with this pull-up method.
NOTE 2: Using the pull-up resistor to implement a sourcing output has the effect of inverting the output
7 point logic. In other words, the field device input is energized when the PLC output is OFF, from a
ladder logic point-of-view. Your ladder program must comprehend this and generate an inverted
8 output. Or, you may choose to cancel the effect of the inversion elsewhere, such as in the field
device.
9 It is important to choose the correct value of R pull-up. In order to do so, we need to know
the nominal input current to the field device (I input) when the input is energized. If this
value is not known, it can be calculated as shown (a typical value is 15 mA). Then use I input
10 and the voltage of the external supply to compute R pull-up. Then calculate the power Ppull-
up (in watts), in order to size R pull-up properly.
11 V input (turn–on)
I input =
12 R input
2
V supply – 0.7 V supply
R pull-up = – R input P =
13 I input
pull-up
R pullup
14
A
B
C
D
4 5
2.0A, 6 - 27V
6 7 10 11
2.0A
12
PWR: 100-240V
13 14 15 16
50-60Hz 40VA
17 20
D0-06AR
21 22 23
B
X
INPUT: 90 - 120V 7 - 15mA
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 D
commons are separated according to which supply powers the associated load.
+
fuse
L L L L L L L L
1
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
2
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
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
X
INPUT: 90 - 120V 7 - 15mA
3 LOGIC 06
K oyo
4
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.
5 AC
Supply
C
+24 VDC –24 VDC
D
Module Relay Contact
–324 VDC
This figure shows the same circuit with a transorb (TVS) across the coil. Notice that the
voltage spike is significantly reduced.
+24 VDC 1
–42 VDC
+24 VDC –24 VDC
2
Module Relay Contact
3
Use the following table to help select a TVS or MOV suppressor for your application based 4
on the inductive load voltage.
Vendor / Catalog
Surge Suppressors
Type Inductive Load Voltage Part Number
5
Automationdirect
Transient Voltage Suppressors,
TVS
TVS
TVS
110/120 VAC
24 VDC
220/240 VDC
ZL-TD8-120
ZL-TD8-24
P6KE350CA
6
LiteOn Diodes; from DigiKey TVS 12/24 VDC or VAC P6K30CAGICT–ND
Catalog; Phone: 1-800-344-4539
Harris Metal Oxide Varistors;|
Diode
MOV
12/24 VDC or VAC
110/120 VAC
1N4004CT–ND
V150LA20C
7
from Newark Catalog: MOV 220/240 VAC V250LA20C
Phone 1-800-463-9275 8
Prolonging Relay Contact Life 9
Relay contacts wear according to the amount of relay switching, amount of spark created at
the time of open or closure, and presence of airborne contaminants. There are some steps you
can take to help prolong the life of relay contacts, such as switching the relay on or off only 10
when it is necessary, and if possible, switching the load on or off at a time when it will draw
the least current. Also, take measures to suppress inductive voltage spikes from inductive DC
loads such as contactors and solenoids.
11
For inductive loads in DC circuits we recommend using a suppression diode as shown in the
following diagram (DO NOT use this circuit with an AC power supply). When the load is
12
energized the diode is reverse-biased (high impedance). When the load is turned off, energy
stored in its coil is released in the form of a negative-going voltage spike. At this moment the 13
diode is forward-biased (low impedance) and shunts the energy to ground. This protects the
relay contacts from the high voltage arc that would occur just as the contacts are opening. 14
Place the diode as close to the inductive field device as possible. Use a diode with a peak
inverse voltage rating (PIV) at least 100 PIV, 3A forward current or larger. Use a fast-recovery
type (such as Schottky type). DO NOT use a small-signal diode such as 1N914, 1N941, etc.
A
Be sure the diode is in the circuit correctly before operation. If installed backwards, it short-
circuits the supply when the relay energizes. B
Inductive Field Device
PLC Relay Output
C
Output Input
D
Common + – Common
6
7
8 +24 VDC
-
+
9
In the next example, the first eight inputs are sinking, and the last twelve are sourcing.
10
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
+ +
13
L L L L L L L L L L L L L L L L
14
A
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 B
• all output points are wired as sinking
• all source (–) terminals are connected together C
D
4 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
7 Phase A = X0
Phase B = X1
8
9
DL06 versions with DC type output points can use the High Speed I/O Pulse Output
10 feature. It can generate high-speed pulses at up to 10 kHz for specialized control such as
stepper motor / intelligent drive systems. Output Y0 and Y1 can generate pulse and direction
signals, or it can generate CCW and CW pulse signals respectively. See Chapter 3 on high-
11 speed input and pulse output options.
12 Motor
Amplifier
-
13 +
+24 VDC
Signal Common
A
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
C
D
5 Outputs are organized into four banks of four triac switches. Each bank has a common terminal.
The wiring example below shows all commons connected together, but separate supplies and
common circuits may be used. The equivalent output circuit shows one channel of a typical bank.
6 fuse AC
Supply
7 L L L L L L L L L L L L L L L L
9 OUTPUT: 17-240V
Y
X
0 1
INPUT: 90 - 120V
2 3
50 - 60Hz
7 - 15mA
5
0.5A
6 7
PWR: 100-240V
10 11 12 13
50-60Hz 40VA
14 15 16 17 20 21
D0-06AA
22 23
10
06
11 LOGIC
C0
K oyo
12
13 AC
Supply
14
Equivalent Input Circuit Equivalent Output Circuit Derating Chart for AC Outputs
A +V Internal module circuitry Points
+V
B Input
Optical
Isolator L
OUTPUT Optical
Isolator
16
12
0.5 A Y0 - Y7
Y10 - Y17
8
C Common COM
4
17-240 0
D VAC
To
0
32
10
50
20
68
30
86
40
104
50
122
Ambient Temperature ( ˚C/ ˚F)
55˚C
131˚F
5
L L L L L L L L L L L L L L L L
6 G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
7 Y
X
0 1
INPUT: 90 - 120V
2 3 4
7 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20
D0-06AR
21 22 23
8
Typical Relay Life (Operations) at
06
9 Room Temperature
LOGIC
K oyo
Voltage & Load Type X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
10 24VDC Resistive
At 1A At 2A
500K 250K
24VDC Resistive 100K 50K
11 110VAC Resistive 500K 250K
AC
110VAC Resistive 200K 100K Supply
12 220VAC Resistive
220VAC Resistive
350K 200K
100K 50K
13
Equivalent Input Circuit Derating Chart for Relay Outputs Equivalent Output Circuit
14 +V +V Points
16
Internal module circuitry
Optical 2.0A +V
Y0 - Y7 L
A Input
Isolator
To LED
12
8
Y10 - Y17 Output
B Common
0
0
32
10
50
20
68
30
86
40
104
50
122
55˚C
131˚F
Common
To LED
The sixteen relay output channels use terminals on the right side top connector. Outputs are
organized into four banks of four normally-open relay contacts. Each bank has a common
terminal. The wiring example on the last page shows all commons connected together, but 1
separate supplies and common circuits may be used. The equivalent output circuit shows one
channel of a typical bank. The relay contacts can switch AC or DC voltages. 2
D0-06AR General Specifications
External Power Requirements 100 – 240 VAC, 40 VA maximum,
Communication Port 1 9600 baud (Fixed), 8 data K–Sequence (Slave), DirectNET (Slave), MODBUS (Slave)
3
bits, 1 stop bit, odd parity
Communication Port 2 9600 baud (default), 8 data K–Sequence (Slave), DirectNET (Master/Slave), MODBUS
bits, 1 stop bit, odd parity (Master/Slave), Non-sequence / print, ASCII in/out
4
Programming cable type
Operating Temperature
D2–DSCBL
32 to 131° F (0 to 55 C) 5
Storage Temperature –4 to 158° F (–20 to 70 C)
Relative Humidity
Environmental air
5 to 95% (non-condensing)
No corrosive gases permitted
6
Vibration
Shock
MIL STD 810C 514.2
MIL STD 810C 516.2 7
Noise Immunity NEMA ICS3–304
Terminal Type
Wire Gauge
Removable
One AWG16 or two AWG18, AWG24 minimum
8
AC Input Specifications X0-X23
9
Input Voltage Range (Min. - Max.) 80 – 132 VAC, 47 - 63 Hz
Operating Voltage Range 90 – 120 VAC, 47 -63 Hz 10
Input Current 8 mA @ 100 VAC at 50 Hz 10 mA @ 100 VAC at 60 Hz
Max. Input Current
Input Impedance
12 mA @ 132 VAC at 50 Hz 15 mA @ 132 VAC at 60 Hz
14K @50 Hz, 12K @60 Hz
11
ON Current/Voltage >6 mA @ 75 VAC
OFF Current/Voltage <2 mA @ 20 VAC 12
OFF to ON Response < 40 mS
ON to OFF Response
Status Indicators
< 40 mS
Logic Side
13
Commons 4 channels / common x 5 banks (isolated)
14
Relay Output Specifications Y0-Y17
Output Voltage Range
Operating Voltage Range
(Min. – Max.) 5 – 264 VAC (47 -63 Hz), 5 – 30 VDC
6 – 240 VAC (47 -63 Hz), 6 – 27 VDC
A
Output Current
Max. leakage current
2A / point, 6A / common
0.1 mA @264VAC B
Smallest Recommended Load 5 mA @5 VDC
OFF to ON Response
ON to OFF Response
< 15 mS
< 10 mS
C
Status Indicators
Commons
Logic Side
4 channels / common x 4 banks (isolated) D
Fuses None (external recommended)
5
fuse AC
6 L L L L L L L L L L L L L L L L
Supply
7
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
5
Y3
6
Y4 Y6
0.5A
7
C2
10
Y11 Y13 Y14 Y16 N.C.
PWR: 100-240V
11 12 13
50-60Hz 40VA
14 15 16 17 20
D0-06DA
21 22 23
X
10 LOGIC 06
K oyo
11 Points
Derating Chart for AC Outputs
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.
16
12 12
8
0.5 A Y0 - Y7
Y10 - Y17
13 4
0
0 10 20 30 40 50 55˚C
DC
Supply
B +
Input
Isolator
Input
Optical
Isolator
To LED
L
OUTPUT Optical
+V
Isolator
– +
C Common –
Common
COM
D 17-240
VAC
To LED
High Speed Inputs (X0-X3) Standard Inputs (X4-X23) Equivalent Output Circuit
DC Input Specifications 7
Parameter High–Speed Inputs, X0 – X3 Standard DC Inputs X4 – X23
Input Voltage Range
Operating Voltage Range
10.8 – 26.4 VDC
12 – 24 VDC
10.8 – 26.4 VDC
12 – 24 VDC
8
Maximum Voltage
Minimum Pulse Width
30 VDC (7 kHz maximum frequency)
70 µS
30 VDC
N/A 9
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level
Input Impedance
< 2.0 VDC
1.8 k @ 12 – 24 VDC
< 2.0 VDC
2.8 k @ 12 – 24 VDC
10
Minimum ON Current
Maximum OFF Current
>5 mA
< 0.5 mA
>4 mA
<0.5 mA 11
OFF to ON Response <70 µS 2 – 8 mS, 4 mS typical
ON to OFF Response
Status Indicators
<70 µS
Logic side
2 – 8 mS, 4 mS typical
Logic side
12
Commons 4 channels / common x 5 bank (isolated)
AC Output Specifications
13
Output Voltage Range (Min. - Max.)
Operating Voltage
15 – 264 VAC, 47 – 63 Hz
17 – 240 VAC, 47 – 63 Hz
14
On Voltage Drop 1.5 VAC @> 50mA, 4 VAC @< 50mA
Max Current
Max leakage current
0.5 A / point, 1.5 A / common
< 4 mA @ 264 VAC, 60Hz
A
Max inrush current
Minimum Load
10 A for 10 mS
10 mA
B
OFF to ON Response 1 mS
ON to OFF Response
Status Indicators
1 mS +1/2 cycle
Logic Side
C
Commons
Fuses
4 channels / common x 4 banks (isolated)
None (external recommended)
D
5 L L L L L L L L L L L L L L L L
5 6
1.0A
7
PWR: 100-240V
10 11 12 13
50-60Hz 40VA
14 15 16 17 20
D0-06DD1
21 22 23
8 Points
Derating Chart for DC Outputs
9
16
12
0.75A Y0 - Y17 LOGIC 06
K oyo
1.0 A
8
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
10 4
0
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
0 10 20 30 40 50 55˚C
DC
12 Supply
13 +
Input
Optical
Isolator
To LED
+
24VDC Optical
Isolator
OUTPUT
L
14 –
Common + 6–27
VDC
To LED
A COM
+
Optical To LED
C +
Input
Isolator
To LED
24VDC
L
OUTPUT
Optical
Isolator
– + 6–27
D Common VDC
COM
- +24 VDC
L L L L L L L L L L L L L L L L
5
6 G LG 0V
AC(L) AC(N) 24V V0
Y0
Y1
Y2
Y3
V1
Y4
Y5
Y6
Y7 Y10 Y12
V2
V3 Y15 Y17
Y11 Y13 Y14 Y16 CO
OUTPUT: Sourcing Output 12 - 24V 1.0A PWR: 100-240V 50-60Hz 40VA
D0-06DD2
7 Y
X
0 1 2
INPUT: 12 - 24V
3 4
3 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
12
8
0.75A
1.0 A
Y0 - Y7
Y10 - Y17
C0
K oyo
10 4
0
0 10 20 30 40 50 55˚C
32 50 68 86 104 122 131˚F
DC
Supply
12 +V
Internal module circuitry
+V
Optical
13 +
Input
Isolator
To LED
+
+V
24VDC
– -
14 Common Output
L
Common
Optical
Isolator
To LED
B Input
Optical
Isolator
+ +V
Internal module circuitry
Common
D Optical
Isolator
6 fuse
L L L L L L L L L L L L L L L L
AC or DC
Supply
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
Y D0-06DR
24VDC Resistive 100K 50K 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
12
13 DC
Supply
14 F
B Optical
+V +V +V L
Output
+V
Isolator Optical
Input
C +
–
Common
To LED
+
Input
Isolator
To LED
Common
– To LED
D Common
6–27 VDC
6–240 VAC
5 L L L L L L L L L L L L L L L L
+
6
G LG N.C. Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
7 1
+
OUTPUT: Sinking Output
Y
0 2 3
-
4
N.C. C0
6 - 27V
5 6
Y1 Y3
1.0A
7
Y4
10
Y6
11
C2 Y11 Y13 Y14 Y16 +V
PWR: 12-24
12 13 14
20W
15 16 17 20
D0-06DD1-D
21 22 23
X
9 LOGIC 06
K oyo
10 C0
X0
X1
X2
X3
C1
X4
X5
X6
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X10 X12 C3 X15 X17 X20 X22 N.C.
11
12 DC
Supply
+V Internal module circuitry +V
+V +
13 +
Input
Optical
Isolator
To LED
24VDC
L
OUTPUT
Optical
Isolator
14 – + 6–27
12
0.75A
1.0 A
Y0 - Y17
DC Pulse Outputs (Y0 - Y1)
B +V +V
8
Optical +
Isolator 0 To LED
Input 24VDC Optical
C +
–
To LED
0
32
10
50
20
68
30
86
40
104
Ambient Temperature ( ˚C/ ˚F)
50 55˚C
122 131˚F
L
+ 6–27
OUTPUT
Isolator
D Common VDC
COM
5 L L L L L L L L L L L L L L L L
-
6
G LG N.C. Y0 Y2 V1 Y5 Y7 Y10 Y12 V3 Y15 Y17
+ -
7
N.C. V0 Y1 Y3 Y4 Y6 V2 Y11 Y13 Y14 Y16 C0
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 12-24 20W
Y D0-06DD2-D
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
X
INPUT: 12 - 24V 3 - 15mA
8
9 Derating Chart for DC Outputs LOGIC 06
K oyo
Points
10
16 C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
0.75A Y0 - Y7 X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
12
1.0 A Y10 - Y17
8
11
4
0
0 10 20 30 40 50 55˚C
32 50 68 86 104 122 131˚F
DC
12
Ambient Temperature ( ˚C/ ˚F)
Supply
Optical
+V +V
Isolator
Input Isolator
14 +
–
Common
To LED
+
–
Input
To LED
Common
A
DC Standard Outputs (Y2 - Y17)
B DC Pulse Outputs (Y0 - Y1)
Internal module circuitry
+V
Internal module circuitry
C 24VDC
+
+V +
-
24VDC
+V
Output
To LED
-
Output L
D L
Common
Optical
Isolator
To LED Common
Optical
Isolator
INPUT: 12 - 24V
2 3 4
3 - 15mA
5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
12
2.0A Y0 - Y7
Y10 - Y17 C0
X0
X1
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.
8
12 4
0
0 10 20 30 40 50 55˚C
32 50 68 86 104 122 131˚F
13
Ambient Temperature ( ˚C/ ˚F)
14
+V +V
Internal module circuitry
A Optical
+V
Input
Optical
Isolator L
+V
Isolator To LED
Input + Output
B +
–
Common
To LED
–
Common
Common
C 6–27 VDC
To LED
6–240 VAC
Standard Input Circuit (X4-X23)
D High-speed Input Circuit (X0-X3)
Standard Output Circuit
DC Input Specifications
7
Parameter High–Speed Inputs, X0 – X3 Standard DC Inputs X4 – X23
Min. - Max. Voltage Range 10.8 – 26.4 VDC 10.8 – 26.4 VDC 8
Operating Voltage Range 12 -24 VDC 12 -24 VDC
Peak Voltage
Minimum Pulse Width
30 VDC (7 kHz maximum frequency)
70 µs
30 VDC
N/A
9
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC 10
Input Impedance 1.8 k @ 12 – 24 VDC 2.8 k @ 12 – 24 VDC
Max. Input Current
Minimum ON Current
6mA @12VDC 13mA @24VDC
>5 mA
4mA @12VDC 8.5mA @24VDC
>4 mA
11
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 µs 2 – 8 mS, 4 mS typical 12
ON to OFF Response < 70 µs 2 – 8 mS, 4 mS typical
Status Indicators
Commons
Logic side Logic side
4 channels / common x 5 banks (isolated)
13
Relay Output Specifications 14
Output Voltage Range (Min. - Max.) 5 -264 VAC (47 -63 Hz), 5 - 30 VDC
Operating Voltage
Output Current
6 -240 VAC (47 -63 Hz), 6 - 27 VDC
2A / point 6A / common
A
Maximum Voltage 264 VAC, 30 VDC
Max leakage current 0.1 mA @264 VAC B
Smallest Recommended Load 5 mA
OFF to ON Response
ON to OFF Response
< 15 mS
< 10 mS
C
Status Indicators Logic Side
Commons 3 channels / common x 2 banks D
Fuses None (external recommended)
Introduction
1 Built-in Motion Control Solution
2 Many machine control applications require various
types of simple high-speed monitoring and control.
These applications usually involve some type of motion
3 control, or high-speed interrupts for time-critical
events. The DL06 Micro PLC solves this traditionally
4 expensive problem with built-in CPU enhancements.
Let’s take a closer look at the available high-speed I/O
features.
5 The available high-speed input features are:
• High Speed Counter (7 kHz max.) with up to 24 counter presets and built-in interrupt subroutine,
6 counts up only, with reset
• Quadrature encoder inputs to measure counts and clockwise or counter clockwise direction (7 kHz
7 max.), counts up or down, with reset
• High-speed interrupt inputs for immediate response to critical or time-sensitive tasks
8 • Pulse catch feature to monitor one input point, having a pulse width as small as 100µs (0.1ms)
• Programmable discrete filtering (both on and off delay up to 99ms) to ensure input signal integrity
9 (this is the default mode for inputs X0–X3)
The available pulse output features are:
10 • Single-axis programmable pulse output (10 kHz max.) with three profile types, including
trapezoidal moves, registration, and velocity control
13 • Only one HSIO feature may be in use at one time. You cannot use a high–speed input feature and
the pulse output at the same time.
14 Specifications
DL06 Part Number Discrete Input Type Discrete Output Type High-Speed Input Pulse Output
A D0–06AA AC AC No No
D0–06AR AC Relay No No
B D0–06DA DC AC Yes No
D0–06DD1 DC DC Yes Yes
C D0–06DD2
D0–06DR
DC
DC
DC
Relay
Yes
Yes
Yes
No
D0–06DD1–D DC DC Yes Yes
D D0–06DD2–D DC DC Yes Yes
D0–06DR–D DC Relay Yes No
DL06
3
PLC Output Circuit
Y0, Y1 Y2 - Y17 4
High-Speed
I/O Circuit
CPU
5
X0 - X3 X4 - X23
Input Circuit
6
20 Discrete Inputs
7
The high-speed I/O circuit (HSIO) is dedicated to the first four inputs (X0 – X3) and the
first two outputs (Y0 – Y1). We might think of this as a “CPU helper”. In the default
8
operation (called “Mode 60”) the HSIO circuit just passes through the I/O signals to or from
the CPU, so that all twenty inputs behave equally and all sixteen outputs behave equally. 9
When the CPU is configured in any other HSIO Mode, the HSIO circuit imposes a
specialized function on the portion of inputs and outputs shown. The HSIO circuit operates
independently of the CPU program scan. This provides accurate measurement and capturing of
10
high-speed I/O activity while the CPU is busy with ladder program execution.
Wiring Diagrams for Each HSIO Mode
11
After choosing the appropriate HSIO mode for your application, you’ll need to refer to the
section in this chapter for that specific mode. Each section includes wiring diagrams to help 12
you connect the High-Speed I/O points correctly to field devices. An example of a High
Speed Counter mode diagram is shown below. 13
14
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
A
Counter Input Wiring B
Signal
– + Signal Common C
12-24 VDC Supply
D
6 20 Up/Down Counter
7 kHz up/down counter with 24 presets and reset, causes interrupt on
preset
10 In choosing one of the six high-speed I/O modes, the I/O points listed in the table below
operate only as the function listed. If an input point is not specifically used to support a
11 particular mode, it usually operates as a filtered input by default. Similarly, output points
operate normally unless Pulse Output mode is selected.
12
13
14
A
B
C
D
9
Default Mode
Mode 60 (Filtered Inputs) is the default mode. The DL06 is initialized to this mode at the 10
factory, and any time you initialize the scratchpad memory. In the default condition, X0–X3
are filtered inputs (10 mS delay) and Y0–Y1 are standard outputs. 11
12
13
14
A
B
C
D
4 PLC
Y0 - Y1 Y2 - Y17
CPU
5 High-Speed
I/O Circuit
I/O Data
Mode Select
V-Memory
V7633 xxxx
6 X0 - X3 X4 - X23
Input Circuit
7
8 The contents of V7633 is a 16-bit word, to be entered in binary–coded decimal. The figure
below defines what each 4-bit BCD digit of the word represents.
10 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0
0 0 5 0
11
Miscellaneous Setup (BCD) HSIO Mode Setup (BCD)
12 00 = Not Used (default)
10 = Battery Enabled
00 = Not Used
10 = High-Speed Counter
20 = Power-up in RUN 20 = Up/Down Counter
13 30 = Battery Enabled and
Power-up in RUN
30 = Pulse Output
40 = High-Speed Interrupts
50 = Pulse Catch
14 60 = Filtered Inputs (default)
Bits 0 – 7 define the mode number 00, 10.. 60 previously referenced in this chapter. The
A example data “0050” shown selects Mode 50 – Pulse Catch (BCD = 50).
Configuring Inputs X0 – X3
B In addition to configuring V7633 for the HSIO mode, you’ll
need to program the next four locations in certain modes
V-Memory
Mode V7633 xxxx
C according to the desired function of input points X0 – X3.
Other memory locations may require configuring, depending on
X0
X1
V7634
V7635
xxxx
xxxx
the HSIO mode (see the corresponding section for particular
D HSIO modes).
X2
X3
V7636
V7637
xxxx
xxxx
X0 X2 X1 X3 X4 - X23
10
Input Circuit 11
Instead of using X2 and X3 as dedicated reset inputs, you can configure X2 and X3 as normal
12
filtered inputs. In this way, the counter reset must be generated in ladder logic.
13
DL06
PLC
Output Circuit 14
Y0 - Y1 Y2 - Y17
HSIO
I/O data
CPU A
Counter 1 Counter 2 V-memory
CLK Reset CLK Reset Filter Mode Select
V7633 0010 B
X0 X1 X2 - X3
Input Circuit
X4 - X23
C
D
Wiring Diagram
A general wiring diagram for counters/encoders to the DL06 in HSIO Mode 10 is shown
1 below. Many types of pulse-generating devices may be used, such as proximity switches,
single-channel encoders, magnetic or optical sensors, etc. Devices with sinking outputs (NPN
2 open collector) are probably the best choice for interfacing. If the counter sources to the
inputs, it must output 12 to 24 VDC. Note that devices with 5V sourcing outputs will not
3 work with DL06 inputs.
C0
X0
X1
X2
X3
C1
X4
X5
X6
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
5
Counter Input Wiring
6 Signal
– + Signal Common
(sinking) (sourcing)
12 12-24 VDC Supply
Ground – + Common
13
In the circuit diagram below, an encoder has open-emitter PNP transistor outputs. It sources
14 current to the PLC input point, which sinks the current back to ground. Since the encoder
sources current, no additional power supply is required. However, note that the encoder
A output must be 12 to 24 volts (5V encoder outputs will not work).
Counter Output
B +12 to 24 VDC
Input
X0 - X3 Input
C Output (sourcing)
:
(sinking)
Ground Common
D
0 0 1 0
3
For the function of bits 8 - 15,
refer to page 3-6.
HSIO Mode Setup (BCD) 4
10 = High-Speed Counter
Choose the most convenient method of programming V7633 from the following: 5
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor or Data View 6
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part of 7
your application program. An example program later in this section shows how to do this.
Presets and Special Relays 8
Presets are used to cause a particular action to occur when the count reaches the preset value.
Refer to the figure below. Each counter features 24 presets, which you can program. Presets
are double word numbers so they occupy two V-memory registers. The user selects the preset
9
values, and the counter continuously compares the current count with the preset. When the
two are equal, a special relay contact is energized and program execution jumps to the 10
interrupt routine.
We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you 11
desire. After the interrupt service routine is complete, the CPU returns to the ladder program, resuming
program execution from the point of interruption. The compare function is ready for the next preset event. 12
X0, up counter clock
Current CPU Scan
X2, external reset
Counter 1
Reset 1 Value
Does =
Input
Update
13
X1, up counter clock Count 1 =
Current
X3, external reset
Counter 2
Reset 2 Value
Preset?
Ladder
Program
INT 14
Counter 2: Preset Data Execution
HSIO
V3710 0000
V3712 0000
1500
2500 Does
= Current
Interrupt
Routine
A
V3632
Counter 0000 Data2000
1: Preset Count 2 =
Instruction Program
V3630
V3634 0000
V3632 0000
0000 1000
V3636 0000
V3634
2500
2000
0000 2500 3175
Preset?
Output
SPxxx B
V3636 0000 3175 Update IRT
4 Event C
Preset = 150
Event C
Preset = 150
(A + B + C)
5 Event B Event B (A + B)
Preset = 100 Preset = 100
6
Event A Event A
7 Preset = 50 Preset = 50
9 In the example above, presets are established at 50, 100, and 150. The difference between
absolute and incremental modes is shown. Absolute presets trigger events at the preset values,
10 50, 100, and 150. Incremental presets trigger events at the cumulative totals: 50, 150, and
300.
11
12
13
14
A
B
C
D
OUT
result in accumulator.
Output this address to
V7630 2000
Preset Table
3
V7630, the location of the
V7630 V2001 V2000 0000 1000
LDD
Load 0000 FFFF
Default Preset Table Example
V3631 V3630 0000 1000
12
into accumulator.
Kffff V3633 V3632 0000 2000
OUTD
Output this value to V3635 V3634 0000 2500 13
V3640/V3641, the registers V3637 V3636 0000 3175
V3640 beyond the Preset Table.
V3641 V3640 0000 FFFF 14
In incremental mode, you can choose not to reset the counter or the cumulative total, or you
can choose to reset only the counter, or you can choose to reset the counter and the
cumulative total when the table-end code is read. In the example, FFFF has been placed in
A
V3640 since the last preset was in V3636, and we are using fewer than 24 presets.
NOTE: In absolute mode each successive preset must be greater than the previous preset value. If a preset
B
value is less than a lower-numbered preset value, the CPU cannot compare to that value, since the
counter can only count upwards. C
D
5 2
3
V3633 / V3632
V3635 / V3634
SP541
SP542
2
3
V3713/V3712
V3715/V3714
SP571
SP572
4 V3637 / V3636 SP543 4 V3717/V3716 SP573
6 5
6
V3641 / V3640
V3643 / V3642
SP544
SP545
5
6
V3721/V3720
V3723/V3722
SP574
SP575
7 V3645 / V3644 SP546 7 V3725/V3724 SP576
7 8 V3647 / V3646 SP547 8 V3727/V3726 SP577
9 V3651 / V3650 SP550 9 V3731/V3730 SP600
8 10
11
V3653 / V3652
V3655 / V3654
SP551
SP552
10
11
V3733/V3732
V3735/V3734
SP601
SP602
12 V3657 / V3656 SP553 12 V3737/V3736 SP603
9 13 V3661 / V3660 SP554 13 V3741/V3740 SP604
14 V3663 / V3662 SP555 14 V3743/V3742 SP605
10 15
16
V3665 / V3664
V3667 / V3666
SP556
SP557
15
16
V3745/V3744
V3747/V3746
SP606
SP607
17 V3671 / V3670 SP560 17 V3751/V3750 SP610
11 18 V3673 / V3672 SP561 18 V3753/V3752 SP611
19 V3675 / V3674 SP562 19 V3755/V3754 SP612
12 20
21
V3677 / V3676
V3701 / V3700
SP563
SP564
20
21
V3757/V3756
V3761/V3760
SP613
SP614
22 V3703 / V3702 SP565 22 V3763/V3762 SP615
13 23
24
V3705 / V3704
V3707 / V3706
SP566
SP567
23
24
V3765/V3764
V3767/V3766
SP616
SP617
14 The consecutive addresses shown above for each relay are those assigned by the CPU as
default addresses. The Pointer for the start of these addresses is stored by the CPU at V7630.
If you have a conflict of addresses because of pre-existing code written to these addresses, you
A can change the default block of addresses merely by having your ladder logic place a different
pointer value in V7630. To change the table location. use the LDA and OUT instructions as
B shown on the previous page.
C
D
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
5
LOGIC
C0 X1
06
K oyo
7
Encoder Motor
to X0 and X1
quadrature pulses
Start lead screw cutter head
8
The timing diagram below shows the duration of each equal relay contact closure. Each 9
contact remains on until the next one closes. All go off when the counter resets.
10
Equal Relays A B C
11
SP540
SP541
12
SP542
13
NOTE: Each successive preset must be two numbers greater than the previous preset value. In the
industrial lathe example, B>A+2 and C>B+2. 14
A
B
C
D
X Input Configuration
The configurable discrete input options for High-Speed Counter Mode are listed in the table
1 below. Input X0 is dedicated for the first counter clock input. Input X1 can be the clock for
the second counter or a filtered input. The section on Mode 60 operation at the end of this
2 chapter describes programming the filter time constants. Inputs X2 and X3 can be configured
as the counter resets, with or without the interrupt option. The interrupt option allows the
reset input (X2 and X3) to cause an interrupt like presets do, but there is no SP relay contact
3 closure (instead, X2 and X3 will be on during the interrupt routine, for 1 scan). Or finally,
X2 and X3 may be left simply as a filtered input.
4 Input Options
Input Configuration Register Function Hex Code Required
5 X0 V7634 Counter #1 Clock
0001 (absolute) (default)
0101 (incremental)
6 Counter #2 Clock
0001 (absolute) (default)
0101 (incremental)
Interrupt 0004
7 X1 V7635
Pulse Input 0005
xx06, xx = filter time
Filtered Input 0 - 99 ms (BCD)
8 Counter #1 Reset (no interrupt)
0007* (default)
0207*
0107*
9 X2 V7636
Counter #1 Reset (with interrupt)
Interrupt
0307*
0004
Pulse Input 0005
10 Filtered Input
xx06, xx= filter time
0 - 99 ms (BCD)
0007* (default)
11 Counter #2 Reset (no interrupt)
12 X3 V7637 Interrupt
Pulse Input
0004
0005
xx06, xx= filter time
Filtered Input
13 0 - 99 ms (BCD)
*With the counter reset, you have the option of a normal reset or a faster reset. However, the
14 fast reset does not recognize changed preset values during program execution. When ‘0007’ or
‘0107’ are set in V7636 or V7637 and preset values are changed during program execution,
the DL06 recognizes the changed preset values at the time of the reset. When ‘0207’ or ‘0307’
A are set in V7636 or V7637 the CPU does not check for changed preset values, so the DL06
has a faster reset time.
B
C
D
XX
12
Enable Input UDC CT174
(or CT176)
13
XX
Preload Input Kxxxxxxxx 14
XX
Reset Input Preset Range:
1-99999999
A
When the enable input is energized, the up/down counter CT174 will respond to pulses on B
X0 and increment. The updown counter CT176 will respond to pulses on X1 and increment.
The reset input contact behaves in a logical OR fashion with the physical reset input. X2
(when selected) resets counter 1. X3 (when selected) resets counter 2. So,the high speed
C
counter can receive a reset form either the contact(s) on the reset rung in the ladder, OR the
external reset X2 or X3, if you have configured X2 or X3 as an external reset. D
4 Direct SOFT32
First Scan Only
5 SP0
LD
K10
Load constant K10 into the accumulator . This
selects Mode 10 as the HSIO mode.
6 Mode 10 OUT
V7633
Output the constant K10 to V7633, the
location of HSIO Mode select register .
7 LD
K1
Load the constant required to configure X0 as
the counter 1 clock.
13 OUT
Output the constant K7 to V7637, the location of
the setup parameter for X3.
V7637
14 SP1
UDC CT174 CT174 is the HSIO counter. The first rung’s SP1
always enables the counter. The Preload Input in
SP1
A K99999999
the middle is always of f. The third rung’s Reset
input is always off, because we will use the
external reset.
SP1
B
continued on next page
C
D
SP1
3
SP1
UDC
K99999999
CT176 CT176
always enables the counter. The Preload Input in
the middle is always of f. The third rung’s Reset
4
input is always off, because we will use the
SP1
external reset.
5
SP1
LDD
V1174
Load the current count of the HSIO counter in
V1174 and V1175 into the accumulator
6
CMPD
K123456
Use the Compare-double instruction to compare
the double word in the accumulator to the constant
7
K123456.
SP62 Y0
OUT The execution of the above CMPD instruction turns
8
on special relay contact SP62 if the current count
SP1
is greater than the comparison number (K123456).
CMPD
Use the Compare-double instruction to compare
10
K345678 the double word in the accumulator to the constant
SP62 Y1
K345678
11
OUT The execution of the above CMPD instruction turns
on special relay contact SP62 if the current count
is greater than the comparison number (K345678). 12
END END coil marks the end of the main program.
13
14
A
B
C
D
I/O Counter
X3 - Cutter head extended
7 SP0
Direct SOFT32
Enable Interrupts before reaching a preset
ENI generates an interrupt. Special Relay SP0 is on
8 SP0
during the first CPU scan.
10 LD
K1
Load the constant required to configure X0 as
the counter clock.
11 OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.
13 V7635
LD
setup parameter for X1.
A LD
K1006
Load the constant required to configure X3 as
a filtered input.
B OUT
V7637
Output the constant to V7637, the location of the
setup parameter for X3.
C LDA
O3630
accumulator. This instruction automatically
converts the address into hex.
1
SP0 Load the preset A value into the accumulator .
LDD
Load Presets
K1500
LDD
Load the preset B value into the accumulator . 3
K3780
OUTD
V3632
Output the accumulator contents to the memory
location for preset 2.
4
LDD
K4850
Load the preset C value into the accumulator .
5
OUTD Output the accumulator contents to the memory
V3634 location for preset 3.
SP1 8
UDC CT174 CT174 is the HSIO counter. The first rung’ s SP1
SP1
K99999999
always enables the counter. The preload input in
the middle is off (unused in this example). 9
SP1
X4
RST
Y0
Input X3 energizes when the groove has finished
cutting. So, we retract the cutter head. 12
SET Turn lead screw on again, after cutter head has
retracted. 13
END END coil marks the end of the main program.
Some applications will require a different type of action at each preset. It is possible for the
1 interrupt routine to distinguish one preset event from another, by turning on a unique output
for each equal relay contact SPxxx. We can determine the source of the interrupt by
examining the equal relay contacts individually, as well as X2. The X2 contact will be on
2 (inside the interrupt routine only) if the interrupt was caused by the external reset, X2 input.
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
LD
Load the constant required to configure X0 as
the counter clock.
6
K1
OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.
7
LD
K1006
Load the constant required to configure X1 as
a filtered input. 8
Output the constant to V7635, the location of the
OUT
V7635 setup parameter for X1.
LD
Load the constant required to configure X3 as
a filtered input.
11
K1006
OUT
V7637
Output the constant to V7637, the location of the
setup parameter for X3.
12
C0
SET Set C0 on at powerup to enable counting. 13
C0
UDC CT174 CT174 is the HSIO counter. The first rung’s C0
contact enables the counter . The dummy input is in
14
C1 the middle.
K99999999
C2
A
The third rung’s Reset input is normally off,
SP0
because we will use the external reset. You can
optionally reset the counter value on each powerup
using the SP0 contact.
B
C
continued on next page
D
3 LDD
K3000
Load the BCD value K3000 into the
accumulator.
4 V1174
C1
of the accumulated count for CT76.
7
8
9
10
11
12
13
14
A
B
C
D
7
DL06 Output Circuit
8 PLC
HSIO
Y0 - Y1 Y2 - Y17
CPU
I/O data
9 Phase A
Counter
Phase B Reset Filter Mode Select
V-memory
V7633 0020
10 X0 X1 X2 X3
Input Circuit
X4 - X23
11 For standard up/down counting, input X0 is dedicated to the up counting signal, and input
X1 is dedicated to the down counting signal. The X2 input resets the counter to zero when
12 energized.
13 DL06
PLC
Y0 - Y1
Output Circuit
Y2 - Y17
14 Counter
HSIO
Filter
I/O data
Mode Select
CPU
V-memory
Up Down Reset V7633 0020
A X0 X1 X2 X3 X4 - X23
Input Circuit
B
C
D
Counterclockwise sequence
Phase A
8
Phase B 9
Leading Edge Signal one cycle
K oyo
10
C0
X0
X1
X2
X3
C1
X4
X5
X6
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X10 X12 C3 X15 X17 X20 X22 N.C. 11
12
B
A
Quadrature Encoder Input
13
14
LOGIC 06
C0
K oyo
B
Reset
6
In the next circuit, an encoder has open-emitter PNP transistor outputs. It sources current to
7 the PLC input point, which sinks the current back to ground. Since the encoder sources
current, no additional power supply is required. However, note that the encoder output must
8 be 12 to 24 volts (5V encoder outputs will not work).
Encoder Output,
(one phase)
9 +12 to 24VDC Phase A or B Input
Input
10 Output (sourcing)
(sinking)
11 Ground Common
12
13
14
A
B
C
D
Choose the most convenient method of programming V7633 from the following:
6
• Include load and out instructions in your ladder program
• DirectSOFT’s memory editor
7
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part
8
of your application program. An example program later in this section shows how to do this.
Presets and Special Relays 9
The goal of counting is to cause a particular action to occur when the count reaches a preset
value. Refer to the figure below. Each counter features 24 presets, which you can program. A 10
preset is a number you select and store so that the counter will continuously compare the
current count with the preset. When the two are equal, a special relay contact is energized and
program execution jumps to the interrupt routine.
11
We recommend using the special relay(s) in the interrupt service routine to cause any
immediate action you desire. After the interrupt service routine is complete, the CPU returns
12
to the ladder program, resuming program execution from the point of interruption. The
compare function is ready for the next preset event. 13
CPU Scan
X0, up counter clock
Counter 1
Current
Input
Update
14
X1, down counter clock
Value
Counter 2
Reset 1 Ladder
Program
INT
A
X2, external reset Does = Execution
V-memory Preset Data
V3630 0000 1000
count
= Preset?
Current
HSIO
Interrupt
Routine
B
V3632 0000 2000 Instruction Program
V3634 0000
V3636 0000
2500
3175
Output
Update
SPxxx
IRT
C
V3706 0921 0000
D
High Low
X Input Configuration
The configurable discrete input options for High-Speed Counter Mode are listed in the table
1 below. The section on Mode 60 operation at the end of this chapter describes programming
the filter time constants.
2 Mode 20 Up/Down Counter
3 Input Configuration
Register Function Hex Code Required
4 Up counting
0202 (standard, absolute)
0302 (standard, incremental)
0002 (quadrature, absolute) (default)
X0 V7634
5 Phase A
0102 (quadrature, incremental)
1002 (quadrature, absolute) 4x counting*
1102 (quadrature, incremental) 4x counting*
6 X1 V7635 Down counting or Phase B 0000
Counter Reset (no interrupt) 0007** (default)
7 0207**
0107**
X2 V7636 Counter Reset (with interrupt) 0307**
8 Pulse input 0005
Filtered input xx06 (xx = filter time, 0 - 99ms (BCD)
9 X3 V7637
Pulse input
Filtered input
0005
xx06 (xx = filter time, 0 - 99ms (BCD) (default)
10 * With this feature, you can count 4 times more with the same encoder.
11 4x counting 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Normal counting 1 2 3 4
12
Phase A
13
Phase B
14 ** With the counter reset you have the option of a normal reset or a faster reset. However, the fast
reset does not recognize changed preset values during program execution. When ‘0007’ or ‘0107’
A are set in V7636 and preset values are changed during program execution, the DL06 recognizes the
changed preset values at the time of the reset. When ‘0207’ or ‘0307’ are set in V7636 the CPU
B does not check for changed preset values, so the DL06 has a faster reset time.
C
D
7
Counts UP and DOWN Counts UP and DOWN (from X0, X1)
Preload counter by write to value
Reset input is internal only
Can use Preload Input to change count
Reset may be internal or external 8
The next figure shows the how the HSIO quadrature counter will appear in a ladder program.
9
Enable Input UDC CT174
10
Preload Input
Kxxxxxxxx
11
Reset Input
Preset Range:
1-99999999
-8388608 to 8388607
12
When the enable input is energized, the counter will respond to quadrature pulses on X0 and
X1, incrementing or decrementing the counter at CT174 – CT175. The reset input contact
13
behaves in a logical OR fashion with the physical reset input X2. This means the quadrature
counter can receive a reset from either the contact(s) on the reset rung in the ladder, OR the 14
external reset X2.
A
B
C
D
3 SP0
LD
Load constant K20 into the accumulator . This selects
Mode 20 as the HSIO mode.
K20
4 OUT
V7633
Output this address to V7633, the location of the HSIO
Mode select register .
5 LD
K2
Load the constant required to configure X0 and X1 as a
quadrature absolute input.
6 LD
K107
Load the constant required to configure X2 as an external
reset with interrupt.
7 OUT
V7636
Output the constant to V7636, the location of the setup
register for X2.
8 K2006
OUT
input.
9 LDD
K5000
Load the preset 1 value into the accumulator.
10 OUTD
V3630
Output the accumulator contents to the memory
location for preset 1.
11 K10000
12 LDD
K15000
Load the preset 3 value into the accumulator.
13 OUTD
V3634 location for preset 3.
14 OUTD
V3636
Output the accumulator contents to the memory
location for preset 4 (end of preset marker).
A SP1
UDC CT174 CT174 is the HSIO quadrature counter. The first rung’ s SP1
always enables the counter . The dummy input is used by
SP1 the built-in compiler.
B SP1
K18724
D
continued on next page
INT O0
1
SP540 Y0
OUT
Set Y0 to ON when the counter reaches or exceeds
our comparison value while COUNTING UP.
2
SP541 Y1
OUT
Set Y1 to ON when the counter reaches or goes below
our comparison value while COUNTING DOWN. 3
IRT
4
The Load Accumulator instructions have set up the V-memory as required, i.e. 20 in V7633 5
for the mode and 0202 in V7634 to designate the standard up/down with the absolute preset
mode. By placing 0107 in V7636, an external reset for counter CT174 is selected and it will
execute interrupt 0 on the rising edge of the reset. Presets for up/down counting have been
6
stored in memory locations V3630 through V3635. The next even numbered location
following this has FFFF to indicate we have no more presets. 7
8
9
10
11
12
13
14
A
B
C
D
8 LD
K202 Standard counting
Absolute preset mode at X0 and X1
9 OUT
V7634
LD
10 K0
OUT
Must be zero with mode 20
V7635
11 LD
K7
External reset without interrupt (X2)
12 OUT
V7636
13 LD
K1006
Discrete filtered input at (X3) 10 ms.
OUT
14 V7637
SP1
A SP1
UDC CT174 Up/Down counter
Only one counter is used with mode 20. The actual
K500 count (32-bit) is stored in V1175/V1174. When pulses
B SP1
are received at point X1, the value in V1175/V1174
will decrement.
C Actual counts
V1174 K450
Y20
When the pulse count reaches and exceeds 450,
OUT
Over 500 latch
the preset value of 500, the output of the
counter (CT174) goes high and turns on
the "over 500" light (Y21) and latches C5.
2
C5
SET 3
Over 500 latch
When the count is 500 or greater, the
C5 Y22
OUT
rerouting gate (Y22) turns on and will stay
on for 30 seconds after the count falls
below 500.
4
Counter output
CT174 TMR
5
TIMER 0 OUTPUT
TO
K300
Over 500 latch
6
T0 C5
RST 7
END END coil marks the end of the main program.
8
9
10
11
12
13
14
A
B
C
D
4 SP0
ENI Enable interrupts
LD
K20
5 OUT
V7633
Mode 20
6 LD
K2
Quadrature counting
absolute mode at X0 and X1
OUT
7 V7634
LD
K0
8 OUT
V7635
Must be zero
9 LD
K107
OUT
External reset w/interrupt (X2)
V7636
10 LD
K1006 Discrete filtered input at (X3)
10 ms.
11 OUT
V7637
SP0
LDD
12 K5000
OUTD
Presets for up counting.
This rung loads the counter's presets.
In this case, the absolute preset
mode has been selected.
V3630
13 LDD
K6000
14 OUTD
V3632
LDD
K7500
A OUTD
V3634
B LDD
K8000
OUTD
C V3636
LDD
KFFFF Tell CPU that there are
D OUTD
V3640
no more presets.
Drilling sequence
C1
RST
Drilling sequence
3
completed completed
(one hole only).
1st preset
(one hole only).
Reversing
4
actual counts. Position Table. Glue injection.
SP1
8
SP1
UDC CT174
K8388607
9
SP1
10
Drilling sequence initiation.
C5
One-shot bit.
C6
11
One-shot bit.
PD
2 Drill turning.
Y21
RST
4 SET
END
6 INT O0
7 SP540
Forwarding
Positioning Table. Y30
OUT
9 SP541
Forwarding
Positioning Table. Y30
OUT
11 SP542 Forwarding
Positioning Table. Y30
OUT
13 SP543
Forwarding
Positioning Table. Y30
OUT
14 Reversing
Positioning
Table.
A Y31
SET
B Position Table
home limit switch
C5
SET
(resets counter to zero). Reversing
C X2
Positioning
Table. Y31
RSTI
D IRT
10 Direction
Stepper
Motor
11 Y
0 1 2
G
3
LG 0V
AC(L) AC(N) 24V C0
OUTPUT: 6-240V
4
Y0
50 - 60Hz
Y1
5
Y2
Y3
C1
6
Y4
Y5
Y6
7
Y7 Y10 Y12
2.0A, 6 - 27V
C2
10 11
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A
12
PWR: 100-240V
13 14 15 16
50-60Hz 40VA
17 20
D0-06DR
21 22 23
PWR
RUN
CPU
TX1
RX1
Drive
Amplifier
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA
12 LOGIC
C0 X1
06
K oyo
C NOTE: The pulse output is designed for open loop stepper motor systems. This, plus its minimum velocity
of 40 pps make it unsuitable for servo motor control.
HSIO 5
SP 104 Profile Complete
Input Circuit
10
11
IMPORTANT NOTE: In Pulse Output Mode, Y0 and Y1 references are redefined or are used differently in
two ways. Physical references refer to terminal screws, while logical references refer to I/O references in 12
the ladder program. Please read the items below to understand this very crucial point.
Notice the I/O point assignment and usage in the above diagram: 13
• X0, X1, X2 and X3 can be filtered inputs or pulse inputs in Pulse Output Mode, and they are
available as input contacts to the ladder program. 14
• X1 behaves as an external interrupt to the pulse generator for automatic/step trapezoidal profiles. In
other profile modes, it can be used as a filtered input or pulse input just like X0 (registration mode
configuration shown above).
A
• References “Y0” and “Y1” are used in two different ways. At the discrete output connector, Y0 and
Y1 terminals deliver the pulses to the motion system. The ladder program uses logical references Y0
B
and Y1 to initiate “Start Profile” and “Load Position Value” HSIO functions in Mode 30.
Hopefully, the above discussion will explain why some I/O reference names have dual C
meanings in Pulse Output Mode. Please read the remainder of this section with care, to
avoid confusion about which actual I/O function is being discussed. D
Wiring Diagram
The generalized wiring diagram below shows pulse outputs Y0 and Y1 connected to the drive
1 amplifier inputs of a motion control system.
Motor
Amplifier
2
3 Signal Common
+24 VDC
Power Input Pulse - +
4 Direction
Output Input
10 (sinking) + (sourcing)
Common – Ground
11
12 The following circuit shows how to interface to a sinking drive input using a pullup resistor.
13 Please refer to Chapter 2 to learn how to calculate and install R pullup.
C Common – Ground
4 0 0 3 0
7
8 Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
9 • DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
10 We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to do
this.
11
Memory Location V3630 (default)
12 Bits 15
0
14
0
13
0
12
0
11 10
0 1
9
1
8
1
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0
13 0 7 0 0
B
C
D
7 V3640
V3641
Step 3 Distance
Step 4 Acceleration
1 to 9999
4 to 1000
Pulses
x 10 pps
V3642 Step 4 Distance 1 to 9999 Pulses
8 V3643 Step 5 Deceleration 4 to 1000 x 10 pps
V3644 Step 5 Distance 1 to 9999 Pulses
9 V3645 Step 6 Deceleration 4 to 1000 x 10 pps
V3646 Step 6 Distance 1 to 9999 Pulses
10 V3647
V3650
Step 7 Deceleration
Step 7 Distance
4 to 1000
1 to 9999
x 10 pps
Pulses
V3651 Step 8 Deceleration 4 to 1000 x 10 pps
11 V3652 Step 8 Distance 1 to 9999 Pulses
12 * If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on.
**To set a negative number, put 8 in the most significant digit. For example: -8388608 is 88388608 in V3631 and V3632.
13
14
A Velocity Control
V-Memory Function Range Units
B V3630 Velocity Profile 2000 only –
V3631 / 3632 Direction Select 0=CW, 80000000=CCW, Pulses
C V3633
V3636
Velocity
Error Code
4 to 1000
(see end of section)
x 10 pps
–
800 11
600 Target = 7000 pulses
400
positioning velocity = 800 Hz
Ending velocity =
12
200 Starting velocity =
0 Hz or 40 to 1000 Hz
40 to 1000 Hz
100 ms to 10 secs 100 ms to 10 secs
Time 13
0 pulses 7000 pulses
Acceleration Deceleration 14
The user determines the starting velocity, the acceleration/deceleration times, and the total
number of pulses. The CPU computes the profile from these inputs. A
B
C
D
5 600
2
3 6
7
400
6 200
1
100
Time
7 0 pulses
Acceleration
1000 pulses
Deceleration
6000 pulses 7000 pulses
8 Define steps 1 through 4 for gradual acceleration to the target velocity and define steps 5
through 8 for gradual deceleration from the target velocity. This type of profile is appropriate
for applications involving large stepper motors and/or large inertia loads. It can, however, be
9 used to provide gradual ramping in applications involving smaller motors and loads.
Velocity Control Defined
10 The Velocity Control defines only the direction and speed of motion. There is no target
position specified, so the move can be of indefinite length. Only the first velocity value needs
11 to be defined. The remaining velocity values can be created while motion is in progress.
Arrows in the profile shown indicate velocity changes.
12 Velocity Control Profile
Velocity (Hz)
13 800
14 600
400
A 200
Time
B
C
D
2 Velocity
Trapezoidal Profile
5 Time
The following program will realize the profile drawn above, when executed. The beginning of
7 the program contains all the necessary setup parameters for Pulse Output Mode 30. We only
have to do this once in the program, so we use first-scan contact SP0 to trigger the setup.
8 DirectSOFT32
9 LD
K30
Mode 30 as the HSIO mode.
1
SP0 Load the constant K4100 which is required to select
LD
K4100
Automatic Trapzoidal Profile, absolute positioning,
without interrupt and a target velocity of 1 kHz.
Output this constant to V3630, the location of the Profile
2
Profile / Target OUT Select / Starting Velocity setup register .
Velocity
Target Position
V3630
Load the constant K5000 which selects a target
3
LDD position of 5000 pulses. Don’t forget to use double
K5000
OUTD
word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
4
the Target Position double-word register .
V3631
Starting Velocity LD
Load the constant K4 which is required to select a
starting velocity of 40 Hz (4 x 10 pps).
5
K4
OUT
Output this constant to V3633, the location of the starting
velocity parameter register .
6
V3633
Acceleration LD
Load the constant K20 which is required to select an
acceleration time of 2 seconds (20 x 100 mS).
7
K20
OUT
V3634
Output this constant to V3634, the location of the
acceleration parameter register .
8
Deceleration LD
K40
Load the constant K40 which is required to select a
deceleration time of 4 seconds (40 x 100 mS). 9
OUT
V3635
Output this constant to V3635, the location of the
deceleration parameter register . 10
Start Profile
X3 Y0
OUT
We use a spare filtered input to allow the operator
to start the profile. When the operator turns X3 ON,
then OFF , logical output Y0 starts the profile.
11
Profile Complete
SP 104 Y2
OUT
SP104 is the logical output of the HSIO to indicate
the move is complete. W e use Y2 to energize an
12
annunciator that the profile has finished.
13
Preload Position Value
At any time you can write (preload) a new position into the current position value. This is 14
often done after a home search (see the registration example programs).
A
C0 Load the constant K1000 as the new current position
LDD
K1000
value.
B
Profile / Target Output this constant to V1174/V1175 (CTA174/CTA175). the
Velocity
OUTD
V1174
location of the current position value.
C
Y1
PD Turn on Y1 for 1 scan. The off-to-on transition
causes the HSIO to preload the current position
with the value in V1174/V1175.
D
detect the moment of contact with the part surface on each drill, moving the bit into the part
a constant distance after contact. Detect contact Finished part area Scrap Area Registration
7 marks direction of motion.
3. The home search move allows a motion system to calibrate its position on startup. In this
8 case, the positioning system makes an indefinite move and waits for the load to pass by a
home limit switch. This creates an interrupt at the moment when the load is in a known
9 position. We then stop motion and preload the position value with a number which equates
to the physical “home position”.
10 When an interrupt pulse occurs on physical input X1, the starting position is declared to be
the present count (current load position). The velocity control switches to position control,
moving the load to the target position. Note that the minimum starting velocity is 40 pps.
11 This instantaneous velocity accommodates stepper motors that can stall at low speeds.
12 Velocity
Registration Profile
Target Velocity
13 Starting
Velocity
Accel Decel
14 Start
position
Target
position
Time
Start Y0
A External Interrupt X1
B The time line of signal traces below the profile indicates the order of events. The CPU uses
logical output Y0 to start the profile. Immediately the HSIO turns off the Profile Complete
C signal (SP104), so the ladder program can monitor the move’s completion by sensing the
signal’s on state.
D
The Automatic Trapezoidal profile we want to perform is drawn and labeled in the following
figure. It consists of a non-zero starting velocity, and moderate target velocity.
1
Automatic Trapezoidal Profile
Velocity
Target V elocity = 1 kHz
2
Accel = 2 sec Decel = 4 sec 3
Ending Velocity =
Starting
Velocity = 40 Hz
80 Hz 4
Time 5
Start position Target position = 5000
6
The following program will realize the profile drawn above, when executed. The first program
rung contains all the necessary setup parameters. We only have to do this once in the
program, so we use first-scan contact SP0 to trigger the setup.
7
DirectSOFT32
SP0 Load constant K30 into the accumulator. This selects
8
LD Mode 30 as the HSIO mode.
Mode 30
K30
OUT
Output this address to V7630, the location of the pointer
to the Profile Parameter Table.
11
V7630
Select Pulse / LD
K103
Load the constant K103 which is required to select
pulse and direction for physical Y0 and Y1 functions,
12
Direction respectively (Use K3 if your application requires CCW and CW).
OUT
V7632
Output this constant to V7637, configuring the pulse
output type. 13
Filtered Inputs LD
K2006
Load the constant K2006 which is required to select X0 and X1
as a filtered input with a 20 mS filter time constant. 14
OUT
V7634
Output this constant to V7634, configuring X0.
A
Output this constant to V7635, configuring X1.
OUT
V7635 B
Load the constant K1006 which is required to select X2 and X3 as a
LD filtered input with a 10 ms filter time constant.
K1006
Output this constant to V7636, configuring X2.
C
OUT
V7636
OUT
Output this constant to V7637, configuring X3.
D
V7637
1
SP0 Load the constant KF100 which is required to select
2 LD
KF100
Automatic Trapezoidal Profile, relative positioning, with interrupt an
velocity of 1 kHz (Fxxx times 10 pps).
Profile / Target Output this constant to V3630, the location of the Profile
OUT
3 Velocity V3630
Select / Starting Velocity setup register.
4 K5000
OUTD
word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
the Target Position double-word register.
V3631
5 Starting Velocity LD
Load the constant K4 which is required to select a
starting velocity of 40 Hz (4 x 10 pps).
K4
6 OUT
Output this constant to V3633, the location of the starting
velocity parameter register.
V3633
7 Acceleration LD
K20
Load the constant K20 which is required to select an
acceleration time of 2 seconds (20 x 100 mS).
8 OUT
V3634
Output this constant to V3634, the location of the
acceleration parameter register.
9 Deceleration LD
K40
Load the constant K40 which is required to select a
deceleration time of 4 seconds (40 x 100 mS).
Y0
SET We use an input to allow the operator to start the
13 Profile Complete
profile. X3 is a momentary Start switch. When the
operator turns X3 ON, logical output Y0 starts the
profile.
SP104
14 Y2
OUT SP104 is the logical output of the HSIO to indicate
the move is complete. W e use Y2 to energize an
annunciator that the profile has finished. This won’t
C0
A PD
occur until after the interrupt from X1 has occurred
and the profile is complete.
C0 Y0
B RST
C The profile will begin when the start input (X3) is given. Then the motion begins an
indefinite move, which lasts until an external interrupt on X1 occurs. Then the motion
continues on for 5000 more pulses before stopping.
D
Select Pulse /
V7630
Configure the Y0 and Y1
K1006
selects a 10 mS filter
time constant.
Output this constant to
C
LD pulse outputs for pulse OUT V7630, configuring X2.
Direction V7636
K103
OUT
and direction, respectively.
3 Starting Velocity LD
K4
The constant K4 selects a
starting velocity of 40 Hz
(4 x 10 pps).
Y0
SET Start profile again.
CCW past home
4 OUT
V3633
C2 C3 X1 C3
SET CCW past home
The constant K20 selects
5 Acceleration LD
K20 an acceleration time of 2
seconds (20 x 100 mS). LDD
K50
Load a small
positive position
count (go CW).
OUT
6 Deceleration
V3634 OUTD
V3631
OUT We’ll choose the same for
7 X7
V3635 the deceleration value. Home Limit found, CW search direction
C3 X1 Y0
C10
Start the home search RST Turn off Start Profile.
8 SET
when X7 turns on.
C4
Go CW back to
Search in CW direction SET home.
9 C10 C0
LDD
K50
The constant K50 selects
a target position of 50
C4
TMR Add a timer to
create a slight
pulses (CW direction). T1 delay before
10 Target Position OUTD
V3631 T1
K5
C5
reversing motor.
Y1
B C1
SET
The CW limit has
been reached.
PD
The home search profile will execute specific parts of the program, based on the order of
C detection of the limit switches. Ladder logic sets C0 to initiate a home search in the CW
direction. If the CW limit is encountered, the program searches for home in the CCW
D direction, passes it slightly, and does the final CW search for home. After reaching home, the
last ladder rung preloads the current position to “0”.
600
Accel Step
3
4 5
Step
6
Decel 3
Step Step
2 7
400
200
Step
1
Step
8
Target position
4
Time
Start
Start position 5
External Interrupt
(Optional)
Y0
X1
6
SP104
Profile Complete
7
The time line of signal traces below the profile indicates the order of events. The HSIO uses
logical output Y0 as the start input to the HSIO, which starts the profile. Immediately, the
HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the
8
progress of the move. Typically, a ladder program will monitor this bit so it knows when to
initiate the next profile move. You can also use the external interrupt (X1). Once the external 9
interrupt feature selected for the profile, the DL06 keeps outputting the pulses until X1 turns
on. Then the DL06 outputs the pulses defined as the target position.
Each acceleration and deceleration slope consists of 4 steps. You can set up the velocity and
10
the distance (number of pulses) of each step. You don’t need to use all 4 steps of each slope.
For instance, if you want to use only 2 steps, just set zero to the velocity and the distance of 11
the 3rd and 4th step. If the acceleration slope and the deceleration slope are identical, you can
just put zero into all the velocity and the distance parameters for the deceleration slope. 12
13
14
A
B
C
D
5 LD
Load the constant K3 which is required to select CW
and CCW for physical Y0 and Y1 functions.
Select CW/CCW K3
6 OUT
V7632
Output this constant to V7632, configuring pulse
output type.
7 Filtered Inputs
LD
K1006
Load the constant K1006 which is required to
select X0 as a filtered input with a 20ms filter time
constant.
8 OUT
V7634
Output this constant to V7634, configuring X0.
OUT
C OUTD
V3631
Output this constant to V3631 and V3632, the location of the
target position double-word register.
Program
Example SP0 Load the constant K20 which is required to select
1
LD the step 1 acceleration velocity of 200 Hz.
K20
Step 1 Acceleration
OUT
Output this constant to V3633, the location of the
2
V3633 step 1 acceleration velocity setup register.
Step 1 Distance
LD
Load the constant K100 which selects the step 1
distance of 100 pulses.
3
K100
OUT
V3634
Output this constant to V3634, the location of
the step 1 distance.
4
Step 2 Acceleration LD
K40
Load the constant K40 which is required to select
the step 2 acceleration velocity of 400 Hz. 5
OUT
V3635
Output this constant to V3635, the location of the
step 2 acceleration velocity setup register. 6
Load the constant K200 which selects the step 2
Step 2 Distance LD
K200
distance of 200 pulses.
7
Output this constant to V3636, the location of
OUT
V3636 the step 2 distance.
8
Load the constant K60 which is required to select
Step 3 Acceleration LD the step 3 acceleration velocity of 600 Hz.
K60
LD
Load the constant K300 which selects the step 3
10
Step 3 Distance distance of 300 pulses.
K300
OUT
Output this constant to V3640, the location of
the step 3 distance.
11
V3640
Step 4 Acceleration LD
K80
Load the constant K80 which is required to select
the step 4 acceleration velocity of 800 Hz.
12
OUT
V3641
Output this constant to V3641, the location of the
step 4 acceleration velocity setup register.
13
Step 4 Distance LD
K400
Load the constant K400 which selects the step 4
distance of 100 pulses. 14
OUT
V3642
Output this constant to V3642, the location of
the step 4 distance. A
Load the constant K80 which is required to select
Step 5 Deceleration LD
K80
the step 5 deceleration velocity of 800 Hz.
B
Output this constant to V3643 which is required to select
OUT
V3643 the step 5 deceleration velocity of 800 Hz.
C
Continued on next page
D
Program
Example
1 SP0
LD
K400
Load the constant K400 which selects the step 5
distance of 400 pulses.
Step 5 Distance
2 OUT
V3644
Output this constant to V3644, the location of
the step 5 distance.
8 Step 7 Distance LD
K200
Load the constant K200 which selects the step 7
distance of 200 pulses.
9 OUT
V3650
Output this constant to V3650, the location of
the step 7 distance.
10 Step 8 Deceleration
LD
K20
Load the constant K20 which is required to select
the step 8 deceleration velocity of 200 Hz.
11 OUT
V3651
Output this constant to V3651, which is required to select
the step 8 deceleration velocity of 200 Hz.
X3 Y0
14 OUT
We use a spare filtered input to allow the operator
to start the profile. When the operator turns X3 ON,
then OFF, logical output Y0 starts the profile.
A X0
LDD
K0
Load
value.
B Profile / Target
Velocity
OUTD
V1174
Output this constant to V1174/V1175 (CT174/CT175), the
location of the current position value.
Y1
C PD Turn on Y1 for 1 scan. The off-to-on transition
causes the HSIO to preload the current position
with the value in V1174/V1175.
END
D
Start Y0
6
Profile 7
Complete SP104
The time line of signal traces below the profile indicates the order of events. Assuming the
8
velocity is set greater than zero, motion begins when the Start input (Y0) energizes. Since
there is no end position target, the profile is considered in progress as long as the Start input 9
remains active. The profile complete logical input to ladder logic (X0) correlates directly to
the Start input status when velocity profiles are in use.
While the Start input is active, the ladder program can command a velocity change by writing
10
a new value to the velocity register (V3633 by default). The full speed range of 40 Hz to 10
kHz is available. Notice from the drawing that there are no acceleration or deceleration ramps 11
between velocity updates. This is how velocity profiling works with the HSIO. However, the
ladder program can command more gradual velocity changes by incrementing or 12
decrementing the velocity value more slowly. A counter or timer can be useful in creating
your own acceleration/deceleration ramps. Unless the load must do a very complex move, it is
easier to let the HSIO function generate the accel/decel ramps by selecting the trapezoidal or
13
registration profiles instead.
Unlike the trapezoidal and registration profiles, you must specify the desired direction of
14
travel with velocity profiles. Load the direction select register (V3631/V3632 by default) with
8000 0000 hex for CCW direction, or 0 for CW direction. A
B
C
D
12 OUT
V7630
Output this address to V7630, the location of the pointer
to the Profile Parameter Table.
13 Select Pulse /
Direction
LD
K103
Load the constant K103 which is required to select
pulse and direction for physical Y0 and Y1 functions,
respectively (Use K3 if your application needs CW and CCW).
14 OUT
V7632
Output this constant to V7632, configuring the pulse
output type.
B OUT
V7634
Profile / Target
Velocity
OUT
V3630
Output this constant to V3630, the location of the Profile
Select setup register .
3
Select Direction LDD
K80000000
Load the constant K80000000 which selects CCW
direction for Velocity Profiles. Don’t forget to use double
word size (8-digit BCD position value).
4
OUTD
V3631
Output this constant to V3631 and V3632, the location of
the Target Position double-word register . 5
Set Velocity Load the constant K10 which is required to select an
LD
K10
initial velocity of 100 pps (uses x10 multiplier).
6
Output this constant to V3633, the location of the velocity
OUT
V3633
parameter register . After the program is running, we can
write here again, using discrete input switches. 7
Start Profile
X1 Y0
OUT We use a spare filtered input to allow the operator
8
to start the profile. When the operator turns X1 ON
Go Slow
X2
and leaves it on, logical output Y0 starts the profile.
A
B
C
D
11 0061
0062
Deceleration Time is zero
Deceleration Time is greater than 10 seconds
4. Wiring – Verify the wiring to the stepper motor is correct. Remember the signal ground
connection from the PLC to the motion system is required.
5. Motion system – Verify that the drive is powered and enabled. To verify the motion system is 1
working, you can use Mode 60 operation (normal PLC inputs/outputs) as shown in the test
program below. With it, you can manually control Y0 and Y1 with X0 and X1, respectively. Using
an input simulator is ideal for this type of manual debugging. With the switches you can single-
2
step the motor in either direction. If the motor will not move with this simple control, Mode 30
operation will not be possible until the problem with the motor drive system or wiring is corrected. 3
DirectSOFT32
SP0
LD
K60
Load constant K60 into the accumulator. This
selects Mode 60 as the HSIO mode.
4
Mode 60 OUT
V7633
Output the constant to V7633, the location of the
HSIO Mode select register. 5
Filtered Inputs LD
K1006
Load the constant K1006 which is required to configure
filtered inputs with a time constant of 10 mS. 6
Output this constant to V7634, configuring X0.
OUT
V7634 7
Output this constant to V7635, configuring X1.
OUT
V7635
8
Output this constant to V7636, configuring X2.
OUT
V7636
X0 Y0
10
OUT Use a switch on X0 input to manually control output Y0.
X1 Y1
11
OUT Use a switch on X1 input to manually control output Y1.
7 DL06
PLC
Output Circuit
Y0, Y1 Y2 -Y17
8 HSIO I/O data CPU
Interrupt Interrupt
9 Interrupt
or
Filter
Mode select
V-memory
V7633 0040
11 Input Circuit
12 Alternately, you may configure the HSIO circuit to generate interrupts based on a timer, as
shown below. In this configuration, inputs X0 is a filtered input.
13
DL06 Output Circuit
14 PLC
Y0, Y1 Y2 - Y17
HSIO
A Interrupt
I/O data
Interrupt
CPU
Timer Interrupt V-memory
B Filter
or
Filter
Mode select
V7633 0040
Ladder INT A
X0, External Interrupt Program
Execution
Interrupt
Routine
B
Current Program
TIMER
Interrupt source /
Instruction
IRT
C
Time select Input
V7634 xxx4
Update
D
X1-X3, External Interrupts
3 External
0.1 mS minimum
Interrupt X0
4 Time
13 Filtered Input
Interrupt
xx06 (xx = filter time) 0 - 99 ms (BCD)
0004 (default)
X2 V7636 Pulse Input 0005
14 Filtered Input
Interrupt
xx06 (xx = filter time) 0 - 99 ms (BCD)
0004 (default)
X3 V7637 Pulse Input 0005
A Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD)
If you are only using one of the points for an interrupt, you may want to select a different main
B mode (i.e. 10, 20, 30, 50, or 60); and then, just configure one of the terminals not taken as an
interrupt. For example, you might want to configure your CPU for the UP counter mode (Mode
C 10) and use point 03 for a high speed interrupt. You should read the individual sections for any
alternate mode you might choose. There you will find instructions on how to select a high speed
interrupt as a secondary feature.
D
OUT
Output this constant to V7634, configuring the
5
external interrupt option for X0.
V7634
OUT
V7635
Output this constant to V7635, configuring the
external interrupt option for X1.
6
Filtered Inputs LD
K1006
Load the constant K1006 which is required to select
filtered inputs with a 10 mS filter time constant. 7
OUT
V7636
Output this constant to V7636, configuring X2.
8
Output this constant to V7637, configuring X3.
OUT
V7637
Y5
9
RST Reset output Y5.
Y6
RST Reset output Y6.
10
INT Enable ENI Enable Interrupts at the beginning of the program. 11
Insert Main Program rungs here for your application.
Main Program
END END coil marks the end of the main program.. 12
The INT label marks the beginning of the interrupt
INT O0
Interrupt Routine
service routine program.
13
Insert interrupt service routine rungs here for your
application.
SP1 Y5
SETI Set output Y5
14
IRT Return to the main ladder program. A
INT O1
Interrupt Routine Insert interrupt service routine rungs here for your
B
application.
SP1 Y6
SETI Set output Y6.
C
IRT Return to the main ladder program. D
3 Inputs X0, X1, X2, and X3, are configured as filtered inputs with a 10 mS time constant.
Time
Note that X0 uses the time constant from X1. The program is otherwise generic, and may be
4 adapted to your application.
5 Direct SOFT32
8 OUT
V7634
Output this constant to V7634, configuring the timed
interrupt for 100 mS period.
9 K1006
OUT
Output this constant to V7635, configuring X1 and X0.
V7635
10 OUT
V7636
Output this constant to V7636, configuring X2.
11 OUT
V7637
Output this constant to V7637, configuring X3.
14 Interrupt Routine
service routine program.
Insert interrupt service routine rungs here for your
application.
SP1
A LD
K1
Load constant K1 into the accumulator .
OUT
memory location V2000.
Latch
HSIO
Latch
I/O data CPU
8
or V-memory
Mode select
Set
X0
Reset
scan
Filter
X1, X2, X3
V7633 0050
X4 - X23
9
Input Circuit
10
Pulse Catch Timing Parameters 11
Signal pulses at X0 - X3 must meet certain timing criteria to guarantee a pulse capture will
result. Refer to the timing diagram below. The input characteristics of X0 are fixed (it is not a
programmable filtered input). The minimum pulse width is 0.1 mS. There must be some
12
delay before the next pulse arrives, such that the pulse period cannot be smaller than 0.5 mS.
If the pulse period is smaller than 0.5 mS, the next pulse will be considered part of the 13
current pulse.
0.5 mS minimum
14
0.1 mS minimum A
Pulse
Input X0
Time
B
Note: that the pulse catch and filtered input functions are opposite in nature. The pulse catch feature seeks
to capture narrow pulses, while the filter input feature seeks to reject narrow pulses.
C
D
4 X0
SP100
5
Input Status Relay
6 X0 SP100
X1 SP101
7 X2
X3
SP102
SP103
8 The status relay for X0 is SP100. The other status relays are shown in the table below.
X Input Configuration
The configurable discrete input options for Pulse Catch Mode are listed in the table below.
Each input has its own configuration register and filter time constant. 1
Input Configuration Register Function Hex Code Required 2
X0 V7634 Pulse Catch Input 0005 (default)
Interrupt 0004 3
X1 V7635 Pulse Catch Input 0005 (default)
Filtered Input
Interrupt
xx06 (xx = filter time) 0 - 99 ms (BCD)
0004
4
X2 V7636 Pulse Catch Input 0005 (default)
Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD) 5
Interrupt 0004
X3 V7637 Pulse Catch Input
Filtered Input
0005 (default)
xx06 (xx = filter time) 0 - 99 ms (BCD)
6
7
8
9
10
11
12
13
14
A
B
C
D
3 SP0
LD
Load constant K50 into the accumulator . This
selects Mode 50 as the HSIO mode.
K50
4 Mode 50 OUT
V7633
Output this constant to V7633, the location of the
HSIO Mode select register.
5 Pulse Catch LD
K5
Load the constant K5 which is required to configure X0
as the pulse catch input.
6 OUT
V7634
Output this constant to V7634, configuring the pulse
catch option for X0.
10 K3006
OUT
Output this constant to V7637, configuring X3.
V7637
11 Main Program
12 SP100 Y0
SET Use the pulse catch input to set output Y0 on. This will
work even for a very short pulse on X0.
13 SP101 Y1
SET Use the pulse catch input to set output Y1 on. This will
work even for a very short pulse on X1.
A
B
C
D
FILTERS X0-X3
V-memory
9
Mode select
V7633 0060
X0 X1 X2 X3 X4-X23
10
Input Circuit
11
Input Filter Timing Parameters 12
Signal pulses at inputs X0 – X3 are filtered by using a delay time. In the figure below, the
input pulse on the top line is longer than the filter time. The resultant logical input to ladder
is phase-shifted (delayed) by the filter time on both rising and falling edges. In the bottom
13
waveforms, the physical input pulse width is smaller than the filter time. In this case, the
logical input to the ladder program remains in the OFF state (input pulse was filtered out). 14
Filter Time Filter Time
A
Physical Input
Logical Input
X0
X0
B
Time C
Physical Input X0
Logical Input X0
D
2 Bits 15 14 13 12 11
Memory Location V7633
10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0
3 0 0 6 0
5 Power-up in RUN
6 Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
7 • DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
8 We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to to
9 this.
X Input Configuration
10 The configurable discrete input options for Discrete Filtered Inputs Mode are listed in the
table below. The filter time constant (delay) is programmable from 0 to 99 mS (the input acts
11 as a normal discrete input when the time constant is set to 0). The code for this selection
occupies the upper byte of the configuration register in BCD. We combine this number with
the required “06” in the lower byte to get “xx06”, where xx = 0 to 99. Input X0, X1, X2, and
12 X3 can only be filtered inputs. Each input has its own configuration register and filter time
constant.
13
Input Configuration Register Function Hex Code Required
14 X0 V7634 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
A X1 V7635 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
X2 V7636 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
B X3 V7637 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
C
D
SP0
LD
K60
Load constant K60 into the accumulator . This
selects Mode 60 as the HSIO mode.
3
Mode 60 OUT
V7633
Output the constant to V7633, the location of the
HSIO Mode select register . 4
Filtered Inputs LD
K1006
Load the constant K1006 which is required to configure
filtered inputs with a 10 mS filter time constant. 5
OUT
V7634
Output this constant to V7634, configuring X0.
6
Load the constant K2006 which is required to select
LD
K2006
filtered inputs with a 20 mS filter time constant.
7
Output this constant to V7635, configuring X1.
OUT
V7635
Load the constant K5006 which is required to select
8
LD filtered inputs with a 50 mS filter time constant.
K5006
LD
Load the constant K5006 which is required to select
filtered inputs with a 70 mS filter time constant.
10
K7006
OUT
V7637
Output this constant to V7637, configuring X3. 11
Main Program Insert Main Program rungs here for your application. 12
END END coil marks the end of the main program..
13
14
A
B
C
D
Introduction
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
6 Power 4 Optional
Supply CPU card slots
7 Isolation
boundary
2 comm. ports
8 Input circuit
9 20 discrete Inputs
To programming device
or Operator interface
Note: The High-Speed I/O function (HSIO) consists of dedicated but configurable hardware in the DL06. It
10 is not considered part of the CPU, because it does not execute the ladder program. For more on
HSIO operation, see Chapter 3.
11 DL06 CPU Features
The DL06 Micro PLC has 14.8K words of memory comprised of 7.6K of ladder memory
12 and 7.6K words of V-memory (data registers). Program storage is in the FLASH memory
which is a part of the CPU board in the PLC. In addition, there is RAM with the CPU which
13 will store system parameters, V-memory, and other data which is not in the application
program. The RAM is backed up by a “super-capacitor”, storing the data for several hours in
14 the event of a power outage. The capacitor automatically charges during powered operation of
the PLC.
The DL06 supports fixed I/O which includes twenty discrete input points and sixteen output
A points.
Over 220 different instructions are available for program development as well as extensive
B 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
Feature DL06 2
Total Program memory (words) 14.8K
Ladder memory (words)
Total V-memory (words)
7680
7616
3
User V-memory (words) 7488
Non-volatile V Memory (words) 128 4
Contact execution (boolean) 2.0uS
Typical scan (1k boolean)
RLL Ladder style Programming
3 - 4mS
Yes
5
RLL and RLLPLUS Programming Yes
Run Time Edits Yes 6
Scan Variable / fixed
Handheld programmer
DirectSOFT32 programming for Windows.
Yes
Yes
7
Built-in communication ports (RS232C) Yes
FLASH Memory Standard on CPU 8
Local Discrete I/O points available 36
Local Analog input / output channels maximum
High-Speed I/O (quad., pulse out, interrupt, pulse catch, etc.)
None
Yes, 2
9
I/O Point Density 20 inputs, 16 outputs
Number of instructions available (see Chapter 5 for details) 229 10
Control relays 1024
Special relays (system defined)
Stages in RLLPLUS
512
1024
11
Timers 256
Counters 128 12
Immediate I/O Yes
Interrupt input (external / timed)
Subroutines
Yes
Yes
13
For/Next Loops Yes
Math (Integer and floating point) Yes 14
Drum Sequencer Instruction Yes
Time of Day Clock/Calendar
Internal diagnostics
Yes
Yes
A
Password security Yes
System error log Yes B
User error log Yes
7 1
2
0V
5V
Power (-) connection (GND)
Power (+) connection
1
2
5V
TXD
Power (+) connection
Transmit data (RS-232C)
3 RXD Receive data (RS-232C) 3 RXD Receive data (RS-232C)
8 4
5
TXD
5V
Transmit data (RS-232C)
Power (+) connection
4
5
RTS
CTS
Ready to send
Clear to send
11 6
5 4 3 2
1 5
10
1
6
11
12
RTS+
RTS-
Ready to send (+) (RS-422/485)
Ready to send (-) (RS-422/485)
15 11
13 RXD+ Receive data (+) (RS-422/485)
12 PORT1 PORT2 14
15
CTS+
CTS-
Clear to send (+) (RS-422/485)
Clear to send (-) (RS-422/485)
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
LOGIC 06
5
K oyo
10
D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
X TX2
RX2
INPUT: 12 - 24V 3 - 15mA
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.
PORT1 PORT2
TERM
RUN STOP
For replacement
cable, use part no.
DV–1000CBL
11
CPU Setup Information 12
Even if you have years of experience using PLCs, there are a few things you need to do before
you can start entering programs. This section includes some basic things, such as changing 13
the CPU mode, but it also includes some things that you may never have to use. Here’s a brief
list of the items that are discussed:
• Using Auxiliary Functions
14
• Clearing the program (and other memory areas)
• How to initialize system memory
A
• Setting retentive memory ranges B
The following paragraphs provide the setup information necessary to get the CPU ready for
programming. They include setup instructions for either type of programming device you are
using. The D2–HPP Handheld Programmer Manual provides the Handheld keystrokes
C
required to perform all of these operations. The DirectSOFT32™ Manual provides a
description of the menus and keystrokes required to perform the setup procedures via D
DirectSOFT32.
1 status indicators
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
2
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
3
LOGIC 06
4 C0
X0
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 mode switch
6 Status Indicators
The status indicator LEDs on the CPU front panels have specific functions which can help in
7 programming and troubleshooting.
Mode Switch Functions
8 The mode switch on the DL06 PLC provides positions for enabling and disabling program
changes in the CPU. Unless the mode switch is in the TERM position, RUN and STOP
mode changes will not be allowed by any interface device, (handheld programmer,
9 DirectSOFT32 programming package or operator interface). Programs may be viewed or
monitored but no changes may be made. If the switch is in the TERM position and no
10 program password is in effect, all operating modes as well as program access will be allowed
through the connected programming or monitoring device.
11
Indicator Status Meaning
12 PWR
ON Power good
OFF Power failure
13 RUN
ON
OFF
CPU is in Run Mode
CPU is in Stop or Program Mode
Blinking CPU is in firmware upgrade mode
14 ON CPU self diagnostics error
CPU OFF CPU self diagnostics good
A Blinking Low battery or firmware upgrade
ON Data is being transmitted by the CPU - Port 1
TX1
B OFF
ON
No data is being transmitted by the CPU - Port 1
Data is being received by the CPU - Port 1
RX1
OFF No data is being received by the CPU - Port 1
C TX2
ON Data is being transmitted by the CPU - Port 2
OFF No data is being transmitted by the CPU - Port 2
D RX2
ON Data is being received by the CPU - Port 2
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 DirectSOFT32 to save the program, V-memory, and system parameters to
hard/floppy disk on a personal computer.
4 To install the D2–BAT–1 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 coin–type slot.
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 may
14 explode or release hazardous materials.
A Battery Backup
The battery backup is available immediately after the battery has been installed. Retentive
B memory ranges can be set in the CPU to maintain the data in C, S, T, CT and V memory if
the power to the CPU is removed. Low battery indication is enabled by setting bit 12 of
V7633 (B7633.12). The CPU indicator will blink if the battery is low (refer to the table on
C page 4-6). Special Relay 43 (SP43) will also be set when the battery is low. If the low battery
feature is not desired, do not set bit V7633.12.
D
Auxiliary Functions
Many CPU setup tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions
perform many different operations, ranging from clearing ladder memory, displaying the scan
time, copying programs to EEPROM in the handheld programmer, etc. They are divided into 1
categories that affect different system parameters. Appendix A provides a description of the
AUX functions. 2
You can access the AUX Functions from DirectSOFT32 or from the D2–HPP Handheld
Programmer. The manuals for those products provide step-by-step procedures for accessing
the AUX Functions. Some of these AUX Functions are designed specifically for the Handheld
3
Programmer setup, so they will not be needed (or available) with the DirectSOFT32 package.
The following table shows a list of the Auxiliary functions for the Handheld Programmer. 4
AUX 2* — RLL Operations
21 Check Program 58 Test Operations 5
22 Change Reference 59 Override Setup
23
24
Clear Ladder Range
Clear All Ladders
5B
5C
HSIO Configuration
Display Error History
6
AUX 3* — V-Memory Operations 5D Scan Control Setup
31 Clear V Memory AUX 6* — Handheld Programmer Configuration
61 Show Revision Numbers
7
AUX 4* — I/O Configuration
41
42
Show I/O Configuration
I/O Diagnostics
62
65
Beeper On / Off
Run Self Diagnostics 8
44 Power Up I/O Configuration check AUX 7* — EEPROM Operations
45
46
Select Configuration
Configure I/O
71
72
Copy CPU memory to HPP EEPROM
Write HPP EEPROM to CPU
9
AUX 5* — CPU Configuration 73 Compare CPU to HPP EEPROM
51 Modify Program Name 74 Blank Check (HPP EEPROM) 10
52 Display/Change Calendar 75 Erase HPP EEPROM
53
54
Display Scan Time
Initialize Scratchpad
76 Show EEPROM Type (CPU and HPP)
AUX 8* — Password Operations
11
55 Set Watchdog Timer 81 Modify Password
56 Set Communication Port 2 82 Unlock CPU 12
57 Set Retentive Ranges 83 Lock CPU
WARNING: You may never have to use this feature unless you want to clear any setup information
that is stored in system memory. Usually, you’ll only need to initialize the system
memory if you are changing programs and the old program required a special system
1 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, etc. they will be erased when AUX 54 is used. Make sure that you
have considered all ramifications of this operation before you select it.
3 Setting Retentive Memory Ranges
The DL06 PLCs provide certain ranges of retentive memory by default. The default ranges
4 are suitable for many applications, but you can change them if your application requires
additional retentive ranges or no retentive ranges at all. The default settings are:
5 DL06
Memory Area
6 Control Relays
Default Range
C1000 – C1777
Available Range
C0 – C1777
V Memory V400 – V37777 V0 – V37777
7 Timers None by default T0 – T377
Counters CT0 – CT177 CT0 – CT177
8 Stages None by default S0 – S1777
9 You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT32. menus to
select the retentive ranges. Appendix A contains detailed information about auxiliary
functions.
10
11 WARNING: The DL06 CPUs do not come with a battery. The super capacitor will retain the values in
the event of a power loss, but only for a short period of time, depending on conditions. If
the retentive ranges are important for your application, make sure you obtain the optional
12 battery.
13
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 the
3
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 (along 5
with the ladder project) removed.
DirectSOFT
DirectSOFT32
D2–HPP
D2–HPP 8
Select AUX 81
9
CLR CLR I
8
B
1
AUX ENT
PASSWORD
00000000 10
Enter the new 8-digit password 11
X X X ENT
PASSWORD
XXXXXXXX 12
There are three ways to lock the CPU once the password has been entered.
1. If the CPU power is disconnected, the CPU will be automatically locked against access.
13
2. If you enter the password with DirectSOFT32, the CPU will be automatically locked against
access when you exit DirectSOFT32.
14
3. Use AUX 83 to lock the CPU.
When you use DirectSOFT32, you will be prompted for a password if the CPU has been
A
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
password protection while not locking the communication port to an operator interface. The multi- C
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
2 understand before you create your application program:
• CPU Operating System — the CPU manages all aspects of system control. A quick overview of all
the steps is provided in the next section.
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.
Initialize hardware
of retentive memory is
8 preserved, and non-retentive memory is initialized to Initialize various memory
based on retentive
zero (unless otherwise specified). configuration
average time around the task loop. Note that the CPU is
11 always reading the inputs, even during program mode.
Update Special Relays
NO
B Report error , set flag
register , turn on LED
C Fatal error
NO
YES
Program Mode
In Program Mode, the CPU does not execute the application program or update the output
points. The primary use for Program Mode is to enter or change an application program. You 1
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
DirectSOFT32 or the D2–HPP Handheld
Programmer to place the CPU in Program
3
Mode.
Run Mode
4
In Run Mode, the CPU executes the
application program and updates the I/O
5
system. You can perform many operations
during Run Mode. Some of these include: G LG 0V
AC(L) AC(N) 24V C0
Y0
Y1
Y2
Y3
C1
Y4
Y5
Y6
Y7 Y10 Y12
C2
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
PWR
RUN
Download
Program
6
• Monitor and change I/O point status
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
7
RX2
INPUT: 12 - 24V 3 - 15mA
8
several key areas. For the vast majority of
applications, some of these execution segments
are more important than others. For example,
Normal Run mode scan
9
you need to understand how the CPU updates
the I/O points, handles forcing operations, and Read Inputs 10
solves the application program. The remaining
segments are not that important for most
applications.
Read Inputs from Specialty I/O 11
You can use DirectSOFT32 or the D2–HPP
Handheld Programmer to place the CPU in
Service Peripherals
12
Run Mode. Update Clock, Special Relays
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 until the
3 next I/O update, you can use Immediate Instructions. These do not use the status of the
input image register to solve the application program. The Immediate instructions
immediately read the input status directly from the I/O modules. However, this lengthens the
4 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 DirectSOFT32™. Bit
override basically disables any changes to the discrete point by the CPU. For example, if you
12 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
13 you used X1 in the program, it would always be evaluated as “off ” in this case. Of course, if
X1 was on when the bit override was enabled, then X1 would always be evaluated as “on”.
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 Override
for Y0 and it was off at the time, then the CPU would not change the state of Y0. However,
A 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
X128 ... X2 X1 X0
Input Update 2
OFF ... ON ON OFF
Bit Override OFF Force from
Programmer
Y128
OFF
C377
...
...
...
Y2
ON
C2
Y1
ON
C1
Y0
OFF
C0
Force from
Programmer
Bit Override ON
3
OFF ... ON OFF OFF
Result of Program Result of Program
Solution
Image Register (example)
Solution 4
5
WARNING: Only authorized personnel fully familiar with all aspects of the application should make 6
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. 7
CPU Bus Communication
It is possible to transfer data to and from the CPU over the CPU bus on the backplane. This 8
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 9
these modules. The CPU performs both read and write requests during this segment.
Update Clock, Special Relays and Special Registers 10
The DL06 CPUs have an internal real-time clock and calendar timer which is accessible to
the application program. Special V-memory locations hold this information. This portion of
the execution cycle makes sure these locations get updated on every scan. Also, there are
11
several different Special Relays, such as diagnostic relays, etc., that are also updated during
this segment. 12
13
14
A
B
C
D
3
LG 0V
AC(L) AC(N) 24V C0
OUTPUT: 6-240V
4
Y0
50 - 60Hz
Y1
5
Y2
Y3
C1
6
Y4
Y5
Y6
7
Y7 Y10 Y12
2.0A, 6 - 27V
C2
10 11
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A
12
PWR: 100-240V
13 14 15 16
50-60Hz 40VA
17 20
D0-06DR
21 22 23
PWR
RUN
CPU
TX1
RX1
14
A
B
C
D
Write Outputs
Once the application program has solved the instruction logic and constructed the output
image register, the CPU writes the contents of the output image register to the corresponding 1
output points. Remember, the CPU also made sure that any forcing operation changes were
stored in the output image register, so the forced points get updated with the status specified
earlier.
2
Write Outputs to Specialty I/O 3
After the CPU updates the outputs in the local and expansion bases, it sends the output point
information that is required by any Specialty modules which are installed. 4
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
5
conditions that are automatically detected and reported by the DL06 PLCs. Appendix B
contains a listing of the various error codes. 6
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 7
the maximum time allowed for the CPU to complete the solve application segment of the
scan cycle. If this time is exceeded the CPU will enter the Program Mode and turn off all
outputs. The default value set from the factory is 200 ms. An error is automatically reported.
8
For example, the Handheld Programmer would display the following message “E003 S/W
TIMEOUT” when the scan overrun occurs. 9
You can use AUX 53 to view the minimum, maximum, and current scan time. Use AUX 55
to increase or decrease the watchdog timer value. 10
I/O Response Time 11
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
12
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 13
yourself with the aspects of system timing. However, some applications do require extremely
fast update times. In these cases, you may need to know how to to determine the amount of
time spent during the various segments of operation.
14
There are four things that can affect the I/O response time. A
• The point in the scan cycle when the field input changes states
• Input Off to On delay time B
• CPU scan time
• Output Off to On delay time C
The next paragraphs show how these items interact to affect the response time.
D
3 Scan
Solve
Program
Solve
Program
Solve
Program
Solve
Program
4 Read
Inputs
Write
Outputs
5 Field Input
6 Input
Off/On Delay
7 Output
Off/On Delay
9 In this case, you can calculate the response time by simply adding the following items:
Input Delay + Scan Time + Output Delay = Response Time
10 Normal Maximum I/O Response
The I/O response time is longest when the input changes just after the Read Inputs portion
11 of the execution cycle. In this case the new input status is not read until the following scan.
The following diagram shows an example of the timing for this situation.
12 Solve
Scan
14 Field Input
A Input
CPU Reads
Inputs
CPU Writes
Outputs
Off/On Delay
B Output
Off/On Delay
C
I/O Response T ime
D In this case, you can calculate the response time by simply adding the following items:
Input Delay +(2 x Scan Time) + Output Delay = Response Time
3 Mode transition. This information can be very important Initialize various memory
when evaluating the performance of a system. As we’ve based on retentive
configuration
6 • Peripheral Service
Service peripheral
• Program Execution
7 • Output Update CPU Bus Communication
13 Reading Inputs
Specialty and Remote I/O
YES
A
OK
Writing Outputs OK?
C Fatal error
NO
YES
D Force CPU into
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.
2
To Log Request (anytime) DL06
Nothing Connected Min. & Max 0µs 3
Send Min. / Max. 5.8/11.8 µs
Port 1
Rec. Min. / Max. 12.5/25.2 µs 4
Port 2 Send Min. / Max. 6.2/14.3 µs
LCD
Rec. Min. / Max.
Min. / Max.
14.2/31.9 µs
4.8/49.2 µs
5
During the Service Peripherals portion of the scan, the CPU analyzes the communications 6
request and responds as appropriate. The amount of time required to service the peripherals
depends on the content of the request. 7
To Service Request DL06
Minimum
DL06
9 µs
8
Run Mode Max.
Program Mode Max.
412 µs
2.5 second
9
CPU Bus Communication
10
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 11
actual time required depends on the type of modules installed and the type of request being
processed. 12
Update Clock / Calendar, Special Relays, Special Registers
The clock, calendar, and special relays are updated and loaded into special V-memory 13
locations during this time. This update is performed during both Run and Program Modes.
Modes DL06
14
Program Mode
Minimum
Maximum
12.0µs
12.0µs
A
Minimum 20.0µs
Run Mode
Maximum 27.0µs B
C
D
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
K10
8 LD K50
STRN C103
9.00
.67
µs
µs C102
LD
OUT V2006 1.82 µs K50
9 STR X5
ANDN X10
.67
.51
µs
µs C103
OUT V2006
OUT Y3 1.82 µs
10 END 12.80 µs
X5 X10 Y3
OUT
SUBT OTAL 51.11 µs
11 Overhead DL06 END
Minimum 746.2 µs
12 Maximum 4352.4 µs
TOTAL TIME = (Program execution time + Overhead) x 1.18
13 The program above takes only 51.11 µs to execute during each scan. The DL06 spends 0.18
ms, on internal timed interrupt management, for every 1ms of instruction time. The total
scan time is calculated by adding the program execution time to the overhead (shown
14 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
A fluctuation in overhead tasks.
Program Control Instructions — the DL06 CPUs offer additional instructions that can
B 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
C these different types of instructions operate.
program and for configuration settings. V-memory locations and V-memory addresses are the
2 same thing, and are numbered in octal. For example, V2073 is a valid location, while V1983
is not valid (“9” and “8” are not valid octal digits).
3 Each V-memory location is one data word wide, meaning 16 bits. For configuration registers,
our manuals will show each bit of a V-memory word. The least significant bit (LSB) will be
on the right, and the most significant bit (MSB) on the left. We use the word “significant”,
4 referring to the relative binary weighting of the bits.
V-memory data is 16-bit binary, but we rarely program the data registers one bit at a time. We
5 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. What
7 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... that’s all. It does not convert or
8 move the data on its own.
Binary-Coded Decimal Numbers BCD number 4 9 3 6
9 Since humans naturally count in V-memory storage 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0
decimal (10 fingers, 10 toes), we prefer to enter and view PLC data in decimal as well.
10 However, computers are more efficient in using pure binary numbers. A compromise solution
between the two is Binary-Coded Decimal (BCD) representation. A BCD digit ranges from 0
11 to 9, and is stored as four binary bits (a nibble). This permits each V-memory location to
store four BCD digits, with a range of decimal numbers from 0000 to 9999.
In a pure binary sense, a 16-bit word can represent numbers from 0 to 65535. In storing
12 BCD numbers, the range is reduced to only 0 to 9999. Many math instructions use Binary-
Coded Decimal (BCD) data, and DirectSOFT32 and the handheld programmer allow us to
13 enter and view data in BCD.
Hexadecimal Numbers
14 Hexadecimal numbers are similar to BCD numbers, except they utilize all possible binary
values in each 4-bit digit. They are base-16 numbers so we need 16 different digits. To extend
A our decimal digits 0 through 9, we use A through F as shown.
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
B Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F
A 4-digit hexadecimal number can represent all 65536 values in a V-memory word. The range
C 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. 1
This includes input device status, output device status, various timing elements, parts counts,
etc. It is important to understand how the system represents and stores the various types of
data. For example, you need to know how the system identifies input points, output points,
2
data words, etc. The following paragraphs discuss the various memory types used in DL06
Micro PLCs. A memory map overview for the 3
CPU follows the memory descriptions.
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
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
X TX2
RX2
INPUT: 12 - 24V 3 - 15mA
C0
X0
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
5
PORT1 PORT2 RUN STOP
Y20
inputs or discrete outputs. These locations are used
9 in programming the discrete memory locations (C)
OUT
B
C
D
Start
Wait for Start
S1
JMP
X0
S0001
active or inactive. If the Stage is active, then the
10 status bit is on. If the Stage is inactive, then the
Part
Present
X1
S2
JMP
status bit is off. This status bit can also be turned Part
X1
S6
JMP
SG
control stages throughout the program. Clamp the part
12 Special Relays (SP Data Type)
S0002
Clamp
SET
S400
X2
S3
JMP
for 50 ms.
C SP4: 1 second clock
SP5: 100 ms clock
D SP6: 50 ms clock
5 V7661 Setup timer over counter: Counts the times the actual scan time exceeds the user
setup time.
V7662–V7717 Reserved
6 V7720–V7722
V7720
Locations for DV–1000 operator interface parameters.
Titled Timer preset value pointer
V7721 Title Counter preset value pointer
7 V7722
V7723–V7737
HiByte-Titled Timer preset block size, LoByte-Titled Counter preset block size
Reserved
V7740 Port 1 and Port 2: Communication Auto Reset Timer Setup Default: 3030
8 V7741–V7746 Reserved
V7747 Location contains a 10mS counter (0-99). This location increments once every 10 mS
9 V7750
V7751
Reserved
Fault Message Error Code — stores the 4-digit code used with the FAULT instruction
when the instruction is executed.
10 V7752
V7753
I/O Configuration Error: Current ID code of error slot
I/O Configuration Error: Old ID code of error slot
V7754 I/O Configuration Error: error slot number
11 V7755
V7756
Error code — stores the fatal error code.
Error code — stores the major error code.
V7757 Error code — stores the minor error code.
12 V7760–V7762 Reserved
V7763 Program address where syntax error exists
13 V7764
V7765
Syntax error code
Scan counter — stores the total number of scan cycles that have occurred since the
last Program Mode to Run Mode transition.
14 V7766
V7767
Contains the number of seconds on the clock (00-59)
Contains the number of minutes on the clock (00-59)
V7770 Contains the number of hours on the clock (00-23)
A V7771 Contains the day of the week (Mon., Tues., Wed., etc.)
V7772 Contains the day of the month (01, 02, etc.)
B V7773
V7774
Contains the month (01 to 12)
Contains the year (00 to 99)
V7775 Scan — stores the current scan time (milliseconds).
C V7776
V7777
Scan — stores the minimum scan time that has occurred since the last
Program Mode to Run Mode transition (milliseconds).
V37700-V37737 For remote I/O
D
Memory Type
Discrete Memory
Reference
Word Memory
Reference Decimal Symbol
1
(octal) (octal)
Input Points X0 – X777 V40400 - V40437 512
X0 2
Output Points Y0 – Y777 V40500 – V40537 512
Y0 3
Control Relays C0 – C1777 V40600 - V40677 1024
C0 C0 4
Special Relays SP0 – SP777 V41200 – V41237 512
SP0 5
Timers T0 – T377 V41100 – V41117 256 TMR T0
6
K100
V400-V677 192
12
Data Words None V1200 – V7377 3200 None specific, used with many
(See Appendix F) V10000 - V17777 4096 instructions.
None specific, used with many
13
Data Words instructions.
EEPROM
(See Appendix F)
None V7400 – V7577 128
Data can be rewritten to EEPROM at least
100,000 times before it fails.
14
Stages S0 – S1777 V41000 – V41017 1024
SG
S001
SP0
A
GX0 GY0
Remote I/O GX0-GX3777
GY0-GY3777
V40000-V40177
V40200-V40377
2048
2048 B
System parameters None
V700-V777
V7600 – V7777
V36000-V37777
64
128
1024
None specific, used for various purposes C
1-The DL06 systems are limited to 20 discrete inputs and 16 discrete outputs with the present
D
available hardware, but 512 point addresses exist.
5 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
V40403
V40404
V40503
V40504
6 137
157
136
156
135
155
134
154
133
153
132
152
131
151
130
150
127
147
126
146
125
145
124
144
123
143
122
142
121
141
120
140
V40405
V40406
V40505
V40506
7 177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40407 V40507
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40410 V40510
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V40411 V40511
8 257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V40412 V40512
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V40413 V40513
9 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
V40414
V40415
V40514
V40515
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V40416 V40516
10 377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40417 V40517
417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40420 V40520
11 437
457
436
456
435
455
434
454
433
453
432
452
431
451
430
450
427
447
426
446
425
445
424
444
423
443
422
442
421
441
420
440
V40421
V40422
V40521
V40522
477 476 475 474 473 472 471 470 467 466 465 464 463 462 461 460 V40423 V40523
12 517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40424 V40524
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40425 V40525
13 557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40426 V40526
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40427 V40527
14 617
637
616
636
615
635
614
634
613
633
612
632
611
631
610
630
607
627
606
626
605
625
604
624
603
623
602
622
601
621
600
620
V40430
V40431
V40530
V40531
657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V40432 V40532
A 677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40433 V40533
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V40434 V40534
B 737
757
736
756
735
755
734
754
733
753
732
752
731
751
730
750
727
747
726
746
725
745
724
744
723
743
722
742
721
741
720
740
V40435
V40436
V40535
V40536
777 776 775 774 773 772 771 770 767 766 765 764 763 762 761 760 V40437 V40537
C
D
2 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
3 617
637
616
636
615
635
614
634
613
633
612
632
611
631
610
630
607
627
606
626
605
625
604
624
603
623
602
622
601
621
600
620
V41030
V41031
4 657
677
656
676
655
675
654
674
653
673
652
672
651
671
650
670
647
667
646
666
645
665
644
664
643
663
642
662
641
661
640
660
V41032
V41033
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V41034
5 737
757
736
756
735
755
734
754
733
753
732
752
731
751
730
750
727
747
726
746
725
745
724
744
723
743
722
742
721
741
720
740
V41035
V41036
6 777
1017
776
1016
775
1015
774
1014
773
1013
772
1012
771
1011
770
1010
767
1007
766
1006
765
1005
764
1004
763
1003
762
1002
761
1001
760
1000
V41037
V41040
1037 1036 1035 1034 1033 1032 1031 1030 1027 1026 1025 1024 1023 1022 1021 1020 V41041
7 1057
1077
1056
1076
1055
1075
1054
1074
1053
1073
1052
1072
1051
1071
1050
1070
1047
1067
1046
1066
1045
1065
1044
1064
1043
1063
1042
1062
1041
1061
1040
1060
V41042
V41043
8 1117
1137
1116
1136
1115
1135
1114
1134
1113
1133
1112
1132
1111
1131
1110
1130
1107
1127
1106
1126
1105
1125
1104
1124
1103
1123
1102
1122
1101
1121
1100
1120
V41044
V41045
1157 1156 1155 1154 1153 1152 1151 1150 1147 1146 1145 1144 1143 1142 1141 1140 V41046
9 1177
1217
1176
1216
1175
1215
1174
1214
1173
1213
1172
1212
1171
1211
1170
1210
1167
1207
1166
1206
1165
1205
1164
1204
1163
1203
1162
1202
1161
1201
1160
1200
V41047
V41050
10 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
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V41053
11 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
12 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
1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V41060
13 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
V41061
V41062
14 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
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V41065
A 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
V41066
V41067
B 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
V41070
V41071
1657 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V41072
C 1677
1717
1676
1716
1675
1715
1674
1714
1673
1713
1672
1712
1671
1711
1670
1710
1667
1707
1666
1706
1665
1705
1664
1704
1663
1703
1662
1702
1661
1701
1660
1700
V41073
V41074
D 1737
1757
1736
1756
1735
1755
1734
1754
1733
1753
1732
1752
1731
1751
1730
1750
1727
1747
1726
1746
1725
1745
1724
1744
1723
1743
1722
1742
1721
1741
1720
1740
V41075
V41076
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V41077
3 1117
1137
1116
1136
1115
1135
1114
1134
1113
1133
1112
1132
1111
1131
1110
1130
1107
1127
1106
1126
1105
1125
1104
1124
1103
1123
1102
1122
1101
1121
1100
1120
V40644
V40645
1157 1156 1155 1154 1153 1152 1151 1150 1147 1146 1145 1144 1143 1142 1141 1140 V40646
4 1177
1217
1176
1216
1175
1215
1174
1214
1173
1213
1172
1212
1171
1211
1170
1210
1167
1207
1166
1206
1165
1205
1164
1204
1163
1203
1162
1202
1161
1201
1160
1200
V40647
V40650
5 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
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V40653
6 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
V40654
V40655
7 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
1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V40660
8 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
V40661
V40662
9 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
V40663
V40664
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V40665
10 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
V40666
V40667
1617 1616 1615 1614 1613 1612 1611 1610 1607 1606 1605 1604 1603 1602 1601 1600 V40670
11 1637 1636 1635 1634 1633 1632 1631 1630 1627 1626 1625 1624 1623 1622 1621 1620 V40671
1657 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V40672
12 1677
1717
1676
1716
1675
1715
1674
1714
1673
1713
1672
1712
1671
1711
1670
1710
1667
1707
1666
1706
1665
1705
1664
1704
1663
1703
1662
1702
1661
1701
1660
1700
V40673
V40674
1737 1736 1735 1734 1733 1732 1731 1730 1727 1726 1725 1724 1723 1722 1721 1720 V40675
13 1757 1756 1755 1754 1753 1752 1751 1750 1747 1746 1745 1744 1743 1742 1741 1740 V40676
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V40677
14
A
B
C
D
4 037
057
036
056
035
055
034
054
033
053
032
052
031
051
030
050
027
047
026
046
025
045
024
044
023
043
022
042
021
041
020
040
V40001
V40002
V40201
V40202
077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V40003 V40203
5 117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V40004 V40204
137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V40005 V40205
6 157
177
156
176
155
175
154
174
153
173
152
172
151
171
150
170
147
167
146
166
145
165
144
164
143
163
142
162
141
161
140
160
V40006
V40007
V40206
V40207
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40010 V40210
7 237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V40011 V40211
257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V40012 V40212
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
V40013
V40004
V40213
V40214
9 337
357
336
356
335
355
334
354
333
353
332
352
331
351
330
350
327
347
326
346
325
345
324
344
323
343
322
342
321
341
320
340
V40015
V40016
V40215
V40216
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40007 V40217
10 417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40020 V40220
437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V40021 V40221
11 457
477
456
476
455
475
454
474
453
473
452
472
451
471
450
470
447
467
446
466
445
465
444
464
443
463
442
462
441
461
440
460
V40022
V40023
V40222
V40223
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40024 V40224
12 537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40025 V40225
557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40026 V40226
13 577
617
576
616
575
615
574
614
573
613
572
612
571
611
570
610
567
607
566
606
565
605
564
604
563
603
562
602
561
601
560
600
V40027
V40030
V40227
V40230
14 637
657
636
656
635
655
634
654
633
653
632
652
631
651
630
650
627
647
626
646
625
645
624
644
623
643
622
642
621
641
620
640
V40031
V40032
V40231
V40232
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40033 V40233
A 717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V40034 V40234
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V40035 V40235
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
V40036
V40037
V40236
V40237
C
D
1
2
MSB DL06 Remote I/O (GX) and (GY) Points LSB GX GY
17
1017
16
1016
15
1015
14
1014
13
1013
12
1012
11
1011
10
1010
7
1007
6
1006
5
1005
4
1004
3
1003
2
1002
1
1001
0
1000
Address Address
V40040 V40240
3
1037
1057
1036
1056
1035
1055
1034
1054
1033
1053
1032
1052
1031
1051
1030
1050
1027
1047
1026
1046
1025
1045
1024
1044
1023
1043
1022
1042
1021
1041
1020
1040
V40041
V40042
V40241
V40242 4
1077 1076 1075 1074 1073 1072 1071 1070 1067 1066 1065 1064 1063 1062 1061 1060 V40043 V40243
1117
1137
1116
1136
1115
1135
1114
1134
1113
1133
1112
1132
1111
1131
1110
1130
1107
1127
1106
1126
1105
1125
1104
1124
1103
1123
1102
1122
1101
1121
1100
1120
V40044
V40045
V40244
V40245
5
1157
1177
1156
1176
1155
1175
1154
1174
1153
1173
1152
1172
1151
1171
1150
1170
1147
1167
1146
1166
1145
1165
1144
1164
1143
1163
1142
1162
1141
1161
1140
1160
V40046
V40047
V40246
V40247 6
1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V40050 V40250
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
V40051
V40052
V40251
V40252
7
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V40053 V40253
1317 1316 1315 1314 1313 1312 1311 1310 1307 1306 1305 1304 1303 1302 1301 1300 V40054 V40254 8
1337 1336 1335 1334 1333 1332 1331 1330 1327 1326 1325 1324 1323 1322 1321 1320 V40055 V40255
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
V40056
V40057
V40256
V40257
9
1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V40060 V40260
1437 1436 1435 1434 1433 1432 1431 1430 1427 1426 1425 1424 1423 1422 1421 1420 V40061 V40261 10
1457 1456 1455 1454 1453 1452 1451 1450 1447 1446 1445 1444 1443 1442 1441 1440 V40062 V40262
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
11
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V40065 V40265
1557 1556 1555 1554 1553 1552 1551 1550 1547 1546 1545 1544 1543 1542 1541 1540 V40066 V40266 12
1577 1576 1575 1574 1573 1572 1571 1570 1567 1566 1565 1564 1563 1562 1561 1560 V40067 V40267
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 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V40072 V40272
1677 1676 1675 1674 1673 1672 1671 1670 1667 1666 1665 1664 1663 1662 1661 1660 V40073 V40273 14
1717 1716 1715 1714 1713 1712 1711 1710 1707 1706 1705 1704 1703 1702 1701 1700 V40074 V40274
1737
1757
1736
1756
1735
1755
1734
1754
1733
1753
1732
1752
1731
1751
1730
1750
1727
1747
1726
1746
1725
1745
1724
1744
1723
1743
1722
1742
1721
1741
1720
1740
V40075
V40076
V40275
V40276
A
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V40077 V40277
B
C
D
1 MSB
17 16 15 14
DL06 Remote I/O (GX) and (GY) Points
13 12 11 10 7 6 5 4 3 2 1
LSB
0
GX GY
Address Address
2017 2016 2015 2014 2013 2012 2011 2010 2007 2006 2005 2004 2003 2002 2001 2000 V40100 V40300
2 2037 2036 2035 2034 2033 2032 2031 2030 2027 2026 2025 2024 2023 2022 2021 2020 V40101 V40301
2057 2056 2055 2054 2053 2052 2051 2050 2047 2046 2045 2044 2043 2042 2041 2040 V40102 V40302
3 2077
2117
2076
2116
2075
2115
2074
2114
2073
2113
2072
2112
2071
2111
2070
2110
2067
2107
2066
2106
2065
2105
2064
2104
2063
2103
2062
2102
2061
2101
2060
2100
V40103
V40104
V40303
V40304
2137 2136 2135 2134 2133 2132 2131 2130 2127 2126 2125 2124 2123 2122 2121 2120 V40105 V40305
4 2157 2156 2155 2154 2153 2152 2151 2150 2147 2146 2145 2144 2143 2142 2141 2140 V40106 V40306
2177 2176 2175 2174 2173 2172 2171 2170 2167 2166 2165 2164 2163 2162 2161 2160 V40107 V40307
5 2217
2237
2216
2236
2215
2235
2214
2234
2213
2233
2212
2232
2211
2231
2210
2230
2207
2227
2206
2226
2205
2225
2204
2224
2203
2223
2202
2222
2201
2221
2200
2220
V40110
V40111
V40310
V40311
2257 2256 2255 2254 2253 2252 2251 2250 2247 2246 2245 2244 2243 2242 2241 2240 V40112 V40312
6 2277 2276 2275 2274 2273 2272 2271 2270 2267 2266 2265 2264 2263 2262 2261 2260 V40113 V40313
2317 2316 2315 2314 2313 2312 2311 2310 2307 2306 2305 2304 2303 2302 2301 2300 V40114 V40314
7 2337
2357
2336
2356
2335
2355
2334
2354
2333
2353
2332
2352
2331
2351
2330
2350
2327
2347
2326
2346
2325
2345
2324
2344
2323
2343
2322
2342
2321
2341
2320
2340
V40115
V40116
V40315
V40316
2377 2376 2375 2374 2373 2372 2371 2370 2367 2366 2365 2364 2363 2362 2361 2360 V40117 V40317
8 2417 2416 2415 2414 2413 2412 2411 2410 2407 2406 2405 2404 2403 2402 2401 2400 V40120 V40320
2437 2436 2435 2434 2433 2432 2431 2430 2427 2426 2425 2424 2423 2422 2421 2420 V40121 V40321
9 2457
2477
2456
2476
2455
2475
2454
2474
2453
2473
2452
2472
2451
2471
2450
2470
2447
2467
2446
2466
2445
2465
2444
2464
2443
2463
2442
2462
2441
2461
2440
2460
V40122
V40123
V40322
V40323
2517 2516 2515 2514 2513 2512 2511 2510 2507 2506 2505 2504 2503 2502 2501 2500 V40124 V40324
10 2537 2536 2535 2534 2533 2532 2531 2530 2527 2526 2525 2524 2523 2522 2521 2520 V40125 V40325
2557 2556 2555 2554 2553 2552 2551 2550 2547 2546 2545 2544 2543 2542 2541 2540 V40126 V40326
11 2577
2617
2576
2616
2575
2615
2574
2614
2573
2613
2572
2612
2571
2611
2570
2610
2567
2607
2566
2606
2565
2605
2564
2604
2563
2603
2562
2602
2561
2601
2560
2600
V40127
V40130
V40327
V40330
2637 2636 2635 2634 2633 2632 2631 2630 2627 2626 2625 2624 2623 2622 2621 2620 V40131 V40331
12 2657 2656 2655 2654 2653 2652 2651 2650 2647 2646 2645 2644 2643 2642 2641 2640 V40132 V40332
2677 2676 2675 2674 2673 2672 2671 2670 2667 2666 2665 2664 2663 2662 2661 2660 V40133 V40333
13 2717
2737
2716
2736
2715
2735
2714
2734
2713
2733
2712
2732
2711
2731
2710
2730
2707
2727
2706
2726
2705
2725
2704
2724
2703
2723
2702
2722
2701
2721
2700
2720
V40134
V40135
V40334
V40335
2757 2756 2755 2754 2753 2752 2751 2750 2747 2736 2735 2734 2733 2732 2731 2730 V40136 V40336
14 2777 2776 2775 2774 2773 2772 2771 2770 2767 2766 2765 2764 2763 2762 2761 2760 V40137 V40337
A
B
C
D
MSB
17 16 15 14
DL06 Remote I/O (GX) and (GY) Points
13 12 11 10 7 6 5 4 3 2 1
LSB
0
GX GY
Address Address
1
3017 3016 3015 3014 3013 3012 3011 3010 3007 3006 3005 3004 3003 3002 3001 3000 V40140 V40340
3037 3036 3035 3034 3033 3032 3031 3030 3027 3026 3025 3024 3023 3022 3021 3020 V40141 V40341 2
3057 3056 3055 3054 3053 3052 3051 3050 3047 3046 3045 3044 3043 3042 3041 3040 V40142 V40342
3077
3117
3076
3116
3075
3115
3074
3114
3073
3113
3072
3112
3071
3111
3070
3110
3067
3107
3066
3106
3065
3105
3064
3104
3063
3103
3062
3102
3061
3101
3060
3100
V40143
V40144
V40343
V40344
3
3137 3136 3135 3134 3133 3132 3131 3130 3127 3126 3125 3124 3123 3122 3121 3120 V40145 V40345
3157 3156 3155 3154 3153 3152 3151 3150 3147 3146 3145 3144 3143 3142 3141 3140 V40146 V40346 4
3177 3176 3175 3174 3173 3172 3171 3170 3167 3166 3165 3164 3163 3162 3161 3160 V40147 V40347
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
5
3257 3256 3255 3254 3253 3252 3251 3250 3247 3246 3245 3244 3243 3242 3241 3240 V40152 V40352
3277 3276 3275 3274 3273 3272 3271 3270 3267 3266 3265 3264 3263 3262 3261 3260 V40153 V40353 6
3317 3316 3315 3314 3313 3312 3311 3310 3307 3306 3305 3304 3303 3302 3301 3300 V40154 V40354
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
7
3377 3376 3375 3374 3373 3372 3371 3370 3367 3366 3365 3364 3363 3362 3361 3360 V40157 V40357
3417 3416 3415 3414 3413 3412 3411 3410 3407 3406 3405 3404 3403 3402 3401 3400 V40160 V40360 8
3437 3436 3435 3434 3433 3432 3431 3430 3427 3426 3425 3424 3423 3422 3421 3420 V40161 V40361
3457
3477
3456
3476
3455
3475
3454
3474
3453
3473
3452
3472
3451
3471
3450
3470
3447
3467
3446
3466
3445
3465
3444
3464
3443
3463
3442
3462
3441
3461
3440
3460
V40162
V40163
V40362
V40363
9
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 10
3557 3556 3555 3554 3553 3552 3551 3550 3547 3546 3545 3544 3543 3542 3541 3540 V40166 V40366
3577
3617
3576
3616
3575
3615
3574
3614
3573
3613
3572
3612
3571
3611
3570
3610
3567
3607
3566
3606
3565
3605
3564
3604
3563
3603
3562
3602
3561
3601
3560
3600
V40167
V40170
V40367
V40370
11
3637 3636 3635 3634 3633 3632 3631 3630 3627 3626 3625 3624 3623 3622 3621 3620 V40171 V40371
3657 3656 3655 3654 3653 3652 3651 3650 3647 3646 3645 3644 3643 3642 3641 3640 V40172 V40372 12
3677 3676 3675 3674 3673 3672 3671 3670 3667 3666 3665 3664 3663 3662 3661 3660 V40173 V40373
3717
3737
3716
3736
3715
3735
3714
3734
3713
3733
3712
3732
3711
3731
3710
3730
3707
3727
3706
3726
3705
3725
3704
3724
3703
3723
3702
3722
3701
3721
3700
3720
V40174
V40175
V40374
V40375
13
3757 3756 3755 3754 3753 3752 3751 3750 3747 3746 3745 3744 3743 3742 3741 3740 V40176 V40376
3777 3776 3775 3774 3773 3772 3771 3770 3767 3766 3765 3764 3763 3762 3761 3760 V40177 V40377 14
A
B
C
D
Module Placement
1 Slot Numbering
2 The DL06 has four slots, which are numbered as follows:
3
4
5
6
7
8
9
10
Slot 1
11 Slot 2
12 Slot 3
Slot 4
13
14
A
B
C
D
Power Budgeting
1 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.
2 Power supplied
Power is supplied from two sources, the internal base unit power supply and, if required, an
3 external supply (customer furnished). The D0-06xx (AC powered) PLCs supply a limited
amount of 24VDC power. The 24VDC output can be used to power external devices. For
power budgeting, start by considering the power supplied by the base unit. All DL06 PLCs
4 supply the same amount of 5VDC power. Only the AC units offer 24VDC auxiliary power.
Be aware of the trade-off between 5VDC power and 24VDC power. The amount of 5VDC
5 power available depends on the amount of 24VDC power being used, and the amount of
24VDC power available depends on the amount of 5VDC power consumed. Determine the
amount of internally supplied power from the table on the following page.
6 Power required by base unit
7 Because of the different I/O configurations available in the DL06 family, the power
consumed by the base unit itself varies from model to model. Subtract the amount of power
required by the base unit from the amount of power supplied by the base unit. Be sure to
8 subtract 5VDC and 24VDC amounts.
Power required by option cards
9 Next, subtract the amount of power required by the option cards you are planning to use.
Again, remember to subtract both 5VDC and 24VDC. If your power budget analysis shows
10 surplus power available, you should have a workable configuration.
11
12
13
14
A
B
C
D
DL06 Power Supplied by Base Units DL06 Base Unit Power Required
Part Number 5 VDC (mA) 24 VDC (mA) Part Number 5 VDC (mA) 24 VDC (mA)
1
<1500mA 300mA D0-06AA 800mA none
D0-06xx
<2000mA 200mA D0-06AR 900mA none 2
D0-06xx-D 1500mA none D0-06DA 800mA none
5 Note: For information about the MODBUS protocol see the Group Schneider Web site at:
www.schneiderautomation.com. At the main menu, select Support/Services, Modbus, Modbus
Technical Manuals, PI-MBUS-300 Modbus Protocol Reference Guide or search for PIMBUS300.For
6 more information about the DirectNET protocol, order our DirectNET user manual, part number
DA–DNET–M, or download it free from our Web site: www.automationdirect.com. Select
Documentation/Misc./DA-DNET-M.
7
DL06 Port Specifications Communications Port 2
8 Communications Port 1
Port 2 Connects to HPP, DirectSOFT32, operator
interfaces, etc.
Port 1 Connects to HPP, DirectSOFT32, operator 15-pin, multifunction port, RS232C, RS422, RS485
9 interfaces, etc.
6-pin, RS232C
Communication speed (baud): 300, 600, 1200,
2400, 4800, 9600, 19200, 38400
Parity: odd (default), even, none
10 Communication speed (baud): 9600 (fixed)
Parity: odd (fixed) Station Address: 1 (default)
Station Address: 1 (fixed) 8 data bits
11 8 data bits 1 start, 1 stop bit
Asynchronous, half-duplex, DTE
1 start, 1 stop bit
12 Asynchronous, half-duplex, DTE
Protocol (auto-select): K-sequence (slave only),
Protocol (auto-select): K-sequence (slave only),
DirectNET (master/slave), MODBUS (master/slave),
non-sequence/print/ASCII in/out
DirectNET (slave only), MODBUS (slave only)
13 1 5V
Port 2 Pin Descriptions
Power (+) connection
DL06 Port Pinouts 2 TXD Transmit data (RS-232C)
14 TERM
Port 1 Pin Descriptions 3 RXD Receive data (RS-232C)
1 0V Power (-) connection (GND) 4 RTS Ready to send
A PORT1 PORT2 RUN STOP
R
2
3
5V
RXD
Power (+) connection
Receive data (RS-232C)
5
6
CTS
RXD-
Clear to send
Receive data (-) (RS-422/485)
4 TXD Transmit data (RS-232C) 7 0V Power (-) connection (GND)
B 5 5V Power (+) connection 8
9
0V
TXD+
Power (-) connection (GND)
Transmit data (+) (RS-422/485)
5 4 3 2
6 0V Power (-) connection (GND)
C 6 1 5
15
10
1
11
6
10
11
TXD-
RTS+
Transmit data (-) (RS-422/485)
Ready to send (+) (RS-422/485)
12 RTS- Ready to send (-) (RS-422/485)
D PORT1 PORT2 13
14
RXD+
CTS+
Receive data (+) (RS-422/485)
Clear to send (+) (RS-422/485)
15 CTS- Clear to send (-) (RS-422/485)
RS-232 Network 5
6
Point-to-point
11
1
DTE Device Signal GND
GND
Normally, the RS-232
6
1 0V Signal GND RXD
TXD
signals are used for 3
4
RXD
TXD
RXD
TXD TXD
RXD
shorter distances (15 CTS
RTS
meters maximum), for PORT1 RTS
7
10
15
6P6C CTS
5
communications Phone Jack
RTS
between two devices. OR
8
Loop
Connections on Port 1 Connections on Port 2 Back CTS
RS-422 Network
RS-422 signals are for RXD+
9
long distaces ( 1000 RXD–
impedence rating of
14 CTS+
15 CTS–
7 0V
Master
12
the cable (between 100
and 500 ohms).
Termination
13
Resistor
TXD+ / RXD+ TXD+ / RXD+
RXD–
Signal GND
Connect shield
to signal ground
Signal GND
A
RXD–
multi-drop networks.
6
B
6
11
11
Use termination
1
0V
resistors at both ends RTS+ 0V RTS+
of RS-485 network
wiring, matching the
TXD+ RXD+
CTS+
RTS–
Cable: Use Belden
TXD+
RXD+
CTS+
RTS–
C
9841 or equivalent
impedance rating of CTS– CTS–
D
10
10
D Then click the button indicated to send the Port configuration to the CPU, and click Close.
5
6
7
8
9
10 • Timeout: Amount of time the port will wait after it sends a message to get a response before logging
an error.
11 • RTS On Delay Time: The amount of time between raising the RTS line and sending the data.
• RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data.
12 • Data Bits: Select either 7–bits or 8–bits to match the number of data bits specified for the
connected devices.
• Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400
13 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value. Refer to the appropriate product manual for details.
14 • Stop Bits: Choose 1 or 2 stop bits to match the number of stop bits specified for the connected
devices.
A • Parity: Choose none, even, or odd parity for error checking. Be sure to match the parity specified
for the connected devices.
B • Echo Suppression: Select the appropriate radio button based on the wiring configuration used on
port 2.
C • Xon/Xoff Flow Control: Choose this selection if you have port 2 wired for Hardware Flow Control
(Xon/Xoff ) with RTS and CTS signal connected between all devices.
• RTS Flow Control: Choose this selection if you have Port 2 RTS signal wired between all devices.
D Then click the button indicated to send the Port configuration to the CPU, and click Close.
6 DL06 Memory Type QTY (Dec.) PLC Range(Octal) MODBUS Address MODBUS Data Type
Range (Decimal)
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type
7 Inputs (X) 512 X0 – X777 2048 – 2559 Input
Special Relays(SP) 512 SP0 – SP777 3072 – 3583 Input
8 Outputs (Y)
Control Relays (CR)
512
1024
Y0 – Y777
C0 – C1777
2048 – 2559
3072 – 4095
Coil
Coil
Timer Contacts (T) 256 T0 – T377 6144 – 6399 Coil
9 Counter Contacts (CT) 128 CT0 – CT177 6400 – 6527 Coil
Stage Status Bits(S) 1024 S0 – S1777 5120 – 6143 Coil
10 For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V) 256 V0 – V377 0 – 255 Input Register
Counter Current Values (V) 128 V1000 – V1177 512 – 639 Input Register
11 V Memory, user data (V)
3200 V1200 – V7377 640 – 3839 Holding Register
4096 V10000 - V17777 4096 - 8191 Holding Register
12 V Memory, non-volatile (V) 128 V7400 – V7577 3840 – 3967 Holding Register
13
14
A
B
C
D
The following examples show how to generate the MODBUS address and data type for hosts
which require this format.
Example 1: V2100
1
Find the MODBUS address for User V location V2100.
1. Find V memory in the table.
Holding Reg 1088 2
2. Convert V2100 into decimal (1088).
3. Use the MODBUS data type from the table.
3
V Memory, user data (V) 3200 V1200 – V7377 640 – 3839 Holding Register
4
Example 2: Y20 5
Find the MODBUS address for output Y20.
1. Find Y outputs in the table. Coil 2064 6
2. Convert Y20 into decimal (16).
3. Add the starting address for the range (2048). 7
4. Use the MODBUS data type from the table.
B
C
D
LD
that the RX/WX instruction can allow. The 9
value of 4 in the most significant position of the
K4128
word will cause the RX to use function 04
(30001 range).
10
LDA
O4000 11
RX
Y0 12
13
1. Refer to your PLC user manual for the correct memory mapping size of your PLC. Some of
the addresses shown above might not pertain to your particular CPU. 14
2. For an automated MODBUS/Koyo address conversion utility, download the file
modbus_conversion.xls from the www.automationdirect.com website.
A
B
C
D
2
LG
3
0V
AC(L) AC(N) 24V C0
Y0
4
Y1
Y2
50 - 60Hz
5
Y3
C1
Y4
6
Y5
Y6
Y7 Y10 Y12
C2
2.0A, 6 - 27V
7 10
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
11
2.0A
12 13
PWR: 100-240V
14 15 16
50-60Hz 40VA
17 20
D0-06DR
21 22 23
PWR
RUN
CPU
TX1
RX1
TX2
RX2
4
INPUT: 12 - 24V 3 - 15mA
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.
5
TERM
Master
PORT1 PORT2 RUN STOP
6
MODBUS RTU Protocol,, or DirectNET
7
Slave #1 Slave #2 Slave #3
8
When using the DL06 PLC as the master station, simple RLL instructions are used to initiate
9
the requests. The WX instruction initiates network write operations, and the RX instruction
initiates network read operations. Before executing either the WX or RX commands, we will 10
need to load data related to the read or write operation onto the CPU’s accumulator stack.
When the WX or RX instruction executes, it uses the information on the stack combined
with data in the instruction box to completely define the task, which goes to the port.
11
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
12
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
13
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
X TX2
RX2
INPUT: 12 - 24V 3 - 15mA
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.
PORT1 PORT2
TERM
RUN STOP
14
Master
Network A
WX (write)
RX (read) B
Slave
C
The following step-by-step procedure will provide you the information necessary to set up
your ladder program to receive data from a network slave.
D
8 1
(Y, C, Stage, T/C bits)
13 Scratch Pad Memory 8 1
Diagnostic Status 8 1
14 DL330 / 340 Memory Bits per unit Bytes
Data registers 8 1
A T / C accumulator 16 2
I/O, internal relays, shift register bits, T/C 1 1
B bits, stage bits
Scratch Pad Memory 8 1
Diagnostic Status(5 word R/W) 16 10
C
D
LD
it (see Appendix D for comm port KF201
4 special relays).One indicates “Port
Port Communication Error
Port Busy
LD
K0003
busy”(SP116), and the other indicates
5 ”Port Communication Error”(SP117).
The example above shows the use of
LDA
O40600
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
5
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
6
X TX2
RX2
INPUT: 12 - 24V 3 - 15mA
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.
PORT1 PORT2
TERM
RUN STOP
7
Master
MODBUS RTU Protocol,, or DirectNET 8
9
Slave #1 Slave #2 Slave #3
10
MODBUS Function Codes Supported
The MODBUS function code determines whether the access is a read or a write, and whether
11
to access a single data point or a group of them. The DL06 supports the MODBUS function
codes described below. 12
MODBUS Function Code Function DL06 Data Types Available
13
01
02
Read a group of coils
Read a group of inputs
Y, CR, T, CT
X, SP
14
05 Set / Reset a single coil (slave only) Y, CR, T, CT
15 Set / Reset a group of coils Y, CR, T, CT
A
03, 04 Read a value from one or more registers V
06 Write a value into a single register (slave only) V B
07 Read Exception Status V
08 Diagnostics V C
16 Write a value into a group of registers V
D
3 •
4
5
6
7
8
9 Timeout: Amount of time the port will wait after it sends a message to get a response before
logging an error.
10 • RTS On Delay Time: The amount of time between raising the RTS line and sending the
data.
11 • RTS Off Delay Time: The amount of time between resetting the RTS line after sending the
data.
• Station Number: For making the CPU port a MODBUS master, choose “1”. The possible
12 range for MODBUS slave numbers is from 1 to 247. Each slave must have a unique
number. At powerup, the port is automatically a slave, unless and until the DL06 executes
13 ladder logic MWX/MRX network instructions which use the port as a master. Thereafter,
the port reverts back to slave mode until ladder logic uses the port again.
14 • Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and
38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you
experience data errors or noise problems on the network. Important: You must configure
A the baud rates of all devices on the network to the same value. Refer to the appropriate
product manual for details.
B • Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
• Parity: Choose none, even, or odd parity for error checking.
C • Echo Suppression: Select the appropriate radio button based on the wiring configuration
used on port 2.
D Then click the button indicated to send the Port configuration to the CPU, and click Close.
9 Inputs X
Outputs Y
0–1777
0–1777
Control Relays C 0–3777
10 Stage Bits S
Timer Bits T
0–1777
0–377
Counter Bits CT 0–377
11 Special Relays SP
V–memory V
0–777
All
Global Inputs GX 0–3777
12 Global Outputs GY 0–3777
12 Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Relays. . . . . . . . . . . . . . . . . . . . . . . . . . . .
CT
SP
0–177
0–777
V–memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V All
13 Global Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Global Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . .
GX
GY
0–3777
0–3777
B Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 1–2000
CNT
11
Port 2 busy bit Number of times that
1 SP116 the PLC has tried to
poll network
12
_FirstScan
SP0 CTO
K9999
13
SP117 will come on when: 1) The slave device sends an "Exception Response." If this
occurs, look at the V-memory location associated with that instruction and consult the
MODICON MODBUS manual for details. 2) Cabling problem. Consult wiring diagram in
14
user manual and verify. 3) Setting for communications are not matching. For example:
Baud rates, parities, stop bits all must match. 4) Polling a slave address number that
doesn't exist. A
Under good conditions, SP116 will be counting up and SP117 will not. You will get an
occasional error in many field environments that introduce electrical/RF noise into the
application. Each application will dictate what allowable "percentage" of error is
acceptable. Anything below 10% typically does not affect the throughput very much.
B
CNT
2
Port 2 error bit
SP117 Number of times that
C
the PLC has errored
_FirstScan
SP0
CT1 D
K9999
1 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
2 register. Use function code 16 to write to multiple registers. Only one Network Instruction
(WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using
many network instructions on the same port, use the Shift Register instruction.
4 Slave Address: K1
Function Code: 06 - Preset Single Register
Start Slave Memory Address: 40001
5 Number of Elements:
Modbus Data Type:
n/a
584/984 Mode
Exception Response Buffer: V400
8 4
It will place the values into 32 bits of the master starting at C0.
C100 ( RST )
12
13
14
A
B
C
D
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, or the Stage programming instructions in Chapter 7.
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
top of the page to find the pages that discuss the instructions in that category.
4 • If you know the individual instruction name, use the following table to find the page(s) that
discusses the instruction.
5
6 Instruction
Accumulating Fast Timer (TMRAF)
Page
5–42
Instruction
And Store (AND STR)
Page
5–16
X0 Y0 STR X0 12
OUT Y0
OUT END
13
END 14
Normally Closed Contact
Normally closed contacts are also very common. This is accomplished with the Store Not, or
STRN instruction. The following example shows a simple rung with a normally closed
A
contact.
Direct SOFT32 Example Handheld Mnemonics
B
X0 Y0
OUT
STRN X0
OUT Y0
C
END
D
END
Contacts in Series
Use the AND instruction to join two or more contacts in series. The following example shows
1 two contacts in series and a single output coil. The instructions used would be STR X0, AND
X1, followed by OUT Y0.
2 Direct SOFT32 Example Handheld Mnemonics
STR X0
3 X0 X1 Y0
OUT
AND X1
OUT Y0
END
4 END
5 Midline Outputs
6 Sometimes it is necessary to use midline outputs to get additional outputs that are conditional
on other contacts. The following example shows how you can use the AND instruction to
continue a rung with more conditional outputs.
7
8 Direct SOFT32 Example Handheld Mnem
9 X0 X1 Y0
OUT
STR X0
AND X1
OUT Y0
10 X2 Y1
AND X2
OUT Y1
AND X3
OUT OUT Y2
11 X3 Y2
END
12 OUT
Parallel Elements
13
Direct SOFT32 Example Handheld Mnemonics
14 X0 Y0 STR X0
OUT OR X1
A X1
OUT Y0
END
B END
C You may also have to join contacts in parallel. The OR instruction allows you to do this. The
following example shows two contacts in parallel and a single output coil. The instructions
D would be STR X0, OR X1, followed by OUT Y0.
END
OUT Y0
END
4
Joining Parallel Branches in Series
5
You can also join one or more parallel branches in series. The And Store (ANDSTR)
instruction allows this operation. The following example shows a simple network with contact
6
branches in series with parallel contacts.
Direct SOFT32 Example Handheld Mnemonics 7
X0 X1 Y0 STR X0
OUT STR X1
OR X2 8
X2 ANDSTR
OUT Y0
END 9
END
Combination Networks 10
You can combine the various types of series and parallel branches to solve most any
application problem. The following example shows a simple combination network.
11
X0 X2 X5 Y0
X1 X3 X4
OUT
12
X6
13
END 14
Comparative Boolean
Some PLC manufacturers make it really difficult to do a simple comparison of two numbers. A
Some of them require you to move the data all over the place before you can actually perform
the comparison. The DL06 Micro PLCs provide Comparative Boolean instructions that allow
you to quickly and easily solve this problem. The Comparative Boolean provides evaluation of
B
two 4-digit values using boolean contacts. The valid evaluations are: equal to, not equal to,
equal to or greater than, and less than. C
In the following example when the value in V- V1400 K1234 Y3
memory location V1400 is equal to the constant OUT D
value 1234, Y3 will energize.
Boolean Stack
There are limits to how many elements you can include in a rung. This is because the DL06
1 PLCs use an 8-level boolean stack to evaluate the various logic elements. The boolean stack is
a temporary storage area that solves the logic for the rung. Each time the program encounters
2 a STR instruction, the instruction is placed on the top of the stack. Any other STR
instructions already on the boolean stack are pushed down a level. The ANDSTR, and
3 ORSTR instructions combine levels of the boolean stack when they are encountered. An
error will occur during program compilation if the CPU encounters a rung that uses more
than the eight levels of the boolean stack.
4 The following example shows how the boolean stack is used to solve boolean logic.
5
X0 X1 ORSTR AND X4 Y0
STR
6 STR OUT Output
7 STR
X2 AND X3
ANDSTR
8 X5 OR
9 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 2 STR X1
10 3 3 3
STR X1
STR X0 3 STR X0
4 4 4 4
11 5
6
5
6
5
6
5
6
7 7 7 7
12 8 8 8 8
A 8 8 8
ANDSTR
B 1
2
XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)}
C 3
.
.
D 8
Immediate Boolean
The DL06 Micro PLCs can usually complete an operation cycle in a matter of milliseconds.
However, in some applications you may not be able to wait a few milliseconds until the next 1
I/O update occurs. The DL06 PLCs offer Immediate input and outputs which are special
boolean instructions that allow reading directly from inputs and writing directly to outputs
during the program execution portion of the CPU cycle. You may recall that this is normally
2
done during the input or output update portion of the CPU cycle. The immediate
instructions take longer to execute because the program execution is interrupted while the 3
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 the image 5
register. Therefore, any regular instructions that follow will still use the image register values. Any
immediate instructions that follow will access the I/O again to update the status. The immediate output
instruction will write the status to the I/O and update the image register.
6
7
PWR
RUN
CPU
TX1
8
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 RX1
TX2
9
RX2
LOGIC 06
K oyo
TERM
10
11
PORT1 PORT2 RUN STOP
CPU Scan
X11
OFF
...
...
X2 X1
ON OFF OFF
X0
OFF X0
13
Input Image Register,
OFF X1
Write Outputs
OFF X1
C
Write Outputs to Specialty I/O
Diagnostics
D
Boolean Instructions
1 Store (STR)
2 The Store instruction begins a new rung or an additional
branch in a rung with a normally open contact. Status of
Aaaa
10 In the following Store example, when input X1 is on, output Y2 will energize.
11 Direct SOFT32
X1 Y2
Handheld Programmer Keystrokes
$ B ENT
STR 1
12 OUT
GX
OUT
C
2
ENT
13
14 In the following Store Not example, when input X1 is off output Y2 will energize.
A Direct SOFT32
X1 Y2
Handheld Programmer Keystrokes
SP B ENT
OUT STRN 1
B GX
OUT
C
2
ENT
C
D
B1400.12 Y2
8
OUT
9
Handheld Programmer Keystrokes
10
STR SHFT B V 1 4 0 0
11
K 1 2 ENT
OUT 2 ENT 12
In the following Store Not Bit-of-Word example, when bit 12 of V-memory location V1400
is off, output Y2 will energize. 13
DirectSOFT32
14
B1400.12 Y2
OUT
A
B
Handheld Programmer Keystrokes
STRN SHFT B V 1 4 0 0
C
OUT
K 1
2
2
ENT
ENT
D
Or (OR)
The Or instruction logically ors a normally open contact in
1 parallel with another contact in a rung. The status of the
Aaaa
contact will be the same state as the associated image register
2 point or memory location.
Or Not (ORN)
3 The Or Not instruction logically ors a normally closed contact
in parallel with another contact in a rung. The status of the Aaaa
4 contact will be opposite the state of the associated image
register point or memory location.
5 Operand Data Type DL06 Range
....................................A aaa
6 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
0-777
0-777
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0–1777
7 Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0–377
8 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP
0–177
0-777
X1 Y5 $ B ENT
11 OUT
Q
STR
OR
C
1
2
ENT
X2
12 GX
OUT
F
5
ENT
B X2
R
ORN
C
2
ENT
GX F ENT
C OUT 5
Or Bit-of-Word (ORB)
The Or Bit-of-Word instruction logically ors a normally
open contact in parallel with another contact in a rung.
Aaaa.bb
1
Status of the contact will be the same state as the bit
referenced in the associated memory location. 2
Or Not Bit-of-Word (ORNB)
The Or Not Bit-of-Word instruction logically ors a 3
normally closed contact in parallel with another contact
in a rung. Status of the contact will be opposite the state
of the bit referenced in the associated memory location.
Aaaa.bb
4
Operand Data Type DL06 Range
5
aaa bb
.....................................
V memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A
B See memory map BCD, 0 to 15 6
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PB See memory map BCD, 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.
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.
14
DirectSOFT32
X1 Y7 A
OUT
B1400.7 B
Handheld Programmer Keystrokes
STR 1 ENT C
ORN SHFT B V 1 4 0 0
K 7 ENT D
OUT 7 ENT
And (AND)
The And instruction logically ands a normally open
1 contact in series with another contact in a rung. The
Aaaa
9 In the following And example, when input X1 and X2 are on output Y5 will energize.
11 X1 X2 Y5
OUT
$
STR
B
1
ENT
V C
12 AND
GX F
2
ENT
ENT
OUT 5
13
In the following And Not example, when input X1 is on and X2 is off output Y5 will
14 energize.
Y5
B X1 X2
OUT
$
STR
B
1
ENT
W C ENT
C ANDN
GX
OUT
F
2
5
ENT
OUT
9
Handheld Programmer Keystrokes
10
STR
AND SHFT
1
B
ENT
V 1 4 0 0
11
OUT
K 4
5
ENT
ENT
12
13
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
DirectSOFT32
X1 B1400.4 Y5
OUT
A
B
Handheld Programmer Keystrokes
STR 1 ENT C
ANDN SHFT B V 1 4 0 0
K 4 ENT D
OUT 5 ENT
OUT
of a rung in parallel. Both branches must begin with
4 the Store instruction. 2
X1 X2 X3 Y5 $ B ENT
8 OUT
$
STR
C
1
ENT
STR 2
X4
9 V
AND
D
3
ENT
Q E
10 L
OR
ENT
4
ENT
ANDST
11 GX
OUT
F
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 Direct SOFT32 Handheld Programmer Keystrokes
14 X1 X2 Y5
OUT
$
STR
B
1
ENT
V C
A X3 X4
$
AND
D
2
ENT
ENT
STR 3
B V
AND
E
4
ENT
M
C ORST
GX
ENT
F ENT
OUT 5
Out (OUT)
Aaaa
The Out instruction reflects the status of the rung (on/off ) and
outputs the discrete (on/off ) state to the specified image register OUT 1
point or memory location.
Multiple Out instructions referencing the same discrete location should not be used since 2
only the last Out instruction in the program will control the physical output point. Instead,
use the next instruction, the Or Out. 3
Operand Data Type DL06 Range
....................................A
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
aaa
0–777
4
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0–777
0–1777
5
In the following Out example, when input X1 is on, output Y2 and Y5 will energize. 6
Direct SOFT32 Handheld Programmer Keystrokes
X1
OUT
Y2 $
STR
B
1
ENT 7
GX C
OUT
Y5
OUT
GX F
2
ENT
ENT
8
OUT 5
X1 Y2
OR OUT
$
STR
B
1
ENT
B
O
INST#
$
D
3
F
E
5
ENT
ENT
ENT C
2
ENT
C
STR 4
X4 Y2
OR OUT
O
INST#
D
3
F
5
ENT ENT C
2
ENT D
X1 B1400.3
7 OUT
B1401.6
STR 1 ENT
9 OUT SHFT B V 1 4 0 0
K 3 ENT
10 OUT SHFT B V 1 4 0 1
K 6 ENT
11 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
12 by the last rung of logic referencing it. X1 will override the logic state controlled by X0. To
avoid this situation, multiple outputs using the same location must not be used in
13 programming.
14 X0 B1400.3
A OUT
B
C X1 B1400.3
OUT
Not (NOT)
The Not instruction inverts the status of the rung
at the point 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
DirectSOFT32
X1 Y2
Handheld Programmer Keystrokes
$ B ENT
3
STR 1
OUT
SHFT N
TMR
O
INST#
T
MLR
ENT 4
GX C
OUT 2
ENT
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 rung cannot be created or
6
displayed in DirectSOFT versions earlier than 1.1i.
7
Positive Differential (PD)
The Positive Differential instruction is typically
known as a one shot. When the input logic
A aaa
PD
8
produces an off to on transition, the output will
energize for one CPU scan. 9
Operand Data Type DL06 Range 10
....................................A aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0–777 11
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0–777
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0–1777
12
In the following example, every time X1 makes an off to on transition, C0 will energize for
one scan. 13
DirectSOFT32 Handheld Programmer Keystrokes
14
X1 C0 $ B
PD
STR
P
1
ENT
D A
A
SHFT SHFT
CV 3 0
B
C
D
14 X1 Y4
OUT
$
GX
STR
SHFT P
E
CV
D
3
B
1
ENT
ENT
OUT 4
A
B In the following example, each time X1 is makes an On-to-Off transition, Y4 will energize for
one scan.
C DirectSOFT32
X1 Y4
Handheld Programmer Keystrokes
$ SHFT N D B ENT
STR TMR 3 1
D OUT GX
OUT
E
4
ENT
X1 Y5
$
STR
B
1
ENT 12
OUT Q SHFT P D C ENT
X2 GX
OUT
OR
F
CV
5
3
ENT
2
13
14
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
DirectSOFT32 Handheld Programmer Keystrokes
B
$ B ENT
X1 Y5
OUT Q
STR
OR
SHFT N
TMR
1
D
3
C
2
ENT
C
X2 GX
OUT
F
5
ENT
D
8 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0–777
0–1777
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777
9 Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0–377
0–177
10 In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2
transitions from Off to On.
11
DirectSOFT32 Handheld Programmer Keystrokes
12 X1 X2
OUT
Y5
$
Q
STR
B
P
1
D
ENT
C
SHFT ENT
OR CV 3 2
13 GX
OUT
F
5
ENT
14 In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2
transitions from On to Off.
A
B DirectSOFT32
X1 X2 Y5
Handheld Programmer Keystrokes
$
STR
B
1
ENT
OUT
C Q
GX
OR
SHFT N
F
TMR
D
3
C
2
ENT
ENT
OUT 5
X1
Handheld Programmer Keystrokes
11
Y2 Y5 $ B ENT
STR 1
SET
X
SET
C
2
F
5
ENT
12
13
In the following example when X1 is on, Y2 through Y5 will be reset or de–energized.
14
A
DirectSOFT32 Handheld Programmer Keystrokes B
X2 $ B
Y2 Y5 ENT
RST
S
STR
C
1
F ENT
C
RST 2 5
7 In the following example when X1 turns on, bit 1 in V1400 is set to the on state.
DirectSOFT32
8 X1
B1400.1
SET
9
10 Handheld Programmer Keystrokes
STR 1 ENT
11 SET SHFT B V 1 4 0 0
K 1 ENT
12 In the following example when X2 turns on, bit 1 in V1400 is reset to the off state.
DirectSOFT32
13 X2
B1400.1
14 RST
B STR
RST SHFT
2
B
ENT
V 1 4 0 0
C K 1 ENT
Pause (PAUSE)
The Pause instruction disables the output update on a
range of outputs. The ladder program will continue to Y aaa aaa
1
run and update the image register. However, the outputs PAUSE
in the range specified in the Pause instruction will be
turned off at the output points.
2
Operand Data Type DL06 Range
3
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
aaa
0–777
4
In the following example, when X1 is ON, Y5–Y7 will be turned OFF. The execution of the
ladder program will not be affected.
5
DirectSOFT32
6
X1 Y5 Y7
PAUSE 7
Since the D2–HPP Handheld Programmer does not have a specific Pause key, you can use
8
the corresponding instruction number for entry (#960), or type each letter of the command.
9
Handheld Programmer Keystrokes
$ B ENT
10
STR 1
O
INST#
J
9
G
6
A
0
ENT ENT D
3
F
5
ENT 11
In some cases, you may want certain output points in the specified pause range to operate 12
normally. In that case, use Aux 58 to over-ride the Pause instruction.
13
14
A
B
C
D
Comparative Boolean
1 Store If Equal (STRE)
2 The Store If Equal instruction begins a new rung or
additional branch in a rung with a normally open V aaa B bbb
comparative contact. The contact will be on when Vaaa
3 equals Bbbb .
Store If Not Equal (STRNE)
4 The Store If Not Equal instruction begins a new rung or V aaa B bbb
additional branch in a rung with a normally closed
5 comparative contact. The contact will be on when Vaaa
does not equal Bbbb.
6 Operand Data Type
....................................B aaa
DL06 Range
bbb
7 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
See memory map
See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 0–9999
8 In the following example, when the value in V memory location V2000 = 4933 , Y3 will
energize.
9
10 DirectSOFT32
V2000 K4933 Y3
Handheld Programmer Keystrokes
$
STR
SHFT E
4
C
2
A
0
A
0
A
0
OUT
11 GX
E
4
J
D
9
D
ENT
3
D
3
ENT
OUT 3
12
In the following example, when the value in V memory location V2000 =/ 5060, Y3 will
13 energize.
Y3 SP SHFT E C A A A
A
V2000 K5060
STRN 4 2 0 0 0
OUT
F A G A ENT
5 0 6 0
B GX
OUT
D
3
ENT
C
D
Or If Equal (ORE)
The Or If Equal instruction connects a normally open
comparative contact in parallel with another contact. V aaa B bbb
1
The contact will be on when Vaaa = Bbbb.
Or If Not Equal (ORNE) 2
The Or If Not Equal instruction connects a normally
closed comparative contact in parallel with another 3
contact. The contact will be on when Vaaa does not V aaa B bbb
equal Bbbb. 4
Operand Data Type
....................................B aaa
DL06 Range
bbb
5
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
See memory map
See memory map
6
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 0–9999
In the following example, when the value in V memory location V2000 = 4500 or V2002 =/
7
2500, Y3 will energize.
8
DirectSOFT32
V2000 K4500 Y3
Handheld Programmer Keystrokes
$
STR
SHFT E
4
C
2
A
0
A
0
A
0
9
OUT
V2002 K2345
E
Q
4
F
5
SHFT
A
E
0
A
0
C
ENT
A A C
10
OR 4 2 0 0 2
C
GX
2
D
3
E
D
4
F
5
ENT
11
ENT
OUT 3
12
In the following example, when the value in V memory location V2000 = 3916 or V2002
050, Y3 will energize. 13
14
DirectSOFT32
V2000 K3916 Y3
Handheld Programmer Keystrokes
$
STR
SHFT E
4
C
2
A
0
A
0
A
0
A
OUT D J B G
V2002 K2500 R
ORN
3
SHFT
9
E
1
4
6
ENT
C
2
A
0
A
0
C
2
B
C
GX
2
F
5
A
D
0
A
ENT
0
ENT
C
OUT 3
8 In the following example, when the value in V memory location V2000 = 5000 and V2002 =
2345, Y3 will energize.
10 OUT
F
STR
5
SHFT
A
0
A
4
0
A
0
ENT
2 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
13 In the following example, when the value in V memory location V2000 = 5000 and V2002 =/
2345, Y3 will energize.
A OUT
F
5
A
0
A
0
A
0
ENT
V SHFT E C A A C
B C
AND
2
D
3
E
4
4
F
5
ENT
2 0 0 2
GX D
C OUT 3
ENT
Store (STR)
The Comparative Store instruction begins a new rung or A aaa B bbb
additional branch in a rung with a normally open comparative 1
contact. The contact will be on when Aaaa is equal to or greater
than Bbbb. 2
Store Not (STRN)
The Comparative Store Not instruction begins a new rung or
A aaa B bbb
3
additional branch in a rung with a normally closed comparative
contact. The contact will be on when Aaaa < Bbbb. 4
Operand Data Type DL06 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb 5
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
––
See memory map
0–9999
6
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0–377
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0–177 7
In the following example, when the value in V memory location V2000 욷 1000, Y3 will
energize. 8
DirectSOFT32 Handheld Programmer Keystrokes 9
V2000 K1000 Y3 $ SHFT V C A A A
OUT
STR
B
1
A
0
A
AND
0
A
2
0
ENT
0 0 0
10
11
GX D ENT
OUT 3
12
In the following example, when the value in V memory location V2000 < 4050, Y3 will
energize. 13
DirectSOFT32 Handheld Programmer Keystrokes
14
V2000 K4050 Y3
OUT
SP
STRN
E
SHFT
A
V
F
AND
C
A
2
A
0
A
0
A
0 A
ENT
4 0 5 0
GX
OUT
D
3
ENT B
C
D
Or (OR)
The Comparative Or instruction connects a normally
1 open comparative contact in parallel with another contact. A aaa B bbb
The contact will be on when Aaaa is equal to or greater
2 than Bbbb.
Or Not (ORN)
3 The Comparative Or Not instruction connects a
A aaa B bbb
normally closed comparative contact in parallel with
4 another contact. The contact will be on when Aaaa <
Bbbb.
5 Operand Data Type DL06 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb
6 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p See memory map See memory map
7 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
––
0–377
0–9999
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0–177
8
In the following example, when the value in V memory location V2000 = 6045 or
9 V2002 욷 2345, Y3 will energize.
$ SHFT E C A A A
V2000 K6045 Y3 STR 4 2 0 0 0
OUT G A E F
11
ENT
6 0 4 5
12
C D E F ENT
2 3 4 5
GX D ENT
OUT 3
13
14 In the following example when the value in V memory location V2000 = 1000 or
V2002 < 2500, Y3 will energize.
A DirectSOFT32 Handheld Programmer Keystrokes
$ E C A A A
B V2000 K1000 Y3
OUT B
STR
1
SHFT
A
0
A
4
0
A
0
ENT
2 0 0 0
C V2002 K2500
R
C
ORN
F
SHFT
A
V
A
AND
C
ENT
2
A
0
A
0
C
2
2 5 0 0
D GX
OUT
D
3
ENT
And (AND)
The Comparative And instruction connects a normally
open comparative contact in series with another
A aaa B bbb 1
contact. The contact will be on when Aaaa is equal to or
greater than Bbbb. 2
And Not (ANDN)
The Comparative And Not instruction connects a normally
A aaa B bbb
3
closed comparative contact in series with another contact.
The contact will be on when Aaaa < Bbbb. 4
Operand Data Type DL06 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb 5
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
––
See memory map
0–9999
6
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0–377
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0–177 7
In the following example, when the value in V memory location V2000 = 5000, and
V2002 욷 2345, Y3 will energize. 8
DirectSOFT32 Handheld Programmer Keystrokes
9
V2000 K5000 V2002 K2345 Y3
OUT
$
F
STR
SHFT
A
E
A
4
A
C
2
ENT
A
0
A
0
A
0
10
5 0 0 0
V
C
AND
D E
SHFT V
F
AND
C
2
ENT
A
0
A
0
C
2 11
2 3 4 5
GX
OUT
D
3
ENT
12
13
In the following example, when the value in V memory location V2000 = 7000 and
V2002 < 2500, Y3 will energize. 14
DirectSOFT32 Handheld Programmer Keystrokes
$ E C A A A
A
V2000 K7000 V2002 K2500 Y3 SHFT
STR 4 2 0 0 0
OUT H
7
A
0
A
0
A
0
ENT B
W SHFT V C A A C
C
ANDN AND 2 0 0 2
C F A A ENT
2 5 0 0
GX SHFT Y D ENT
OUT AND 3
D
Immediate Instructions
1 Store Immediate (STRI)
2 The Store Immediate instruction begins a new rung
or additional branch in a rung. The status of the X aaa
contact will be the same as the status of the
3 associated input point at the time the instruction is
executed. The image register is not updated.
4 Store Not Immediate (STRNI)
The Store Not Immediate instruction begins a new
5 rung or additional branch in a rung. The status of
the contact will be opposite the status of the
X aaa
X1 Y2
Handheld Programmer Keystrokes
$ SHFT I B ENT
STR 8 1
10 OUT
GX
OUT
C
2
ENT
12 X1 Y2
OUT
SP
STRN
GX
SHFT I
C
8
B
1
ENT
ENT
OUT 2
13
Or Immediate (ORI)
14 The Or Immediate connects two contacts in parallel. The status
of the contact will be the same as the status of the associated X aaa
$ B ENT
3
OUT STR 1
X2
Q
GX
OR
SHFT I
F
8
ENT
C
2
ENT
4
OUT 5
$
STR
B
1
ENT
6
OUT
X2
R
ORN
GX
OUT
SHFT I
F
8
5
ENT
C
2
ENT
7
And Immediate (ANDI) 8
The And Immediate connects two contacts in series. The
status of the contact will be the same as the status of the
associated input point at the time the instruction is executed.
X aaa 9
The image register is not updated.
And Not Immediate (ANDNI)
10
The And Not Immediate connects two contacts in series.
The status of the contact will be opposite the status of the X aaa 11
associated input point at the time the instruction is executed.
The image register is not updated. 12
Operand Data Type DL06 Range
aaa 13
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0–777
OUT
$
V
STR
B
I
1
ENT
C
A
SHFT ENT
AND 8 2
GX
OUT
F
5
ENT
B
In the following example, when X1 is on and X2 is off, Y5 will energize.
DirectSOFT32 Handheld Programmer Keystrokes C
X1 X2 Y5 $ B ENT
D
STR 1
OUT
W SHFT I C ENT
ANDN 8 2
GX F ENT
OUT 5
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 DirectSOFT32 Handheld Programmer Keystrokes
X1 Y2 $ B
12 OUTI
O
STR
D F
1
A
ENT
ENT ENT
INST# 3 5 0
13 C
2
ENT
A DirectSOFT32
X1 Y2
Handheld Programmer Keystrokes
$
STR
B
1
ENT
OR OUTI
B O
INST#
D
C
3
F
5
A
0
ENT ENT
X4 Y2 ENT
2
C OR OUTI $
STR
E
4
ENT
O D F A ENT ENT
D INST#
C
3
2
ENT
5 0
8
X17 X16 X15 X14 X13 X12 X11 X10
K8 X10 K8 ON OFF ON ON OFF ON OFF ON
Load the value of 8
Unused accumulator bits
consecutive locations into the
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
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7 6 5
1 0 1
4 3
1 0
2
1 0
1 0
1
9
Acc.
OUTIF
K8
Y30 10
Copy the value in the lower
8 bits of the accumulator to
Y30-Y37
Location
Y30
Constant
K8
Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
ON OFF ON ON OFF ON OFF ON
11
12
Handheld Programmer Keystrokes 13
$ NEXT NEXT NEXT NEXT A ENT
STR
SHFT L D I F B
0
A I ENT
14
ANDST 3 8 5 1 0 8
GX
OUT
SHFT I
8
F
5
D
3
A
0
I
8
ENT A
B
C
D
X1 Y2 Y5
Handheld Programmer Keystrokes
$ B 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
register and on the corresponding output module(s).
14
DirectSOFT32
A X1 Y5 Y22
RSTI
Handheld Programmer Keystrokes
$
STR
B
1
ENT
S I F C C
B RST
SHFT
8 5 2 2
ENT
C
D
Inputs V
aaa
40400 - 40437
4
In the following example, when C0 is on, the binary pattern of X0–X17 will be loaded into
the accumulator using the Load Immediate instruction. The Out Immediate instruction
5
could be used to copy the 16 bits in the accumulator to output points, such as Y40–Y57. This
technique is useful to quickly copy an input pattern to output points (without waiting for a 6
full CPU scan to occur).
7
8
9
DirectSOFT32
C0 LDI
V40400
Location
V40400
X17 X16 X15 X14 X13 X12 X11 X10 X7
ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
X6 X5 X4 X3 X2 X1 X0
10
Load the inputs from X0 to
X17 into the accumulator,
immediately Unused accumulator bits
are set to zero
11
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUTI
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 12
V40502
V40502
Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40
ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
14
A
Handheld Programmer Keystrokes
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
OUT
SHFT
8
NEXT
4 0 5 0 2
ENT
D
In the following example, when C0 is on, the binary pattern of X10–X17 will be loaded into
5 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 Y30–Y37. This technique is useful to
quickly copy an input pattern to outputs (without waiting for the CPU scan).
7
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
13
Handheld Programmer Keystrokes
14 $
STR
NEXT NEXT NEXT NEXT A
0
ENT
SHFT L D I F B A I ENT
A GX
ANDST
SHFT I
3
F
8 5
D A
1 0
I
8
ENT
OUT 8 5 3 0 8
B
C
D
T1
Timer Preset
Timer Preset
7
T1 Y0
Current
Value
0 10 20 30
1/10 Seconds
40 50 60 0
OUT 8
9
There are those applications that need an accumulating timer, meaning it has the ability to
time, stop, and then resume from where it previously stopped. The accumulating timer works 10
similarly to the regular timer, but two inputs are required. The enable input starts and stops
the timer. When the timer stops, the elapsed time is maintained. When the timer starts again,
the timing continues from the elapsed time. When the reset input is turned on, the elapsed
11
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 12
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. 13
14
Seconds
X1
X1
0 1 2 3 4 5 6 7 8
Enable
TMRA
K30
T0
A
Enable
X2
X2
B
T0
Reset
Reset Input
Input
C
0 10 10 20 30 40 50 0
Current
Value 1/10 Seconds D
B NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as “T2” for discrete status bit for Timer T2, and
“TA2” for the current value of Timer T2.
C
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.
OUT
T2 5
Handheld Programmer Keystrokes
$
STR
B
1
ENT
Current
Value
Y0
0 10 20 30 40 50 60 0
6
7
N C D A
TMR 2 3 0
ENT 1/10th Seconds
$ SHFT T C ENT
STR MLR 2
GX A
OUT 0
ENT
8
Timer Example Using Comparative Contacts
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energize Y3, Y4, and Y5 at one second intervals respectively.
9
When X1 is turned off the timer will be reset to 0 and the comparative contacts will turn off
Y3, Y4, and Y5. 10
Direct SOFT32
X1
TMR
K45
T20
0 1 2 3
Timing Diagram
Seconds
4 5 6 7 8
11
TA20 K10 Y3
OUT
X1
Y3
12
TA20 K20 Y4
OUT
Y4
Y5
13
TA20 K30 Y5
OUT
Current
Value
T2
0 10 20 30 40 50 60 0
14
Handheld Programmer Keystrokes
$
STR
B
1
ENT
1/10th Seconds
A
N
$
TMR
STR
C
SHFT
2
A
T
MLR
0
C
2
E
A
4
0
F
5
B
ENT
1
A
0
ENT
B
C
GX D ENT
OUT 3
$ SHFT T C A C A ENT
STR MLR 2 0 2 0
GX E
D
ENT
OUT 4
$ SHFT T C A D A ENT
STR MLR 2 0 3 0
GX F ENT
OUT 5
Reset
Instruction Specifications
6 Timer Reference (Taaa): Specifies the timer number.
7 Preset Value (Bbbb): Constant value (K) or V memory. Preset
Current Value: Timer current values are accessed by referencing the associated V or T
Timer#
8 memory location*. For example, the timer current value for T3 resides in V-memory, V3.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated T memory
location. Operating as a “timer done bit,” it will be on if the current value is equal to or
9 greater than the preset value. For example the discrete status bit for timer 2 would be T2.
10 NOTE: The accumulating type timer uses two consecutive V-memory locations for the 8-digit value, and therefore
two consecutive timer locations. For example, if TMRA 1 is used, the next available timer number is TMRA 3.
NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same
C data reference. DirectSOFT uses separate references, such as “T2” for discrete status bit for Timer T2, and
“TA2” for the current value of Timer T2.
D The following examples show two methods of programming timers. One performs functions
when the timer reaches the preset value using the discrete status bit, or use comparative
contacts to perform functions at different time intervals.
X1
Timing Diagram
Seconds
3
0 1 2 3 4 5 6 7 8
C10
TMRA
K30
T6
X1 4
C10
T6 Y7 T6 5
OUT Current 0 10 10 20 30 40 50 0
Value
7
ENT ENT
STR 1 3 0
$ SHFT C B A ENT $ SHFT T G ENT
STR 2 1 0 STR MLR 6
N A G GX B A
8
SHFT ENT
TMR 0 6 OUT 1 0
C10
K45 X1 12
C10
TA20 K10 Y3
OUT
Y3 13
Y4
TA20 K20 Y4
OUT
Y5 14
T20
TA20 K30 Y5
OUT
Current
Value
0 10 10 20 30 40 50 0
A
B
Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)
$ B GX E ENT
ENT OUT 4
STR 1
$ C B A $ SHFT T C A
SHFT ENT STR MLR 2 0
C
STR 2 1 0
N A C A E F D A ENT
SHFT ENT 3 0
TMR 0 2 0 4 5
$ T C A B A GX F ENT
SHFT ENT OUT 5
STR MLR 2 0 1 0
GX
$
OUT
D
SHFT
3
ENT
T C A C A ENT
D
STR MLR 2 0 2 0
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.
3 X1
CNT CT1
X1
4 X2
X2
Up K3
Reset
5 CT1
1 2 3 4 0
Current Counter preset
alue
6 Counts
The up down counter (UDC) has three inputs, a count up input, count down input and reset
7 input. The maximum count value is 99999999. The timing diagram below shows the
relationship between the counter up and down inputs, counter reset, associated discrete bit,
8 current value, and counter preset.
9 X1
UDC CT2
X1
K3
10 X2 X2
Up
Down
11 X3
CT2
X3
Reset
12 Current
Value
1 2 1
Counts
2 3 0
Counter Preset
13 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
14 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.
A
B X1 X1
SGCNT
K3
CT2
CT2
C Current
Value
1 2
Counts
3 4 0
Counter preset
RST
D CT2
Counter (CNT)
The Counter is a two input counter that
increments when the count input logic transitions 1
from off to on. When the counter reset input is
on the counter resets to 0. When the current
value equals the preset value, the counter status
2
Counter#
bit comes on and the counter continues to count
up to a maximum count of 9999. The maximum 3
value will be held until the counter is reset. Count CNT CT aaa
Instruction Specifications B bbb 4
Counter Reference (CTaaa): Specifies the counter Reset
number. 5
Preset Value (Bbbb): Constant value (K) or a V
memory location.
Preset
6
Current Values: Counter current values are
accessed by referencing the associated V or CT 7
memory locations*. The V-memory location is
the counter location + 1000. For example, the
counter current value for CT3 resides in V
8
memory location V1003.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT 9
memory location. It will be on if the value is equal to or greater than the preset value. For
example the discrete status bit for counter 2 would be CT2. 10
NOTE: Counter preset constants (K) may be changed by using a programming device, even when the CPU
is in Run Mode. Therefore, a V-memory preset is required only if the ladder program must change the 11
preset.
4 CNT
K3
CT2
X1
C10
5
C10
CT2 or
CT2 Y7 Y7
1 2 3 4 0
6
OUT Current Value
7 $
$
STR
B
SHFT
1
C
ENT
B A ENT
$
GX
STR
SHFT
B
C
A
2
SHFT
ENT
T
MLR
C
2
ENT
STR 2 1 0 OUT 1 0
8 GY
CNT
C
2
D
3
ENT
9
Counter Example Using Comparative Contacts
10 In the following example, when X1 makes an off to on transition, counter CT2 will
increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at different
counts. When the reset C10 turns on, the counter status bit will turn off and the counter
11 current value will be 0, and the comparative contacts will turn off.
DirectSOFT32 Counting diagram
12 X1
CNT CT2
X1
K3
13
C10
C10
CTA2 K1 Y3 Y3
14 CTA2 K2
OUT
Y4
Y4
Y5
OUT
A CTA2 K3 Y5
OUT
Current
Value
1 2 3 4 0
$ B ENT
Handheld Programmer Keystrokes (cont)
$ SHFT C SHFT T C
STR 1 STR 2 MLR 2
C $
GY
CNT
STR
SHFT
C
2
C
2
B
D
1
3
A
ENT
0
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
NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same A
data reference. DirectSOFT uses separate references, such as “CT2” for discrete status bit for Counter CT2,
and “CTA2” for the current value of Counter CT2. B
C
D
4
X1
SGCNT CT7
X1
K3
CT7 Y7 Y7
OUT 1 2 3 4 0
5
Current
Value
C5 CT7 RST
RST CT7
$ B ENT
Handheld Programmer Keystrokes (cont)
GX B A ENT
STR 1 OUT 1 0
7 H
SHFT
7
S
RST
SHFT
D
3
G
ENT
6
SHFT GY
CNT
$
S
RST
STR
SHFT
SHFT
C
C
2
2
F
SHFT
5
ENT
T
MLR
H
7
ENT
8
$ SHFT C SHFT T H ENT
STR 2 MLR 7
X1
SGCNT CT2
Counting diagram
K10
X1
13 CT2 K1 Y3
OUT
Y3
14 CT2 K2 Y4
OUT
Y4
Y5
A CT2 K3 Y5
OUT
Current
Value
RST
CT2
1 2 3 4 0
$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)
$
STR
SHFT C
2
SHFT T
MLR
C
2
S G GY C
C
SHFT SHFT ENT
RST 6 CNT 2
C B A ENT GX E ENT
2 1 0 OUT 4
$ SHFT C SHFT T C $ SHFT C SHFT T C
D
STR 2 MLR 2 STR 2 MLR 2
B ENT D ENT
1 3
GX D ENT GX F ENT
OUT 3 OUT 5
4 X2
UDC
K3
CT2
X1
X2
5 X3
X3
6
CT2
CT2 Y7
Current 1 2 1 2 3 0
OUT Value
$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)
D
3
ENT
8
STR 2 STR 2 MLR 2
$ D ENT GX B A ENT
STR 3 OUT 1 0
SHFT U D C C
ISG 3 2 2
9
10 Up / Down Counter Example Using Comparative Contacts
In the following example, when X1 makes an off to on transition, counter CT2 will
11 increment by one. Comparative contacts are used to energize Y3 and Y4 at different counts.
When the reset (X3) turns on, the counter status bit will turn off, the current value will be 0,
and the comparative contacts will turn off.
12 DirectSOFT32
X1
Counting Diagram
UDC CT2
V2000 X1
13 X2
X2
X3
14 CTA2 K1 Y3
X3
Y3
OUT
A CTA2 K2 Y4
Y4
Current
Value
1 2 3 4 0
OUT
$ B ENT
Handheld Programmer Keystrokes (cont)
B ENT
STR 1 1
C $
$
STR
STR
C
D
2
3
ENT
ENT
GX
$
OUT
STR
D
SHFT
3
C
ENT
2
SHFT T
MLR
C
2
D SHFT
SHFT
U
V
AND
ISG
D
C
3
2
C
A
2
0
A
0
C
A
2
0
ENT GX
OUT
C
2
ENT
E
4
ENT
$ SHFT C SHFT T C
STR 2 MLR 2
X1
Data Input SR
$
STR
B
1
ENT 11
$ C ENT
X2
Clock Input
From C0
$
STR
STR
D
2
3
ENT
12
X3
Reset Input
To C17 SHFT S
B
RST
SHFT
H
R
ORN
ENT
SHFT A
0
13
1 7
7 V2000
9 OUT
8 9 3 5
V2010
11 Since the accumulator is 32 bits and V memory locations are 16 bits, the Load Double and
Out Double (or variations thereof ) use two consecutive V-memory locations or 8 digit BCD
constants to copy data either to the accumulator from a V-memory address or from a V-
12 memory address to the accumulator. For example if you wanted to copy data from V2000
and V2001 to V2010 and V2011 the most efficient way to perform this function would be as
13 follows:
X1 V2001 V2000
LDD
14 V2000 6 7 3 9 5 0 2 6
Acc. 6 7 3 9 55 00 22 66
B OUTD
V2010 6 7 3 9 5 0 2 6
C Copy data from the accumulator to
V2010 and V2011 V2011 V2010
Shifted out of
accumulator 6
SHFR
K4 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
8
0
7
1
6 5
0 0
4 3
1 0
2
0
1
1
0
1
7
Shift the data in the accumulator
4 bits (K4) to the right
8
9
OUT
V2010
0 4 9 3
Output the lower 16 bits of the ac-
cumulator to V2010 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
Acc. 8
0
7
0
3
0
9
4
9
0
0
4
7
6
2
(V2006&V2007)
B
accumulator with the value
in V2006 and V2007
OUTD
C
V2010 8 7 3 9 9 0 7 2
6 X1 LD
K3245
Constant
Accumulator Stack
7 Acc. 0
Load the value 3245 into the accumu- 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
Acc. 0 0 0 0 33 22 44 55 Level 1
Level 2
0
X
Accumulator Stack
0
X
0
X
0
X
3
X
2
X
4
X
5
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 Level 3
Level 4
0
X
X
0
X
X
0 0
X X X X 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
C The POP instruction rotates values upward through the stack into the accumulator. When a
POP is executed the value which was in the accumulator is cleared and the value that was on
top of the stack is in the accumulator. The values in the stack are shifted up one position in
D the stack.
Acc. X X X X XX XX XX X
1
Current Acc. value Accumulator Stack
POP the 1st value on the stack into the
accumulator and move stack values
up one location
Acc. 0 0 0 0 44 55 4 5 Level 1
Level 2
0
0
0
0
0
0
0
0
3
7
7
9
9
3
2
0
2
Level 3 X X X X X X X X
OUT
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
3
V2000
Acc. 0 0 0 0 44 55 44 55 5
Current Acc. value Accumulator Stack
POP the 1st value on the stack into the
accumulator and move stack values
up one location
Acc. 0 0 0 0 33 77 99 22 Level 1
Level 2
0
X
0
X
0
X
0
X
7
X
9
X
3
X
0
X 6
Level 3 X X X X X X X X
OUT
V2001 3 7 9 2
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
7
V2001
Accumulator Stack
9
POP the 1st value on the stack into the
X X X X X X X X
10
Acc. X X X X 77 99 33 00 Level 1
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
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
11
Level 7 X X X X X X X X
Copy data from the accumulator to
V2002
Level 8 X X X X X X X X
12
Using Pointers
13
Many of the DL06 series instructions will allow V-memory pointers as a operand (commonly
known as indirect addressing). Pointers allow instructions to obtain data from V-memory 14
locations referenced by the pointer value.
NOTE: DL06 V-memory addressing is in octal. However, the pointers reference a V-memory location with
A
values viewed as HEX. Use the Load Address (LDA) instruction to move an address into the pointer
location. This instruction performs the Octal to Hexadecimal conversion automatically. B
In the following example we are using a pointer operand in a Load instruction. V-memory
location 2000 is being used as the pointer location. V2000 contains the value 440 which the C
CPU views as the Hex equivalent of the Octal address V-memory location V2100. The CPU
will copy the data from V2100 which in this example contains the value 2635 into the lower
word of the accumulator.
D
1 X1 LD
V2076
V2077
X
X
X
X
X
X
X
X
P2000
3 0
V2000
4 4 0
V2103
V2104
X
X
X
X
X
X
X
X
Accumulator
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 Load the lower 16 bits of the
10 LDA
O 2100
accumulator with Hexadecimal
equivalent to Octal 2100 (440) 2
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 4 0
V2000
13
V2076 X X X X
V2100
V2102
V2103
X
X
X
X
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
V 2200
the accumulator to V2200 V2200
V2201
2
X
6
X
3
X
5
X
Load (LD)
The Load instruction is a 16 bit instruction that loads the
value (Aaaa), which is either a V memory location or a 4
LD
A aaa
1
digit 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
....................................A aaa 3
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
0–FFFF
4
SP53
Discrete Bit Flags 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 6
accumulator.
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.
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
Copy the value in the lower
16 bits of the accumulator to
V2010
8 9
V2010
3 5
13
Handheld Programmer Keystrokes
$ B X
14
STR 1 SET
SHFT L
ANDST
D
3
A
C
GX
2
A
0
A
0
A
V
0
C
ENT
A B A
B
SHFT ENT
OUT AND 2 0 1 0
C
D
7 NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
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
10 Direct SOFT32
X1 LDD V2001 V2000
V2000 6 7 3 9 5 0 2 6
12 Acc. 6 7 3 9 65 00 22 66
13 OUTD
6 7 3 9 5 0 2 6
$ B ENT
STR 1
B SHFT L
ANDST
D
3
D
3
C A A A
C GX
2
SHFT
0
D
0 0
ENT
OUT 3
D C
2
A
0
B
1
A
0
ENT
Direct SOFT32
12
C0 Location Constant
LDF C10 C16 C15 C14 C13 C12 C11 C10
K7
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
Location Constant Y6 Y5 Y4 Y3 Y2 Y1 Y0
A
Copy the value from the
specified number of bits in Y0 K7 OFF OFF OFF ON ON ON OFF
$
the accumulator to Y0 – Y6
C A
B
SHFT ENT
STR 2 0
SHFT
SHFT
L
ANDST
C
D
B
3
F
A
5
H ENT
C
2 1 0 7
GX
A
OUT
0
SHFT F
H
5
7
ENT
D
In the following example when X1 is on, the octal number 40400 will be converted to a HEX
8 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
Direct SOFT32
10 X1 LDA
O 40400 4 0
Octal
4 0 0
Hexadecimal
4 1 0 0
13 OUT
4 1 0 0
14 V2000
A V2000
B $
STR
B
1
ENT
SHFT L D A
C E
ANDST
A E
3
A
0
A ENT
4 0 4 0 0
D GX
OUT
SHFT V
AND
C
2
A
0
A
0
A
0
ENT
In the following example when X1 is on, the HEX equivalent for octal 25 will be loaded into 8
the accumulator (this value will be placed on the stack when the Load Accumulator Indexed
instruction is executed). V memory location V1410 will be added to the value in the 1st. level 9
of the stack and the value in this location (V1435 = 2345) is loaded into the lower 16 bits of
the accumulator using the Load Accumulator Indexed instruction. The value in the lower 16
bits of the accumulator is output to V1500 using the Out instruction.
10
X1 LDA
O 25
Octal
2 5
Hexadecimal
0 0 1 5 11
Load The HEX equivalent to
octal 25 into the lower 16
bits of the accumulator
The unused accumulator
bits are set to zero
Acc. 0 0 0 0 0 0 1 5
12
LDX
V1410
Octal
HEX Value in 1st
stack location Octal Accumulator Stack
13
Move the offset to the stack.
V 1
14
Load the accumulator with 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
OUT
V1500 Acc. 0 0 0 0
B
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
V1500
Handheld Programmer Keystrokes
$
STR
B
1
ENT
C
L D A C F
SHFT
SHFT
ANDST
L
ANDST
D
3
3
X
SET
0
B
2
1
E
5
4
B
ENT
1
A
0
ENT
D
GX B F A A
PREV PREV PREV ENT
OUT 1 5 0 0
7 NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
8 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
9 executed. The LDSX instruction specifies the Data Label (DLBL K2) where the numerical
constant(s) are located in the program and loads the constant value, indicated by the offset in
the stack, into the lower 16 bits of the accumulator.
10
11 X1
LD
K1
The unused accumulator
Hexadecimal
0 0 0 1
Value in 1st. level of stack is
used as offset. The value is 1
12
Load the offset value of 1 (K1) into the lower 16
bits of the accumulator. Level 1 0 0 0 0 0 0 0 1
Acc. 0 0 0 0 0 0 0 1
Level 2 X X X X X X X X
LDSX
Level 3 X X X X X X X X
K2
13
Constant Level 4 X X X X X X X X
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
14 .
.
OUT
V2000
A to V2000
END
The unused accumulator
bits are set to zero
Acc. 0 0 0 0 2 3 2 3
DLBL
DLBL K2
B NCON
2 3 2 3
Offset 0
K3333 V2000
C NCON
Offset 1
K2323
D NCON
Offset 2
K4549
SHFT
SHFT
L
ANDST
L
D
D
3
S
SHFT
X
K
JMP
B
C
1
ENT
ENT
1
ANDST 3 RST SET 2
SHFT
SHFT
E
D
4
N
L
TMR
D
B
3
ENT
L C ENT
2
3 ANDST 1 ANDST 2
SHFT N
N
TMR
C
C
2
O
INST#
O
N
N
TMR
D
C
3
D
D
3
D
C
3
D
D
3
ENT
3
SHFT ENT
TMR 2 INST# TMR 2 3 2 3
SHFT
GX
N
TMR
C
2
O
INST#
V
N
C
TMR
A
E
A
4
F
A
5
E
4
J
9
ENT
4
SHFT ENT
OUT AND 2 0 0 0
Out (OUT)
The Out instruction is a 16 bit instruction that copies the value
1 in the lower 16 bits of the accumulator to a specified V
OUT
A aaa
memory location (Aaaa).
2 Operand Data Type DL06 Range
....................................A aaa
3 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
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
6 accumulator are copied to V2010 using the Out instruction.
Direct SOFT32
X1
Handheld Programmer Keystrokes
LD V2000 $ 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 OUT
V2010
Acc. 0 0 0 0 88 99 33 55
GX
OUT
SHFT V
AND
C
2
A
0
B
1
A
0
ENT
9
Copy the value in the lower
16 bits of the accumulator to 8 9 3 5
V2010 V2010
13 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
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
accumulator is output to V2010 and V2011 using the Out Double instruction.
B Direct SOFT32
6
V2001
7 3 9 5
V2000
0 2 6
Handheld Programmer Keystrokes
X1 $ B ENT
LDD STR 1
C V2000
C
L
ANDST
A
D
A
3
D
A
3
ENT
2 0 0 0
D OUTD
V2010
C
OUT
SHFT
A
D
B
3
A ENT
accumulator to V2010 and V2011 V2010 2 0 1 0
V2011
In the following example, when C0 is on, the binary pattern of C10–C16 (7 bits) will be
5
loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the
accumulator are output to Y0–Y6 using the Out Formatted instruction. 6
Direct SOFT32
C0 LDF C10
Location
C10
Constant
K7
C16 C15 C14 C13 C12 C11 C10
7
K7 OFF OFF OFF ON ON ON OFF
OUTF
K7
Y20
0 0 0
Accumulator
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
9
Copy the value of the
specified number of bits
from the accumulator to
Y20–Y26 Location
Y0
Constant
K7
Y26 Y25 Y24 Y23 Y22 Y21 Y20
OFF OFF OFF ON ON ON OFF
10
Handheld Programmer Keystrokes
$
STR
SHFT C
2
A
0
ENT 11
SHFT L D F
ANDST 3 5
SHFT
GX
C
2
B
F
1
A
0
H
7
ENT 12
SHFT
OUT 5
A
0
H
7
ENT
13
Pop (POP)
14
The Pop instruction moves the value from the first level of the
accumulator stack (32 bits) to the accumulator and shifts each A
value in the stack up one level. POP
B
C
Discrete Bit Flags Description
SP63 on when the result of the instruction causes the value in the accumulator to be zero.
D
4 C0 POP
Previous Acc. value
Acc. X X X X XX XX XX XX
6 OUT
V2000
Level 4
Level 5
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
V2000 4 5 4 5 Level 6 X X X X X X X X
POP
Acc. 0 0 0 0 44 55 44 55
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
Level 2
0
X
0
X
0
X
0
X
7
X
9
X
3
X
0
X
OUT Level 3 X X X X X X X X
10 V2001
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
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
14
Copy the value in the lower 16 bits of
the accumulator to V2002 Level 4 X X X X X X X X
Level 5 X X X X X X X X
V2002 7 9 3 0 Level 6 X X X X X X X X
$
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
GX
OUT
CV
SHFT
SHFT
INST#
V
AND
C
CV
2
A
ENT
0
A
0
A
0
ENT
C SHFT
GX
P
CV
SHFT
SHFT
O
INST#
V
P
C
CV
A
ENT
A B ENT
OUT AND 2 0 0 1
D SHFT
GX
P
CV
SHFT O
INST#
V
P
C
CV
A
ENT
A C
SHFT ENT
OUT AND 2 0 0 2
Acc. 0 0 0 0 3 5 4 4 10
LDA
O25
Octal
2 5 0
HEX
0 1 5
11
Load the HEX equivalent to
octal 25 into the lower 16 bits
of the accumulator. This is the
offset for the Out Indexed
The unused accumulator
bits are set to zero
0 0 0 0 0 0 1 5
12
Acc.
instruction, which determines
the final destinaltion address
OUTX
V 1
Octal
5 0 0 + 2
Octal
5 = V 1 5
Octal
2 5
13
Accumulator Stack
14
V1500 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
offset address 1525
(V1500+25) the final answer Level 3 X X X X X X X X
$ B
Level 4
Level 5
X
X
X X
X X
X
X
X
X
X X
X X
X
X
A
ENT Level 6 X X X X X X X X
STR 1
SHFT L
ANDST
D
3
PREV D
3
F
5
E
4
E
4
ENT
Level 7
Level 8
X
X
X X
X X
X
X
X
X
X X
X X
X
X
B
L D A C F ENT
SHFT
C
ANDST 3 0 2 5
GX SHFT X B F A A ENT
OUT SET 1 5 0 0
accumulater 8 9 3 5
5
V1400
$ B ENT
7
STR 1
0 0 3 5
SHFT L D B E A A ENT
ANDST 3 1 4 0 0 V1500
GX L B F A A
8
SHFT ENT
OUT ANDST 1 5 0 0
13 In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16
bits of the accumulator using the Load instruction. The value in the upper 8 bits of the lower
14 16 bits of the accumulator are copied to V1500 using the Out Most instruction.
DirectSOFT32
A X1
LD
V1400
Load the value in V1400 into
the lower 16 bits of the
accumulator 8
V1400
9 3 5
$ B 8 9 0 0
ENT
STR 1
D SHFT L
ANDST
D
3
B
1
E
4
A
0
A
0
ENT
V1500
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 Load instruction. The value in the accumulator is anded with the value
in V2006 using the And instruction. The value in the lower 16 bits of the accumulator is 9
output to V2010 using the Out instruction.
10
Direct SOFT32
X1 LD
V2000
2
V2000
8 7 A 11
Load the value in V2000 into The upper 16 bits of the accumulator
the lower 16 bits of the
accumulator
will be set to 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 12
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
accumulator with
the value in V2006
AND (V2006)
Acc.
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
1
1
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
14
OUT
V2010
2 8 3 8
A
Copy the lower 16 bits of the
accumulator to V2010
SHFT L
ANDST
D
1
3
C
2
A
0
A
0
A
0
ENT
C
V V C A A G
AND
GX
OUT
SHFT
SHFT V
AND
AND
C
2
2
A
0
0
B
0
1
A
6
0
ENT
ENT
D
6 SP63
Discrete Bit Flags
Will be on if the result in the accumulator is zero.
Description
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
8 In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is anded
9 with 36476A38 using the And Double instruction. The value in the accumulator is output to
V2010 and V2011 using the Out Double instruction.
10
11 Direct SOFT32
X1 LDD 5
V2000
4 7 E 2
V2000
8 7 A
V2000
13 ANDD
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
14 accumulator with
the constant value
36476A38
AND 36476A38
Acc.
0
0
0
0
1
0
1
0
1
0
0
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
1
1
0
1
1
0
0
0
1
0
1
1
0
0
1
1
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
A OUTD
V2010 1 4 4 6 2 8 3 8
B V2011
C
Handheld Programmer Keystrokes
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
D V
AND
SHFT D
3
SHFT K
JMP
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
OUT 3 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
9
In the following example, when X1 is on the Load Formatted instruction loads C10–C13 (4 10
binary bits) into the accumulator. The accumulator contents is logically ANDed with the bit
pattern from Y20–Y23 using the And Formatted instruction. The Out Formatted instruction
outputs the accumulator’s lower four bits to C20–C23.
11
DirectSOFT32
X1
LDF
K4
C10 Location
C10
Constant
K4
C13 C12 C11 C10
ON ON ON OFF
12
Load the status of 4
consecutive bits (C10-C13)
into the accumulator
The unused accumulator bits are set to zero
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
13
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
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
14
the accumulator Y23 Y22 Y21 Y20
OUTF
K4
C20
AND (Y20-Y23) ON OFF OFF OFF
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1
1 0
0
0
0
0
0
A
ndard RLL
D
1
F
ENT
B A E
C20 K4 ON OFF OFF OFF
C
SHFT NEXT NEXT NEXT NEXT ENT
ANDST 3 5 1 0 4
V
AND
GX
SHFT F
F
5
NEXT C
2
A
C
0
A
E
4
E
ENT
D
SHFT PREV PREV ENT
OUT 5 2 0 4
6 NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the binary value in the accumulator will be anded
7 with the binary value in the first level or the accumulator stack. The result resides in the
accumulator. The 32 bit value is then output to V1500 and V1501.
8
9 DirectSOFT32
X1 V1401 V1400
LDD
10
5 4 7 E 2 8 7 A
V1400
Load the value in V1400 and
1401 into the accumulator
11 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 1 0
2 1
1
0
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
13 accumulator stack
OUTD
Acc. 0 0 0 1
0 0 1 0 0 0 0
1 0 0 0 1
0 0
1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0
V1500
V1500
3 8
and 1501
$ B ENT
STR 1
B SHFT
V
L
ANDST
D
S
3
D
3
B
1
E
4
A
0
A
0
ENT
SHFT 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
value in the lower 16 bits of the accumulator with a specified V
1
OR
memory location (Aaaa). The result resides in the accumulator. A aaa
The discrete status flag indicates if the result of the Or is zero. 2
Operand Data Type
....................................A
DL06 Range
aaa
3
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map 4
SP63
Discrete Bit Flags
Will be on if the result in the accumulator is zero.
Description
5
SP70 on when the value loaded into the accumulator by any instruction is zero.
6
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the 7
accumulator using the Load instruction. The value in the accumulator is ored with V2006
using the Or instruction. The value in the lower 16 bits of the accumulator are output to
V2010 using the Out instruction.
8
9
Direct SOFT32
X1 LD
V2000
10
2 8 7 A
V2000
OR
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
12
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
V2010
14
Copy the value in the lower
16 bits of the accumulator to
V2010
6 A
V2010
7 A
A
Handheld Programmer Keystrokes
$
STR
B
1
ENT B
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
Q
OR
SHFT V
AND
C
2
A
0
A
0
G
6
ENT C
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
D
Or Double (ORD)
The Or Double is a 32 bit instruction that ors the value in the
1 accumulator with the value (Aaaa), which is either two ORD
consecutive V memory locations or an 8 digit (max.) constant K aaa
2 value. The result resides in the accumulator. Discrete status flags
indicate if the result of the Or Double is zero or a negative
3 number (the most significant bit is on).
Operand Data Type DL06 Range
4 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
aaa
6 SP63
Discrete Bit Flags
Will be on if the result in the accumulator is zero.
Description
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
8 In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the accumulator is
9 ored with 36476A38 using the Or Double instruction. The value in the accumulator is
output to V2010 and V2011 using the Out Double instruction.
10 Direct SOFT32
X1 V2001 V2000
LDD
11 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
OUTD
A V2010
V2011 V2010
V2011
$ B ENT
C
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
Q SHFT D SHFT K D G E H G SHFT A SHFT D I ENT
D GX
OUT
OR
SHFT D
3
3
C
2
A
JMP
0
B
3
1
A
6
0
ENT
4 7 6 0 3 8
Or Formatted (ORF)
The Or Formatted instruction logically ORs the binary
value in the accumulator and a specified range of discrete ORF A aaa
1
bits (1–32). The instruction requires a starting location K bbb
(Aaaa) and the number of bits (Kbbb) to be ORed.
Discrete status flags indicate if the result is zero or negative
2
(the most significant bit =1).
Operand Data Type DL06 Range
3
A/B
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
aaa
0-777
bbb
-- 4
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0-777 --
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S
0-1777
0-1777
--
--
5
Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0-377
0-177
--
--
6
Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP 0-777 --
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K - 1-32 7
SP63
Discrete Bit Flags
Will be on if the result in the accumulator is zero.
Description 8
SP70 on when the value loaded into the accumulator by any instruction is zero.
9
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads C10–C13 (4
10
binary bits) into the accumulator. The Or Formatted instruction logically ORs the
accumulator contents with Y20–Y23 bit pattern. The Out Formatted instruction outputs the 11
accumulator’s lower four bits to C20–C23.
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
the accumulator
SHFT
STR
L
B
D
1
F
ENT
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
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
11
36476A38
accumulator with the value OR (top of stack) 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0
in the first level of the
accumulator stack Acc. 0 0
1 0 1
1 0 0 1 0
1 0 0 0
1 0
1 0
1 0 1
1 0 0
1 1
0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0
12 OUTD
V1500
Copy the value in the 7 6 7 F 6 A 7 A
$
STR
B
1
ENT
A SHFT
Q
L
ANDST
SHFT
D
S
3
D
ENT
3
B
1
E
4
A
0
A
0
ENT
OR RST
B GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
C
D
Exclusive Or (XOR)
The Exclusive Or instruction is a 16 bit instruction that
performs an exclusive or of the value in the lower 16 bits XOR 1
of the accumulator and a specified V memory location A aaa
(Aaaa). The result resides in the in the accumulator. The
discrete status flag indicates if the result of the XOR is
2
zero.
Operand Data Type DL06 Range
3
....................................A
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
4
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
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
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
SHFT
STR
L
ANDST
D
3
SET
SHFT
1
V
AND
C
2
A
0
A
0
A
0
ENT
C
SHFT
GX
X
SET
SHFT Q
V
OR
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: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
9 the accumulator using the Load Double instruction. The value in the accumulator is
exclusively ored with 36476A38 using the Exclusive Or Double instruction. The value in the
10 accumulator is output to V2010 and V2011 using the Out Double instruction.
11 Direct SOFT32
X1 LDD 5
V2001
4 7 E 2
V2000
8 7 A
V2000
13 K36476A38
14
the constant value
36476A38 XORD 36476A38 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0
OUTD Acc. 0 0
1 0
1 0 0 1
0 0
1 0 0 0 0
1 0
1 0
1 0 0 0
1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
V2010
C SHFT
SHFT
L
ANDST
X
D
Q
3
D
3
SHFT D
C
2
A
SHFT
0
A
K
0
A
0
ENT
SET OR 3 JMP
D D
GX
3
G
6
E
D
4
H
7
G
C
6
SHFT
A
A
B
0
SHFT
A
D
3
I
8
ENT
SHFT ENT
OUT 3 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
9
In the following example, when X1 is on, the binary pattern of C10–C13 (4 bits) will be 10
loaded into the accumulator using the Load Formatted instruction. The value in the
accumulator will be logically Exclusive Ored with the bit pattern from Y20–Y23 using the
Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator are
11
output to C20–C23 using the Out Formatted instruction.
DirectSOFT32
X1
Location Constant C13 C12 C11 C10
12
LDF C10 C10 K4 OFF ON ON OFF
K4
OUTF C20
Y23 Y22 Y21 Y20
XORF (Y20-Y23) ON OFF OFF OFF
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1
1 0
1
0
1
0
0
A
K4
Standard RLL
$
STR
B
1
ENT
C20 K4 ON ON ON OFF
C
L D F B A E
D
SHFT NEXT NEXT NEXT NEXT ENT
ANDST 3 5 1 0 4
4 NOTE: Status flags are valid only until another instruction uses the same flag.
5 SP63
Discrete Bit Flags
Will be on if the result in the accumulator is zero.
Description
6 SP70 on when the value loaded into the accumulator by any instruction is zero.
In the following example when X1 is on, the binary value in the accumulator will be exclusive
7 ored with the binary value in the first level of the accumulator stack. The result will reside in
the accumulator.
8
9
10 DirectSOFT32
X1 LDD
5
V1401
4 7 E 2
V1400
8 7 A
V1400
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
12 XORS
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
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
0
0
0
1
1 1
0 0
1
0
0
1
1
0
1
0
1
0 0
0 0
1
0
0
0
1
0
0
1
0 1
0 0
1
1
0
1
0
1
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.
accumulator stack
14 OUTD
V1500
6 2 3 9 4 2 4 2
$
STR
B
1
ENT
C SHFT
SHFT
L
ANDST
X
D
Q
3
D
SHFT
3
S
B
ENT
1
E
4
A
0
A
0
ENT
SET OR RST
D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
Compare (CMP)
The compare instruction is a 16 bit instruction that compares the
value in the lower 16 bits of the accumulator with the value in a CMP 1
specified V memory location (Aaaa). The corresponding status A aaa
flag will be turned on indicating the result of the comparison. 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
SP60 On when the value in the accumulator is less than the instruction value. 5
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction value. 6
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
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 Load instruction. The value in the accumulator is compared
with the value in V2000 using the Compare instruction. The corresponding discrete status
8
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 9
energizing C30.
Direct SOFT32
X1 LD CONSTANT
10
4 5 2 6
K4526
Acc. 0 0 0 0 44 55 22 66
12
CMP
V2000
Compared
with
13
8 9 4 5
Compare the value in the
accumulator with the value
in V2000
V2000
14
A
SP60 C30
B
Handheld Programmer Keystrokes
$ B ENT
STR 1
SHFT
ANDST
C
2
SHFT
3
M
ORST
P
CV
JMP
C
4
2
A
5
0
A
2
0
A
6
0
ENT
C
$ SP G A
GX
OUT
STR
SHFT
SHFT
STRN
C
2
D
6
3
A
0
0
ENT
ENT
D
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
8 In the following example when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is
9 compared with the value in V2010 and V2011 using the CMPD instruction. The
corresponding discrete status flag will be turned on indicating the result of the comparison. In
10 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 Direct SOFT32
X1 LDD
V2001 V2000
4 5 2 6 7 2 9 9
V2000
Acc. 4 5 2 6 77 72 9 9
13 CMPD
Compared
with
V2010
A SP60 C30
$ B ENT
STR 1
C SHFT L
ANDST
C
D
3
D
M
3
P
C
D
2
A
0
A
C
0
A
A
0
ENT
B A
SHFT SHFT ENT
2 ORST CV 3 2 0 1 0
D $
STR
SHFT SP
STRN
G
6
A
0
ENT
GX SHFT C D A ENT
OUT 2 3 0
NOTE: Status flags are valid only until another instruction uses the same flag.
10
In the following example, when X1 is on the Load Formatted instruction loads the binary 11
value (6) from C10–C13 into the accumulator. The CMPF instruction compares the value in
the accumulator to the value in Y20–Y23 (E hex). The corresponding discrete status flag will
be turned on indicating the result of the comparison. In this example, if the value in the
12
accumulator is less than the value specified in the Compare instruction, SP60 will turn on
energizing C30. 13
DirectSOFT32
X1
LDF C10
Load the value of the
specified discrete locations
Location Constant
C13 C12 C11 C10
14
C10 K4 OFF ON ON OFF
K4 (C10-- C13) into the
CMPF Y20
accumulator
SP60
K4
C30
of the specified discrete
location (Y20-- Y23)
Acc.
5 NOTE: Status flags are valid only until another instruction uses the same flag.
6 In the following example when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The value in V1410 and V1411 is loaded
into the accumulator using the Load Double instruction. The value that was loaded into the
7 accumulator from V1400 and V1401 is placed on top of the stack when the second Load
instruction is executed. The value in the accumulator is compared with the value in the first
8 level or the accumulator stack using the CMPS instruction. The corresponding discrete status
flag will be turned on indicating the result of the comparison. In this example, if the value in
9 the accumulator is less than the value in the stack, SP60 will turn on, energizing C30.
DirectSOFT32 V1401 V1400
X1 Load the value in V1400 and 6 5 0 0 3 5 4 4
10 LDD
V1400
V1401 into the accumulator
13 SP60 C30
OUT Acc. 5 5 0 0 3 5 4 4
A
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
B SHFT L
ANDST
C
D
3
D
M
3
P
B
S
1
E
4
B
1
A
0
ENT
C $
STR
PREV G
6
A
0
ENT
OUT
C1
B
C
D
Math Instructions
1 Add (ADD)
ADD
Add is a 16 bit instruction that adds a BCD value in the
2 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
8 NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
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 are
10 added to the value in V2006 using the Add instruction. The value in the accumulator is
copied to V2010 using the Out instruction.
11 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
B
Copy the value in the lower V2010
16 bits of the accumulator to
V2010
Handheld Programmer Keystrokes
C $
STR
B
1
ENT
SHFT L D C A A A ENT
D SHFT
ANDST
A
0
D
3
3
D
3
2
C
0
2
A
0
0
A
0
0
G
6
ENT
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
8
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
accumulator is copied to V2010 and V2011 using the Out Double instruction.
10
Direct SOFT V2001 V2000
11
X1 6 7 3 9 5 0 2 6
LDD
V2000
ADDD
V2006
+ 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
accumulator to V2010 and
V2011
Handheld Programmer Keystrokes B
$ B ENT
STR 1
SHFT L
ANDST
D
3
D
3
C
2
A
0
A
0
A
0
ENT C
SHFT A D D D C A A G ENT
GX
OUT
SHFT
0
D
3
3
3
SHFT
3
V
AND
C
2
2
A
0
0
B
0
1
A
6
0
ENT
D
R7.0
12 ADDR
2 2 Acc. 4 1 B 0 0 0 0 0
Real Value
14 OUTD
Acc.
8 4
0 1
2
0
1
0
8
0
4 2
0 0
1
1
8
1
4
0
2 1
1 1
8
0
4
0
2
0
1
0
8 4
0 0
2
0
1
0
8
0
4 2
0 0
1
0
8
0
4
0
2 1
0 0
8
0
4
0
2
0
1
0
V1400
B 128 + 2 + 1 = 131
131 - 127 = 4
1.011 x 2 (exp 4) = 10110. binary= 22 decimal
Implies 2 (exp 4)
C NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use DirectSOFT32 for this feature.
D
Subtract (SUB)
Subtract is a 16 bit instruction that subtracts the BCD value SUB
(Aaaa) in a V memory location from the BCD value in the lower A aaa 1
16 bits of the accumulator. The result resides in the accumulator.
Operand Data Type DL06Range
2
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map 3
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
X1 LD
2
V2000
4 7 5 11
V2000
13
0 0 0 0 2 4 7 5
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
V2010
0 8 8 3 A
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010 B
Handheld Programmer Keystrokes
$
STR
B
1
ENT C
SHFT L D C A A A ENT
SHFT
ANDST
S
RST
U
3
ISG
B
1
2
SHFT
0
V
AND
0
C
0
2
A
0
A
0
G
6
ENT
D
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
7 SP70
SP75
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NON–BCD number was encountered.
8 NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
9 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.
Direct SOFT32 V2001 V2000
11 X1 LDD
V2000
0 1 0 6 3 2 7 4
_
0 1
6
0
7
6 3
2
2
3
7
7
4
5
SUBD
13 V2006
the accumulator
14 OUTD
V2010
0 0 3 9 0 8 9 9
V2011 V2010
$
STR
B
1
ENT
C SHFT L
ANDST
S
D
3
D
U
3
B
C
D
2
A
0
A
C
0
A
A
0
ENT
A G
SHFT SHFT ENT
RST ISG 1 3 2 0 0 6
D GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
7
+ 4
Acc. 4
1
0
7
E
0
0 0
0 0
0
0
0
0
0
(SUBR)
12
SUBR
R15.0
Multiply (MUL)
Multiply is a 16 bit instruction that multiplies the BCD
1 value (Aaaa), which is either a V memory location or a MUL
A aaa
4–digit (max.) constant, by the BCD value in the lower 16
2 bits of the accumulator The result can be up to 8 digits
and resides in the accumulator.
3 Operand Data Type
....................................A
DL06 Range
aaa
4 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–9999
5 Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
6 SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON–BCD number was encountered.
7 NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
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 the
accumulator. The value in the accumulator is copied to V2010 and V2011 using the Out
9 Double instruction.
10 Direct SOFT32
X1 LD
1 0
V2000
0 0
V2000
12 MUL
V2006 Acc.
X
0 0 0 2 5 0
2
0
5
0
(V2006)
14 OUTD
V2010
0 0 0
V2011
2 5 0
V2010
0 0
$ B ENT
STR 1
C SHFT L
ANDST
D
3
C
2
A
0
A
0
A
0
ENT
M U L C A A G
D SHFT
GX
ORST
SHFT D
ISG ANDST
C A
2
B
0
A
0
ENT
6
ENT
OUT 3 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
7
In the following example, when X1 is on, the constant Kbc614e hex will be loaded into the
accumulator. When converted to BCD the number is ”12345678”. That numbers stored in
8
V1400 and V1401. After loading the constant K2 into the accumulator, we multiply it times
12345678, which is 24691356. 9
Direct SOFT32 Display
2 4 6 9 1 3 5
2
6
(Accumulator)
12
LD Load the constant K2
K2
into the accumulator.
14
V1400 V1403 V1402
8-digit number in V1400
and V1401.
SHFT L
ANDST
B
D
C
3
D
D
3
PREV SHFT B
1
C
2
SHFT G
6
B
1
E
4
SHFT E
4
ENT B
SHFT ENT
1 2 3
GX
OUT
SHFT
L
D
D
3
B
1
E
C
4
A
0
A
0
ENT
C
SHFT PREV ENT
ANDST 3 2
SHFT
GX
M
ORST
SHFT
U
D
ISG
L
ANDST
D
B
3
E
B
A
1
E
C
4
A
ENT
0
A
0
ENT
D
OUT 3 1 4 0 2
NOTE: Status flags are valid only until another instruction uses the same flag.
9
10 X1
DirectSOFT32 Display
LDR
4 0 E 0 0 0 0 0
R 7.0
12 MULR
1 0 5 Acc. 4 2 D 2 0 0 0 0
R 15.0
13
V1401 V1400
Multiply the accumulator 4 2 D 2 0 0 0 0 (Hex number)
contents by the real number
15.0
14 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2
Real Value
1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
OUTD
A
Acc. 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V1400
D NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use DirectSOFT32 for this feature.
Divide (DIV)
Divide is a 16 bit instruction that divides the BCD
value in the accumulator by a BCD value (Aaaa), DIV
1
which is either a V memory location or a 4-digit A aaa
(max.) constant. The first part of the quotient resides
in the accumulator and the remainder resides in the
2
first stack location.
3
Operand Data Type DL06 Range
....................................A
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
4
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–9999 5
SP53
Discrete Bit Flags Description
On when the value of the operand is larger than the accumulator can work with.
6
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 7
SP75 On when a BCD instruction is executed and a NON–BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
8
In the following example, when X1 is on, the value in V2000 will be loaded into the 9
accumulator using the Load instruction. The value in the accumulator will be divided by the
value in V2006 using the Divide instruction. The value in the accumulator is copied to
V2010 using the Out instruction.
10
Direct SOFT32
X1
V2000
5 0 0 0
11
LD
V2000
DIV
V2006
÷
0 0 0 0 5 0 0
4
0
9
(Accumulater)
V2006 13
Acc. 1 0 2 0 0 0 0 0 0 0 2
The value in the
accumulator is divided by
the value in V2006
First stak location contains
the remainder
14
OUT
V2010
1
V2010
0 2
A
Copy the value in the lower
16 bits of the accumulator to
V2010
Handheld Programmer Keystrokes
B
$
STR
L
B
D
1
ENT
C A A A
C
SHFT ENT
ANDST 3 2 0 0 0
SHFT D
3
I
8
V
AND
C
2
A
0
A
0
G
6
ENT D
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.
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 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 an the remainder resides in the first stack location. The
value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.
11 Direct SOFT32
X1
V1401 V1400
LDD 0 1 5 0 0 0 0 0
12 V1400
13 DIVD
V1420
Acc.
0
0
0
1
0
0
5
0
0
0
0
3
0
0
0
0
0
0
0
5
0
0
0
0
(V1421 and V1420)
0 0 0 0 0 0 0 0
A OUTD
V1500 0 0 0 3 0 0 0 0
B accumulator to V1500
and V1501
C
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
D SHFT
GX
OUT
D
3
I
SHFT
8
V
V
AND
AND
C
2
C
A
2
0
A
B
0
1
A
A
0
0
G
6
ENT
ENT
DirectSOFT32 Display
10
X1 4 1 7 0 0 0 0 0
LDR
R15.0
Acc. 3
4 1
F
2
C
0
0
0
0
0
0
0
0
0
0
(DIVR )
12
DIVR
R10.0
A
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
B
d d RLL
Increment (INC)
The Increment instruction increments a BCD value in a INC
1 specified V memory location by “1” each time the instruction A aaa
is executed.
2 Decrement (DEC)
The Decrement instruction decrements a BCD value in a
3 specified V memory location by “1” each time the instruction is
DEC
A aaa
executed.
4 Operand Data Type DL06 Range
5 ....................................A
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
6 Discrete Bit Flags Description
7 SP63
SP75
On when the result of the instruction causes the value in the accumulator to be zero.
On when a BCD instruction is executed and a NON–BCD number was encountered.
8 NOTE: Status flags are valid only until another instruction uses the same flag.
In the following increment example, when C5 is on the value in V1400 increases by one.
9 Direct SOFT32 V1400
8 9 3 5
10 C5 INC
V1400
12 $
STR
NEXT NEXT NEXT NEXT F
5
ENT
I N C B E A A
13 SHFT
8 TMR 2 1 4 0 0
ENT
In the following decrement example, when C5 is on the value in V1400 is decreased by one.
14 Direct SOFT32 V1400
A C5 DEC
V1400
8 9 3 5
$ F
NEXT NEXT NEXT NEXT ENT
STR 5
D SHFT D
3
E
4
C
2
B
1
E
4
A
0
A
0
ENT
In the following example, when X1 is on, the value in V1400 will be loaded into the
10
accumulator using the Load instruction. The binary value in the accumulator will be added to
the binary value in V1420 using the Add Binary instruction. The value in the accumulator is 11
copied to V1500 and V1501 using the Out instruction.
DirectS OF T 32 Dis play
X1
0
V1400
A 0 5
12
LD
V1400
Acc.
1
1
2
C C
C 4
9
(V1420)
14
T he binary value in the
accumulator is added to the
binary value in V1420
OU T D 1 C C 9
A
V1500
B
Handheld Programmer Keys trokes
STR X(IN) 1 E NT
C
L D V 1 4 0 0
D
S HF T E NT
S HF T A D D B V 1 4 2 0 E NT
OU T S HF T D V 1 5 0 0 E NT
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 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 DirectS OF T 32 Dis play
X1 LDD
0
V1401
0 0 0 0
V1400
A 0 1
V1400
13 ADDBD
V1420
+ 1
Acc. 1
0
0
0
0
0
0
C
C
0
A
1
1
0
1
(V1421 and V1420)
1 0 0 0 C A 1 1
A OU T D
V1500
accumulator to V1500
B and V1501
C SHFT
STR
L
ANDST
D
1
3
D
ENT
3
B
1
E
4
A
0
A
0
ENT
D SHFT
GX
A
SHFT
0
D
D
3
D
3
B
B
1
D
F
3
A
B
A
1
E
4
ENT
C
2
A
0
ENT
OUT 3 1 5 0 0
OU T 0 6 1 9
14
V1500
S HF T L D V
E NT
1 4 0 0 E NT
C
S HF T S S HF T U B B
V 1 4 2 0 E NT D
OU T S HF T D V 1 5 0 0 E NT
NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The binary value in V1420 and V1421 is
9 subtracted from the binary value in the accumulator using the Subtract Binary Double
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
10 Double instruction.
DirectS OF T 32 Dis play V1401 V1400
11 X1
LDD
V1400
0 0 0 6 0 0 F F
y
0
0
0
0
0
0
6
0
0
1
0
A
F
0
F
1
(Accumulator)
13 V1420
14 OU T D
0 0 0 5 E 6 F E
V1501 V1500
V1500
C SHFT L
ANDST
D
3
D
3
B
1
E
4
A
0
A
0
ENT
SHFT S U B B D B E C A ENT
SHFT
D GX
OUT
RST
SHFT D
3
ISG
B
1
1
F
1
5
A
3
0
A
0
ENT
1 4 2 0
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 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
accumulator is copied to V1500 using the Out instruction.
9
DirectS OF T32 Dis play V1400 10
X1 0 A 0 1
LD
V1400
MU LB
bits are s et to zero
0 0 0 0 0 A 0 1 (Accumulator) 12
¢ 0 0 2 E (V1420)
V1420
0 0 0 1 C C 2 E
14
OU T D
V1500
S HF T L
X
D
1
V
E NT
1 4 0 0 E NT
C
S HF T
OUT
M
S HF T D
U L B
V 1
V
5
1
0
4
0
2
E NT
0 E NT
D
NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator is divided by
9 the binary value in V1420 using the Divide Binary instruction. The value in the accumulator
is copied to V1500 using the Out instruction.
10 DirectS OF T32 Dis play V1400
F A 0 1
X1
11 LD
V1400
OUT 0 3 2 0
A V1500
V1500
Copy the value in the lower 16
S HF T L D V 1 4 0 0 E NT
D S HF T D I V B V 1 4 2 0 E NT
OUT S HF T D V 1 5 0 0 E NT
8
8 TMR 2 1 2 0 0 0
in the accumulator by“1” V2000
4 A 3 D
9
Decrement Binary (DECB)
The Decrement Binary instruction decrements a DECB 10
binary value in a specified V memory location by “1” A aaa
each time the instruction is executed. 11
Operand Data Type
....................................A
DL06 Range
aaa
12
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map 13
Discrete Bit Flags Description 14
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
A
In the following example when C5 is on, the value in V2000 is decreased by 1. B
Direct SOFT32
C5 DECB
4
V2000
A 3 C
Handheld Programmer Keystrokes
$
STR
SHFT C
2
F
5
ENT
C
V2000
11 In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value formed by
discrete locations C0–C3 is added to the value in the accumulator using the Add Formatted
12 instruction. The value in the lower four bits of the accumulator is copied to Y10–Y13 using
the Out Formatted instruction.
13 DirectSOFT32 Display
X3 X2 X1 X0
X6 Load the value represented ON OFF OFF OFF
LDF X0
14
by discrete locations X0–X3
K4 into the accumulator
The unused accumulator
bits are set to zero
Add the value in the 0 0 0 0 0 0 0 8 (Accumulator) C3 C2 C1 C0
ADDF C0
A K4
accumulator with the value
represented by discrete
location C0–C3
+
Acc. 0 0 0 1 0 0 0
3
1
(C0-C3) OFF OFF ON ON
B OUTF
K4
Y10
accumulator to discrete
locations Y10–Y13
C $
STR
SHFT L
G
D
6
ENT
F A E ENT
Y13 Y12 Y11 Y10
OFF OFF OFF ON
ANDST 3 5 0 4
D SHFT
GX
A
0
D
F
3
D
3
F
B
5
A
NEXT NEXT
E
NEXT NEXT A
0
E
4
ENT
SHFT ENT
OUT 5 1 0 4
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
11
loaded into the accumulator using the Load Formatted instruction. The value formed by
discrete location C0–C3 is subtracted from the value in the accumulator using the Subtract 12
Formatted instruction. The value in the lower four bits of the accumulator is copied to
Y10–Y13 using the Out Formatted instruction. 13
DirectSOFT32 Display
X3 X2 X1 X0
X6
LDF
K4
X0
Load the 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 value
represented by C0-- C3 from
the value in the accumulator y
ACC. 0
0 0
0
0
0
0
0
0
0
0
0
0
0
9
8
1
(Accumulator)
(C0-- C3)
C3 C2 C1
ON OFF OFF OFF
C0
A
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
ANDST 3 5 0 4
SHFT
GX
S
RST
F
SHFT
U
ISG
B
B
1
F
A
5
E
NEXT NEXT NEXT NEXT A
0
E
4
ENT
D
SHFT ENT
OUT 5 1 0 4
4 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . .
Y
C
0–777
0–1777
––
––
Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777 ––
5 Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
T
CT
0–377
0–177
––
––
6 Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . .
Global I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SP
GX
0-137 320-717
0-3777
––
––
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 1–16
7 Discrete Bit Flags Description
8 SP63
SP70
On when the result of the instruction causes the value in the accumulator to be zero.
On any time the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON-BCD number was encountered.
9
NOTE: Status flags are valid only until another instruction uses the same flag.
10 In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value formed by
11 discrete locations C0–C3 is multiplied by the value in the accumulator using the Multiply
Formatted instruction. The value in the lower four bits of the accumulator is copied to
12 Y10–Y13 using the Out Formatted instruction.
DirectSOFT32 Display
13 X6 LDF
K4
X0
Load the value represented
by discrete locations X0-- X3
into the accumulator
X3 X2
OFF OFF ON ON
X1 X0
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 C0
K4 represented by discrete ¢ 2 (C0-- C3) OFF OFF ON OFF
A OUTF Y10
locations C0-- C3
accumulator to discrete
K4
B
locations Y10-- Y13
C SHFT
STR
L
ANDST
D
6
3
F
5
A
0
E
4
ENT
OFF ON ON OFF
U L F A E
NOTE: Status flags are valid only until another instruction uses the same flag.
10
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value in the
11
accumulator is divided by the value formed by discrete location C0–C3 using the Divide
Formatted instruction. The value in the lower four bits of the accumulator is copied to 12
Y10–Y13 using the Out Formatted instruction.
DirectSOFT32 Display
Acc. 0 0 0 0 0 0 0
2
4
(C0-- C3)
0 0 0 0 0 0
OFF OFF ON OFF
0 0 A
Copy the lower 4 bits of the First stack location contains
OUTF Y10 the remainder
B
accumulator to discrete
K4 locations Y10-- Y13
$
STR
L
G
D
6
ENT
F A E
OFF ON OFF OFF
C
SHFT ENT
ANDST 3 5 0 4
SHFT D
3
I
8
V
AND
F
5
NEXT NEXT NEXT NEXT A
0
E
4
ENT D
GX SHFT F B A E ENT
OUT 5 1 0 4
5 SP70
SP75
On anytime the value in the accumulator is negative.
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 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
8 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 DirectS OF T 32 Dis play V1401 V1400
11 V1400
Acc. 0 0 3 9 5 0 2 6
Level 1
Level 2
Level 3
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
12 LDD
V1420
Load the value in V1420 and
V1421 into the accumulator
0
V1421
0 1 7 2
V1420
0 5 6
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
Level 7 X X X X X X X X
13 Acc. 0 0 1 7 2 0 5 6
Level 8 X X X X X X X X
Level 1
B
V1500
Level 5 X X X X X X X X
$ B ENT
STR 1 Level 6 X X X X X X X X
L D D B E A A Level 7 X X X X X X X X
SHFT ENT
C SHFT
ANDST
L
ANDST
D
3
3
D
3
3
B
1
1
E
4
4
C
0
2
A
0
0
ENT
Level 8 X X X X X X X X
A D D S
D
SHFT ENT
0 3 3 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
V1420
V1421 into the accumulator
0 0 3 9 5 0 2 6 Level 5
Level 6
X
X
X X
X X
X X
X X
X X
X X
X
X 12
Level 7 X X X X X X X X
0 0 3 9 5 0 2 6
SUBS Subtract the value in the first
level of the accumulator
stack from the value in the
Acc. 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
OUTD Copy the value in the
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
A
Sta
0 0 2 2 2 9 7 0 Level 3 X X X X X X X X
V1501 V1500 Level 4 X X X X X X X X
Handheld Programmer Keystrokes
$
STR
B
1
ENT
Level 5
Level 6
X
X
X X
X X
X X
X X
X X
X X
X
X B
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
SHFT
D
U
ISG
B
B
1
S
F
RST
A
ENT
A ENT
D
OUT 3 1 5 0 0
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 by
the BCD value in the accumulator using the Multiply Stack instruction. The value in the
8 accumulator is copied to V1500 and V1501 using the Out Double instruction.
9 DirectSOFT32 Display
X1
LD
Load the value in V1400 into 5
V1400
0 0 0 Accumulator stack
the accumulator The unused accumulator after 1st LDD
bits are set to zero
10
V1400
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 LD
V1420
Load the value in V1420 into
the accumulator The unused accumulator
0
V1420
2 0 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
bits are set to zero
MULS
accumulator with the value
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
0
X
0
X
0
X
0
X X
5 0
X
0
X
0
X
Level 3 X X X X X X X X d d RLL
A Handheld Programmer Keystrokes
V1501 V1500 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
$ B
B STR
SHFT L D
1
ENT
B E A A ENT
Level 7
Level 8
X
X
X
X
X
X
X X
X X
X
X
X
X
X
X
S
ANDST 3 1 4 0 0
C SHFT
SHFT
L
ANDST
M
D
U
3
L
B
S
1
E
ENT
4
C
2
A
0
ENT
D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
NOTE: Status flags are valid only until another instruction uses the same flag.
5
In the following example, when X1 is on, the Load instruction loads the value in V1400 into 6
the accumulator. The value in V1420 is loaded into the accumulator using the Load Double
instruction, pushing the value previously loaded in the accumulator onto the accumulator
stack. The BCD value in the accumulator is divided by the BCD value in the first level of the
7
accumulator stack using the Divide Stack instruction. The Out Double instruction copies the
value in the accumulator to V1500 and V1501. 8
DirectSOFT32 Display
X1
LD
Load the value in V1400 into
The unused accumulator
0
V1400
0 2 0
X X
Accumulator stack
after 1st LDD
X X X X X X
9
the accumulator Level 1
V1400 bits are set to zero
Acc. 0 0 0 0 0 0 2 0
Level 2
Level 3
Level 4
X X
X X
X X
X
X
X
X
X
X
X X
X X
X X
X
X
X
X
X
X
10
LDD Load the value in V1420 and
V1421 into the accumulator
0
V1421
0 5 0 0
V1420
0 0 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
V1420
12
Level 8 X X X X X X X X
Acc. 0 0 5 0 0 0 0 0
Accumulator stack
after 2nd LDD
13
Divide the value in the
DIVS Level 1 0 0 0 0 0 0 2 0
accumulator by the value in 0 0 0 2 5 0 0 0
the first level of the Acc. Level 2 X X X X X X X X
accumulator stack
Level 3 X X X X X X X X
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501 0 0 0 2 5 0 0 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
14
V1501 V1500
D
1
ENT
B E A A
Level 1
first stack location
0 0 0 0 0 0 0 0
B
SHFT ENT Level 2 X X X X X X X X
ANDST 3 1 4 0 0
SHFT L
ANDST
D
3
D
3
B
1
E
4
C
2
A
0
ENT
Level 3
Level 4
X
X
X
X
X
X
X X
X X
X
X
X
X
X
X C
D I V S Level 5 X X X X X X X X
SHFT ENT
GX
OUT
SHFT
3
D
8
3
AND
B
RST
1
F
5
A
0
A
0
ENT
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
D
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 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
9 instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
11 V1400
Acc. 0 0 3 A 5 0 C 6
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
13 Acc. 0 0 1 7 B 0 5 F
Level 7
Level 8
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
14 ADDBS
accumulator with the binary
value in the firs t level of the
accumulator s tack
Acc. 0 0 5 2 0 1 2 5
Accumulator s tack
after 2nd LDD
A OU T D
V1500
C opy the value in the
accumulator to V1500
and V1501 0 0 5 2 0 1 2 5
Level 1
Level 2
Level 3
0
X
X
0
X
X
3
X
X
A
X
X
5
X
X
0
X
X
C
X
X
6
X
X
S tandard R LL
Level 4 X X X X X X X X
$ B ENT
Level 5
Level 6
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
STR 1
Level 7 X X X X X X X X
C 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
ANDST 3 3 1 4 2 0
D SHFT
GX
A
0
D
D
3
D
3
B
B
1
S
F
RST
A
ENT
A
SHFT ENT
OUT 3 1 5 0 0
11
V1401 into the accumulator
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
Acc. 0 0 3 A 5 0 C 6
Level 7
Level 8
X X
X X
X
X
X X
X X
X
X
X
X
X
X 13
SUBBS Subtract the binary value in
the first level of the
accumulator stack from the
binary value in the
accumulator
Acc. 0 0 2 0 3 0 6 B
Accumulator stack
14
after 2nd LDD
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
0 0 2 0 3 0 6 B
Level 1
Level 2
Level 3
0
X X
X X
0 1
X
X
A 2
X X
X X
0
X
X
5
X
X
B
X
X
A
V1501 V1500
B
Level 4 X X X X X X X X
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
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
SHFT
D
U
ISG
B
B
1
B
F
1
S
A
RST
ENT
A ENT
D
OUT 3 1 5 0 0
6 NOTE: Status flags are valid only until another instruction uses the same flag.
7 In the following example, when X1 is on, the Load instruction moves the value in V1400 into
the accumulator. The value in V1420 is loaded into the accumulator using the Load
instruction, pushing the value previously loaded in the accumulator onto the stack. The
8 binary value in the accumulator stack’s first level is multiplied by the binary value in the
accumulator using the Multiply Binary Stack instruction. The Out Double instruction copies
9 the value in the accumulator to V1500 and V1501.
DirectSOFT32 Display V1400 Accumulator stack
10 X1
LD
V1400
Load the value in V1400 into
the accumulator The unused accumulator
bits are set to zero
C 3 5 0
Level 1 X
after 1st LDD
X X X X X X X
Level 2 X X X X X X X X
11 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
V1420 Level 5 X X X X X X X X
0 0 1 4
12 LD
V1420
Load the value in V1420 into
the accumulator
The unused accumulator
bits are set to zero
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
Acc. 0 0 0 0 0 0 1 4
Level 1 0
after 2nd LDD
0 0 0 C 3 5 0
Level 2 X X X X X X X X
Copy the value in the
A OUTD
V1500
accumulator to V1500
and V1501
0 0 0
V1501
F 4 2 4
V1500
0
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
Standard RLL
Instructions
B Level 6 X X X X X X X X
Handheld Programmer Keystrokes
Level 7 X X X X X X X X
$ B ENT
STR 1 Level 8 X X X X X X X X
C SHFT
SHFT
L
ANDST
L
D
D
3
B
B
1
E
E
4
A
C
0
A
A
0
ENT
ENT
ANDST 3 1 4 2 0
D SHFT
GX
M
ORST
SHFT
U
D
ISG
L
ANDST
B
B
1
S
F
RST
A
ENT
A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
5
In the following example, when X1 is on, the value in V1400 will be loaded into the 6
accumulator using the Load instruction. The value in V1420 and V1421 is loaded into the
accumulator using the Load Double instruction also, pushing the value previously loaded in
the accumulator onto the accumulator stack. The binary value in the accumulator is divided
7
by the binary value in the first level of the accumulator stack using the Divide Binary Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out 8
Double instruction.
Accumulator stack
9
DirectSOFT32 Display V1400
after 1st LDD
X1
LD
V1400
Load the value in V1400 into
the accumulator The unused accumulator
bits are set to zero
0 0 1 4
Level 1
Level 2
X
X
X X
X X
X X
X X
X X
X X
X
X
10
Acc. 0 0 0 0 0 0 1 4 Level 3 X X X X X X X X
V1421 V1420
Level 4
Level 5
X
X
X X
X X
X X
X X
X X
X X
X
X
11
0 0 0 0 C 3 5 0 Level 6 X X X X X X X X
12
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
Accumulator stack
0
X X
0 0
X X
0 0
X X
1 4
X
13
of the accumulator stack
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
14
Copy the value in the
OUTD Level 6 X X X X X X X X
A
accumulator to V1500
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
Handheld Programmer Keystrokes
$
STR
L
B
D
1
ENT
B E A A
Level 1
The remainder resides in the
first stack location
0 0 0 0 0 0 0 0
B
SHFT ENT
ANDST 3 1 4 0 0 Level 2 X X X X X X X X
SHFT L
ANDST
D
3
D
3
B
1
E
4
C
2
A
0
ENT
Level 3
Level 4
X
X
X X
X X
X X
X X
X X
X X
X
X
C
SHFT D I V B S ENT Level 5 X X X X X X X X
3 8 AND 1 RST
GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
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
D
Transcendental Functions
1 The DL06 CPU features special numerical functions to complement its real number
capability. The transcendental functions include the trigonometric sine, cosine, and tangent,
2 and also their inverses (arc sine, arc cosine, and arc tangent). The square root function is also
grouped with these other functions.
3 The transcendental math instructions operate on a real number in the accumulator (it cannot
be BCD or binary). The real number result resides in the accumulator. The square root
function operates on the full range of positive real numbers. The sine, cosine and tangent
4 functions require numbers expressed in radians. You can work with angles expressed in
degrees by first converting them to radians with the Radian (RAD) instruction, then
5 performing the trig function. All transcendental functions utilize the following flag bits.
7 SP70
SP72
On anytime the value in the accumulator is negative.
On anytime the value in the accumulator is an invalid floating point number
SP73 On anytime the value in the accumulator is negative.
8 SP75 On when a real number instruction is executed and a non-real number was encountered.
A The Arc Sine Real instruction takes the inverse sine of the real
number stored in the accumulator. The result resides in the
accumulator. Both the original number and the result are in IEEE
B 32-bit format. AS INR
C
D
10 K8
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
1
6 5
1 0
4 3
0 1
2
0
1
1
0
1
12 SUM
Acc. 0 0 0 0 0 0 0 5
14 OUT 0 0 0 5
V1500
V1500
B $
STR
B
1
ENT
L D F B A I
C SHFT
SHFT
ANDST
S SHFT
3
U
5
M
1
ENT
0 8
ENT
D GX
OUT
PREV PREV PREV B
1
F
5
A
0
A
0
ENT
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into 6
the accumulator using the Load Double instruction. The bit pattern in the accumulator is
shifted 2 bits to the left using the Shift Left instruction. The value in the accumulator is 7
copied to V2010 and V2011 using the Out Double instruction.
8
Direct SOFT32
X1 LDD 6
V2001
7 0 5
V2000
33 31 10 01
9
V2000
14
9 C 1 4 C 4 0 4
A
V2011 V2010
Handheld Programmer Keystrokes
$
STR
B
1
ENT
B
L D D C A A A
SHFT
SHFT
ANDST
S
RST
SHFT
3
H
3
7
F
5
L
2
ANDST
0
C
0
2
ENT
0
ENT
C
GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
D
9 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
K2
12 OUTD
V2010 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
14
A 1 9
V2011
C 1 4 C
V2010
4 0
B $
STR
B
1
ENT
SHFT L D D C A A A ENT
C SHFT
ANDST
S
RST
SHFT
3
H
3
7
F
5
R
ORN
2 0
C
0
2
0
ENT
GX D C A B A
D OUT
SHFT
3 2 0 1 0
ENT
X1
V1401 V1400
8
LDD 6 7 0 5 3 1 0 1
V1400
$ B
V1501 V1500
A
ENT
STR 1
SHFT L
ANDST
R
D
O
3
D
T
3
L
B
1
E
C
4
A
0
A
0
ENT
B
SHFT ENT
ORN INST# MLR ANDST 2
GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT C
D
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
5 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
6 accumulator is copied to V1500 and V1501 using the Out Double instruction.
7
8
9 Direct SOFT Display
X1
LDD 6
V1401
7 0 5 3
V1400
1 0 1
V1400
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 ROTR
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
OUTD
13 V1500
14
A 5 9 C 1 4 C 4 0
V1501 V1500
B
Handheld Programmer Keystrokes
$ B ENT
STR 1
L D D B E A A
C SHFT
SHFT
ANDST
R
ORN
O
3
INST#
T
MLR
3
R
ORN
1
C
4
2
0
ENT
0
ENT
D GX
OUT
SHFT D
3
B
1
F
5
A
0
A
0
ENT
Encode (ENCO)
The Encode instruction encodes the bit position in the
accumulator having a value of 1, and returns the 1
appropriate binary representation. If the most significant ENCO
bit is set to 1 (Bit 31), the Encode instruction would place
the value HEX 1F (decimal 31) in the accumulator. If the
2
value to be encoded is 0000 or 0001, the instruction will
place a zero in the accumulator. If the value to be encoded 3
has more than one bit position set to a “1”, the least
significant “1” will be encoded and SP53 will be set on. 4
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with. 5
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative. 6
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
7
In the following example, when X1 is on, The value in V2000 is loaded into the accumulator
using the Load instruction. The bit position set to a “1” in the accumulator is encoded to the
corresponding 5 bit binary value using the Encode instruction. The value in the lower 16 bits
8
of the accumulator is copied to V2010 using the Out instruction.
Direct SOFT32 V2000
9
1 0 0 0
X1 LD
V2000 10
Load the value in V2000 into
the lower 16 bits of the
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
accumulator
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit postion 12 is
converted
to binary 12
ENCO
D
1
ENT
C A A A
C
SHFT ENT
ANDST 3 2 0 0 0
SHFT E
4
N
TMR
C
2
O
INST#
ENT D
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
Decode (DECO)
The Decode instruction decodes a 5 bit binary value of 0–31
1 (0–1F HEX) in the accumulator by setting the appropriate bit DECO
position to a 1. If the accumulator contains the value F (HEX),
2 bit 15 will be set in the accumulator. If the value to be decoded
is greater than 31, the number is divided by 32 until the value
3 is less than 32 and then the value is decoded.
In the following example when X1 is on, the value formed by discrete locations X10–X14 is
loaded into the accumulator using the Load Formatted instruction. The five bit binary
4 pattern in the accumulator is decoded by setting the corresponding bit position to a “1” using
the Decode instruction.
5
6
7
8
Direct SOFT32
X14 X13 X12 X11 X10
X1 LDF X10 OFF ON OFF ON ON
K5
11 DECO
13 $
STR
SHFT L
B
D
1
ENT
F B A F ENT
ANDST 3 5 1 0 5
14 SHFT D
3
E
4
C
2
O
INST#
ENT
A
B
C
D
BCD Value
0 0 0 1 0 1 0 0 1 0 1 0 0 1
10
28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1
14
OU T D
V2010 The Binary (HEX)
A
0 0 0 0 6 F 7 1 value copied to
Copy the binary data in the
accumulator to V2010 and V2011 V2011 V2010
V2010
B
S tandard R LL
Ins tructions
$
STR
B
1
E NT C
L D D C A A A
S HF T E NT
ANDS T 3 3 2 0 0 0
S HF T
GX
B
1
I
D
8
N
T MR
C
E NT
A B A
D
S HF T E NT
OU T 3 2 0 1 0
4 In the following example, when X1 is on, the binary (HEX) value in V2000 and V2001 is
loaded into the accumulator using the Load Double instruction. The binary value in the
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 DirectS OF T 32 V2001 V2000
7 X1
LDD
V2000 Binary Value
0 0 0 0 6 F 7 1
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 6 5
0 1 1
4 3
1 0
2
0 0
1 0
9 2
1
4
7
1
0
7
3
5
3
6
8
2
6
8
4
1
3
4
2
6
7
1
0
3
3
5
5
1
6
7
7
8
3
8
8
4
1
9
4
2
0
9
7
1
0
4
8
5
2
4
2
2
6
2
1
1
3
1
0
6
5
5
3
3
2
7
6
1
6
3
8
8
1
9
2
4
0
9
6
2
0
4
8
1
0
2
4
5
1
2
2
5
6
1 6
2 4
8
3
2
1
6
8 4 2 1
4 7 7 3 1 8 4 7 6 3 1 5 8 4 7 6 8 4
10 4
8
3
6
4
1
8
2
0
9
1
2
5
4
5
6
7
7
2
8
8
6
4
4
3
2
2
1
6
0
8
0
4
5
2
7
6
8 4 2
4 4
11 BC D
8
equivalent 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
13 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
14 OU T D
V2010
T he BC D value
V2011
2 8 5 2
V2010
9
copied to
V2010 and V2011
$
STR
B
1
E NT
C S HF T
S HF T
L
ANDS T
B
D
C
3
D
D
3
E NT
C
2
A
0
A
0
A
0
E NT
1 2 3
D GX
OU T
S HF T D
3
C
2
A
0
B
1
A
0
E NT
Invert (INV)
The Invert instruction inverts or takes the one’s
complement of the 32 bit value in the accumulator. The
INV
1
result resides in the accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into 2
the accumulator using the Load Double instruction. The value in the accumulator is inverted
using the Invert instruction. The value in the accumulator is copied to V2010 and V2011
using the Out Double instruction.
3
4
5
Direct SOFT32
X1 LDD
0
V2001
4 0 5
V2000
00 22 55 00 6
V2000
INV
8
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
$
STR
B
1
ENT
12
13
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
SHFT I N V ENT
8 TMR AND
GX D C A B A
OUT
SHFT
3 2 0 1 0
ENT
14
A
B
C
D
4 In the following example when X1 is on, the value in V2000 and V2001 is loaded into the
accumulator. The 10’s complement is taken for the 8 digit accumulator using the Ten’s
5 Complement instruction. The value in the accumulator is copied to V2010 and V2011 using
the Out Double instruction.
6
DirectS OF T 32 V2001 V2000
7 X1 LDD
0 0 0 0 0 0 8 7
V2000
9
BC DC PL 9 9 9 9 9 9 1 3
Acc.
10
Takes a 10’s complement of
the value in the accumulator
11
OU T D
9 9 9 9 9 9 1 3
12 V2010
14 $
STR
B
1
E NT
A S HF T
L
ANDS T
D
3
D
3
C
2
A
0
A
0
A
0
E NT
B C D C P L
S HF T E NT
B GX
1
S HF T D
2 3
C
2
A
CV ANDS T
B A
E NT
OU T 3 2 0 1 0
C
D
9
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
Binary Value
2 (exp 18)
127 + 18 = 145
145 = 128 + 16 + 1
11
BTOR
12
Convert the binary 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
Sign Bit Exponent (8 bits) Mantissa (23 bits) 14
OUTD
Real Number Format
A
B
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
$
STR
B
1
ENT
C
SHFT L D D B E A A ENT
SHFT
ANDST
B
1
T
MLR
3
O
3
INST#
R
ORN
ENT
1 4 0 0
D
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
accumulator. Both the binary and the real number may use all 32
2 bits of the accumulator.
NOTE1: The decimal portion of the result will be truncated.
3 NOTE2: if the real number is negative, it becomes a signed decimal value.
4 SP63
Discrete Bit Flags Description
On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
5 SP72 On anytime the value in the accumulator is an invalid floating point number.
SP73 On when a signed addition or subtraction results in an incorrect sign bit.
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 RTOB instruction converts the real
value in the accumulator the equivalent binary number format. The value in the accumulator
8 is copied to V1500 and V1501 using the Out Double instruction. The handheld programmer
would display the binary value in V1500 and V1501 as a HEX value.
9 DirectSOFT32 Display
X1 LDD
4 8
V1401
A E 4 8
V1400
2 0 Real Number Format
V1400
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
12 RTOB
14 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
A OUTD
V1500
C $
STR
B
1
ENT
SHFT L D D B E A A ENT
D SHFT
ANDST
R
ORN
T
MLR
3
O
INST#
3
B
1
ENT
1 4 0 0
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
B 32
33
2
3
41
42
A
B
34 4 43 C
C 35
36
5
6
44
45
D
E
D 37 7 46 F
1
Direct SOFT32
LDA
memory location in the
ASCII table
L D A B E A A ENT 35 36
7
SHFT
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
HEX to ASCII (HTA) 9
The HEX to ASCII instruction converts a table of
HEX values to a specified table of ASCII values. HTA 10
HEX values are one digit and their ASCII V aaa
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
5 Direct SOFT32
X1 LD
Hexadecimal
Equivalents ASCII T ABLE
K2
7 LDA
V1500 1234
O 1500
31 32 V1401
9 HTA 37 38 V1402
V1400
$ B ENT
12 SHFT
STR
L
ANDST
D
1
3
SHFT K
JMP
E
4
ENT
SHFT L D A B F A A ENT
13 SHFT
ANDST
H
7
T
MLR
3
A
0
0
B
1
1
E
5
4
A
0
0
A
0
0
ENT
14 The table below lists valid ASCII values for HTA conversion.
Segment (SEG)
The BCD / Segment instruction converts a four digit HEX SEG
value in the accumulator to seven segment display format. 1
The result resides in the accumulator.
In the following example, when X1 is on, the value in V1400 is loaded into the lower 16 bits 2
of the accumulator using the Load instruction. The binary (HEX) value in the accumulator is
converted to seven segment format using the Segment instruction. The bit pattern in the
accumulator is copied to Y20–Y57 using the Out Formatted instruction.
3
4
DirectSOFT32 Display V1400
X1 LD
V1400
6 F 7 1 5
Load the value in V1400 nto 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
6
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
SEG 7
Convert the binary (HEX)
value in the accumulator to
seven segment display
format
8
OUTF Y20
9
K32
a
Labels
11
f b
Segment
Labels g
Y57 Y56 Y55 Y54 Y53
OFF ON ON ON ON
Y24 Y23 Y22 Y21 Y20
OFF OFF ON ON OFF
12
e c
d 13
Handheld Programmer Keystrokes 14
$ B ENT
L
ANDST
STR
D
3
1
B
1
E
4
A
0
A
0
ENT A
S E G ENT
B
SHFT SHFT
RST 4 6
GX F C A D C
SHFT ENT
OUT 5 2 0 3 2
C
D
10 Direct SOFT32
X1
X27 X26 X25
OFF OFF OFF
X12 X11 X10
ON OFF ON
LDF K16
11 X10
12 GRAY
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
14 V2010
V2010
6
$ B ENT
B SHFT
STR
L
ANDST
D
1
3
F
5
B
1
A
0
B
1
G
6
ENT
0000000010
0000000110
0000000111
0003
0004
0005
SHFT G R A Y ENT 0000000101 0006
C GX
OUT
6 ORN
SHFT V
AND
0
C
MLS
2
A
0
B
1
A
0
ENT
0000000100 0007
D 1000000001 1022
1000000000 1023
B C E F 0 D A 9 13
Result (accumulator)
14
A
B
C
D
In the following example when X1 is on, The value in the first level of the accumulator stack
will be reorganized in the order specified by the value in the accumulator.
1 Example A shows how the shuffle digits works when 0 or 9 –F is not used when specifying
the order the digits are to be shuffled. Also, there are no duplicate numbers in the specified
2 order.
Example B shows how the shuffle digits works when a 0 or 9–F is used when specifying the
3 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 9–F in the accumulator
(order specified) are set to “0”.
4 Example C shows how the shuffle digits works when duplicate numbers are used specifying
the order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed,
5 the most significant duplicate number in the order specified is used in the result.
6 Direct SOFT32
X1 LDD V2001
A
V2000 V2001
B
V2000 V2001
C
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
7
V2000
8 LDD
Positions
V2007 V2006
Acc.
V2007 V2006
Acc.
V2007 V2006
Acc.
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 SFLDGT
New bit
Positions
8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
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
V2010
B C E F 0 D A 9 0 0 0 0 E D A 9 0 0 0 0 9 A B C
$ B ENT
STR 1
A SHFT
SHFT
L
ANDST
L
D
D
3
D
D
3
C
C
2
A
A
0
A
A
0
A
G
0
ENT
ENT
ANDST 3 3 2 0 0 6
B SHFT
GX
S
SHFT
RST
SHFT
D
F
5
L
ANDST
C
D
A
3
G
B
6
T
A
MLR
ENT
ENT
OUT 3 2 0 1 0
C
D
Table Instructions
Move (MOV)
1
The Move instruction moves the values from a V
memory table to another V memory table the same
2
MOV
length. The function parameters are loaded into the first
level of the accumulator stack and the accumulator by V aaa
3
two additional instructions. Listed below are the steps
necessary to program the Move function.
• Step 1 Load the number of V memory locations to be moved into the first level of the accumulator
4
stack. This parameter is a HEX value (K40 max, 100 octal).
• Step 2 Load the starting V memory location for the locations to be moved into the accumulator.
5
This parameter is a HEX value.
• Step 3 Insert the MOVE instruction which specifies starting V memory location (Vaaa) for the 6
destination table.
Helpful Hint: — For parameters that require HEX values when referencing memory 7
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator. 8
Operand Data Type DL06 Range
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
9
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
10
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
In the following example, when X1 is on, the constant value (K6) is loaded into the
11
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 12
address 2000 (V2000), the starting location for the source table is loaded into the
accumulator. The destination table location (V2030) is specified in the Move instruction. 13
Direct SOFT32
X1 LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
X X X X V2026
14
X X X X V2027
LDA
O 2000
Convert octal 2000 to HEX
400 and load the value into
the accumulator
0
0
1
5
2
0
3 V2000
0 V2001
0
0
1
5
2
0
3 V2030
0 V2031 A
9 9 9 9 V2002 9 9 9 9 V2032
Copy the specified table
B
MOV 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
C
X X X X V2006 X X X X V2036
$ B ENT
STR 1 X X X X V2007 X X X X V2037
SHFT L
ANDST
M
D
O
3
A
V
0
C
C
2
A
A
0
D
A
0
A
A
0
ENT
D
SHFT ENT
ORST INST# AND 2 0 3 0
6 • Step 2: Load the offset for the data label area in ladder memory and the beginning of the V memory
block into the first level of the stack.
• Step 3: Load the source data label (LDLBL Kaaa) into the accumulator when copying data from
7 ladder memory to V memory. This is the source location of the value.
• Step 4: Insert the MOVMC instruction which specifies destination in V-memory (Vaaa). This is the
8 copy destination.
11
12
13
14
A
B
C
D
N
1
C
2
O
3
N
4
4 5 3 2 V2001 LD
8
K 4 5 3 2 K0
N
K
C
6
O
1
N
5 1
6 1 5 1 V2002 Load the value 0 into the
accumulator specifying the
9
offset for source and
N
K 8
C O
8
N
4 5
8 8 4 5 V2003 destination locations
LDLBL
10
X X X X V2004 K1
.
. Load the value 1 into the
11
accumulator specifying the
Data Label Area K1 as the
starting address of the data
to be copied.
12
Handheld Programmer Keystrokes
$
STR
B
1
ENT
MOVMC
V2000 13
L D K E V2000 is the destination
SHFT
SHFT
ANDST
L D
3
SHFT
SHFT K
JMP
A
4
ENT
ENT
starting address for the data
to be copied.
14
ANDST 3 JMP 0
SHFT L
ANDST
D
3
L
ANDST
B
1
L
ANDST
B
1
ENT A
M O V M C C A A A
SHFT
ORST INST# AND ORST 2 2 0 0 0
ENT
B
C
D
SETBIT
The Set Bit instruction sets a single bit to one SETBIT
1 within a range of V-memory locations. A aaa
RSTBIT
2 The Reset Bit instruction resets a single bit to zero A aaa
RSTBIT
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 1
the LDA command. Finally, we use the Set Bit (or Reset Bit) instruction and specify the octal
address of the bit (bit 34), referenced from the table. 2
Direct SOFT Display32
3
X0 Load the constant value 2
LD
K2
(Hex.) into the lower 16 bits
of the accumulator. 4
LDA
O 3000
Convert octal 3000 to HEX
and load the value into the
accumulator. This is the
5
table beginning.
$
STR
A
0
ENT
8
SHFT
L
ANDST
D
3
PREV C
2
ENT
9
SHFT L D A D A A A ENT
X
ANDST
SHFT
B
3
1
I
0
T NEXT
3
D
0
E
0
ENT
0
10
SET 8 MLR 3 4
11
12
13
14
A
B
C
D
Fill (FILL)
The Fill instruction fills a table of up to 255 V memory locations with
1 a value (Aaaa), which is either a V memory location or a 4-digit
F ILL
A aaa
constant. The function parameters are loaded into the first level of the
2 accumulator stack and the accumulator by two additional instructions.
Listed below are the steps necessary to program the Fill function.
3 Step 1:— Load the number of V memory locations to be filled into the first level of the
accumulator stack. This parameter must be a HEX value, 0–FF.
4 Step 2:— Load the starting V memory location for the table into the accumulator. This
parameter must be a HEX value.
5 Step 3:— Insert the Fill instructions which specifies the value to fill the table with. 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
6 value into the accumulator.
Operand Data Type DL06 Range
7 ....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
8 Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
0–FF
9 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 is
10 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
into the accumulator using the Load Address instruction. The value to fill the table with
11 (V1400) is specified in the Fill instruction.
DirectS OF T 32 Dis play
12 X1
LD
Load the cons tant value 4
(HE X) into the lower 16 bits S
K4 of the accumulator S
13 X X X X V1576
S
C $
STR
L
B
D
1
ENT
E
SHFT PREV ENT
ANDST 3 4
D SHFT L
ANDST
F
D
I
3
A
L
0
L
B
1
G
B
6
A
E
0
A
A
0
A
ENT
SHFT ENT
5 8 ANDST ANDST 1 4 0 0
Find (FIND)
The Find instruction is used to search for a specified value in a
V-memory table of up to 255 locations. The function F IND
1
parameters are loaded into the first and second levels of the A aaa
accumulator stack and the accumulator by three additional
instructions. Listed below are the steps necessary to program
2
the Find function.
Step 1: Load the length of the table (number of V-memory locations) into the second level of
3
the accumulator stack. This parameter must be a HEX value, 0–FF.
Step 2: Load the starting V-memory location for the table into the first level of the
4
accumulator stack. This parameter must be a HEX value.
Step 3: Load the offset from the starting location to begin the search. This parameter must be
5
a HEX value.
Step 4: Insert the Find instruction which specifies the first value to be found in the table. 6
Results:— The offset from the starting address to the first V-memory location which contains
the search value (in HEX) is returned to the accumulator. SP53 will be set on if an address 7
outside the table is specified in the offset or the value is not found. If the value is not found 0
will be returned in the accumulator. 8
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.
9
Operand Data Type DL06 Range 10
....................................A aaa
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
0–FFFF
11
Discrete Bit Flags Description 12
SP53 On if there is no value in the table that is equal to the search value.
NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The pointer
13
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
3 LDA
O 1400
8
1
9
0
8
1
9 V1404
0 V1405
4
5
V1404 contains the location
where the match was found.
X X X X V1406 The value 8989 was the 4th
C onvert octal 1400 to HE X
4 300 and load the value into
the accumulator.
X X
S
X X V1407
location after the s tart of the
s pecified table.
5 LD
K2 Handheld Programmer Keystrokes
$ B
Load the cons tant value ENT
SHFT L
ANDST
D
1
3
PREV G
6
ENT
L D A B E A
7 F IND
K8989
SHFT
SHFT
ANDST
L D
3
PREV
0
C ENT
1 4 0
13 Step 1: Load the length of the table (up to 255 locations) into the first level of the
accumulator stack. This parameter must be a HEX value, 0–FF.
Step 2: Load the starting V-memory location for the table into the accumulator. This
14 parameter must be a HEX value.
Step 3: Insert the FDGT instructions which specifies the greater than search value.
A 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
B the accumulator. SP53 will be set on if the value is not found and 0 will be
returned in the accumulator.
C 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.
D Note: This instruction does not have an offset, such as the one required for the FIND instruction.
In the following example, when X1 is on, the constant value (K6) is loaded into the 5
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the table and is loaded into the accumulator.
6
The greater than search value is specified in the Find Greater Than instruction. If a value is
found greater than the search value, the offset (from the starting location of the table) where 7
the value is located will reside in the accumulator. If there is no value in the table that is
greater than the search value, a zero is stored in the accumulator and SP53 will come ON. 8
9
DirectS OF T 32 Dis play
X1
10
LD
K6
LDA
Begin here 0
0
1
5
2
0
3 V1400
0 V1401
0
1
Table length
Accumulator
12
O 1400 9 9 9 9 V1402 2 0 0 0 0 0 0 0 2
C onvert octal 1400 to HE X
300 and load the value into
3
8
0
9
7
8
4 V1403
9 V1404
3
4
V1402 contains the location
where the firs t value greater
13
the accumulator. than the s earch value was
5
F DG T
1
X
0
X
1
X
0 V1405
X V1406
found. 9999 was the 2nd
location after the s tart of the
s pecified table. 14
K8989 X X X X V1407
$
STR
B
1
ENT
B
SHFT L
ANDST
D
3
PREV G
6
ENT
C
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT F
5
D
3
G
6
T
MLR
NEXT
I
8
J
9
I
8
J
9
ENT
D
6 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
FF.
7 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.) This
8 parameter must be a HEX value.
Step 3: Insert the TTD instruction which specifies destination V memory location
9 (Vaaa).
Helpful Hint: — For parameters that require HEX values when referencing memory
10 locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
11 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.
12 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
13 set in one scan and will not affect the instruction operation.
B SP56
Discrete Bit Flags Description
On when the table pointer equals the table length.
C NOTE: Status flags (SPs) are only valid until: — another instruction that uses the same flag is executed, or
— the end of the scan The pointer for this instruction starts at 0 and resets when the table length is
D reached. At first glance it may appear that the pointer should reset to 0. However, it resets to 1, not 0.
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. Remember, V1400 is used as the pointer location, and is not actually part of the
table data source. The destination location (V1500) is specified in the Table to Destination
2
instruction. The table pointer (V1400 in this case) will be increased by “1” after each
execution of the TTD instruction. 3
DirectSOFT32
X1 LD
K6
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
4
LDA
0 1400
Convert octal 1400 to HEX
300 and load the value into
the accumulator. This is the
5
table pointer location
TTD
Copy the specified value from
the table to the specified
destination (V1500)
6
V1500
7
Handheld Programmer Keystrokes
$
STR
L
B
D
1
ENT
G
8
SHFT PREV ENT
ANDST 3 6
SHFT L
ANDST
D
3
A
0
B
1
E
4
A
0
A
0
ENT 9
SHFT T T D B F A A ENT
10
MLR MLR 3 1 5 0 0
Des tination
0 V1400
11
V1403 3 0 7 4 2
pointer is equal to zero, and again when the
pointer is equal to six. Why? Because the
V1404
V1405
8
1
9
0
8
1
9
0
3
4
X X X X V1500
12
pointer is only equal to zero before the very V1406 2 0 4 6 5
Also, our example uses a normal input contact DirectSOFT32 (optional latch example using SP56)
14
(X1) to control the execution. Since the CPU X1 C0
PD
scan is extremely fast, and the pointer
increments automatically, the table would
C1
LD
K6
A
cycle through the locations very quickly. If this
is a problem, you have an option of using
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
B
SP56 in conjunction with a one-shot (PD) C0 C1
and a latch (C1 for example) to allow the table
to cycle through all locations one time and SP56
SET
C1
RST
C
then stop. The logic shown here is not
required, it’s just an optional method. Since Special Relays are
reset at the end of the scan,
D
this latch must follow the TTD
instruction in the program
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
Table Table Pointer Table Table Pointer (Automatically Incremented)
V1401 0 5 0 0 0 6 0 0 0 0 V1400 V1401 0 5 0 0 0 6 0 0 0 1 V1400
V1402 9 9 9 9 1 V1402 9 9 9 9 1
Destination Destination
4 V1403 3 0 7 4 2 V1403 3 0 7 4 2
X X X X V1500 0 5 0 0 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
SP56 SP56
V1406 2 0 4 6 5 V1406 2 0 4 6 5
5 V1407 X X X
S
X
SP56 = OFF
V1407 X X X
S
X
SP56 = OFF
S S
7 V1401
V1402
0
9
5
9
0
9
0
9
0 6
1
0 0 0 1 V1400 V1401
V1402
0
9
5
9
0
9
0
9
0 6
1
0 0 0 2 V1400
Destination Destination
V1403 3 0 7 4 2 V1403 3 0 7 4 2
8 V1404
V1405
8
1
9
0
8
1
9
0
3
4
0 5 0 0 V1500
V1404
V1405
8
1
9
0
8
1
9
0
3
4
9 9 9 9 V1500
2 0 4 6 5 SP56 2 0 4 6 5 SP56
V1406 V1406
9 V1407 X X X
S
X
SP56 = OFF
V1407 X X X
S
X
SP56 = OFF
S S
10 S
S
S
13
V1404 V1404
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 = ON
X X X X X X X X
14
V1407 V1407
until end of scan
S S or next instruction
S S that uses SP56
B V1402
V1403
9
3
9
0
9
7
9
4
1
2
Destination
V1402
V1403
9
3
9
0
9
7
9
4
1
2
Destination
2 0 4 6 V1500 0 5 0 0 V1500
V1404 8 9 8 9 3 V1404 8 9 8 9 3
C V1405
V1406
1
2
0
0
1
4
0
6
4
5 SP56
V1405
V1406
1
2
0
0
1
4
0
6
4
5 SP56
V1407 X X X X SP56 = OFF V1407 X X X X SP56 = OFF
D S
S
S
S
5–152
5–152 DL06 Micro PLC User Manual, 2nd Ed., 3/04
Chapter 5: Standard RLL Instructions - Table Instructions
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
1 placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the
2 accumulator. Remember, V1400 is used as the pointer location, and is not actually part of the
table data source. The destination location (V1500) is specified in the Remove From Bottom.
The table pointer (V1400 in this case) will be decremented by “1” after each execution of the
3 RFB instruction.
DirectSOFT32
4 X1 LD
K6
LDA
6 0 1400
7
table pointer location
RFB
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
14 S
S
The following diagram shows the scan-by-scan results of the execution for our example
program. Notice how the pointer automatically decrements from 6 – 0. Also, notice how
SP56 is only on until the end of the scan. 1
Example of Execution 2
Scan N Before RFB Execution After RFB Execution
V1401 0
Table
5 0 0 1
Table Pointer
0 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
V1403
V1404
3
8
0
9
7
8
4
9
3
4
Destination
X X X X V1500
V1403
V1404
3
8
0
9
7
8
4
9
3
4
Destination
2 0 4 6 V1500
4
V1405 1 0 1 0 5 V1405 1 0 1 0 5
V1406
V1407
2
X
0
X X
4 6
X
6
SP56
SP56 = OFF
V1406
V1407
2
X
0
X
4
X
6
X
6
SP56
SP56 = OFF 5
S S
Scan N+1
S
S
S
S
10
S
V1401
V1402
0
9
5
9
0
9
0
9
1
2
0 0 0
Destination
2 V1400 V1401
V1402
0
9
5
9
0
9
0
9
1
2
0 0 0
Destination
1 V1400
12
V1403 3 0 7 4 3 V1403 3 0 7 4 3
V1404
V1405
8
1
9
0
8
1
9
0
4
5
3 0 7 4 V1500
V1404
V1405
8
1
9
0
8
1
9
0
4
5
9 9 9 9 V1500
13
V1406 2 0 4 6 6 SP56 V1406 2 0 4 6 6 SP56
V1407 X X X
S
X SP56 = OFF
V1407 X X X
S
X SP56 = OFF
14
S S
Destination
1 V1400 V1401
V1402
V1403
0
9
3
5
9
0
0
9
7
0
9
4
1
2
3
0 0 0
Destination
0 V1400
B
9 9 9 9 V1500 0 5 0 0 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
C
SP56 = OFF SP56 = ON
D
V1407 X X X X V1407 X X X X
until end of scan
S S or next instruction
S S that uses SP56
NOTE: Status flags (SPs) are only valid until: — another instruction that uses the same flag is executed, or
C — the end of the scan The pointer for this instruction starts at 0 and resets to 1 automatically when
the table length is reached.
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
placed in the first stack location after the Load Address instruction is executed. The octal 1
address 1400 (V1400), which is the starting location for the destination table and table
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.
DirectS OF T 32 3
X1 LD
K6
LDA
5
0 1400
STT 7
V1500
$
STR
B
1
ENT
9
SHFT L
ANDST
L
D
D
3
A
PREV G
B
6
ENT
E A A
10
SHFT ENT
ANDST 3 0 1 4 0 0
SHFT S
RST
SHFT
T
MLR
T
MLR
B
1
F
5
A
0
A
0
ENT 11
It is important to understand how the table locations
are numbered. If you examine the example table, V1401 X
Table
X X X 0 6
Table Pointer
0 0 0 0 V1400
12
you’ll notice that the first data storage location, V1402 X X X X 1
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 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
2 in V1500 (data source) prior to the execution of the STT instruction. This is not required,
but it makes it easier to see how the data source is copied into the table.
4 V1401
V1402
X
X
X
X
X
X
X
X
0 6
1
0 0 0
Source
0 V1400 V1401
V1402
0
X
5
X
0
X
0
X
0 6
1
0 0 0
Source
1 V1400
V1403 X X X X 2 V1403 X X X X 2
0 5 0 0 V1500 0 5 0 0
5 X X X X 3 X X X X V1500
V1404 V1404 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
6 V1407 X X X
S
S
X V1407 X X X
S
S
X
8
V1401 0 5 0 0
V1402 X X X X 1 V1402 9 9 9 9 1
Source Source
V1403 X X X X 2 V1403 X X X X 2
9 9 9 9 V1500 9 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
4
5 SP56
SP56 = OFF
V1405
V1406
X
X
X
X
X
X
X
X
4
5 SP56
SP56 = OFF
V1407 X X X X V1407 X X X X
10 S
S
S
S
11 S
S
Scan N+5
12
Before STT Execution After STT Execution
Table Table Pointer Table Table Pointer (Automatically Incremented)
V1401 0 5 0 0 0 6 0 0 0 5 V1400 V1401 0 5 0 0 0 6 0 0 0 6 V1400
13 V1402
V1403
V1404
9
3
8
9
0
9
9
7
8
9
4
9
1
2
3
2
Source
0 4 6 V1500
V1402
V1403
V1404
9
3
8
9
0
9
9
7
8
9
4
9
1
2
3
2
Source
0 4 6 V1500
14
V1405 1 0 1 0 4 V1405 1 0 1 0 4
V1406 X X X X 5 SP56 V1406 2 0 4 6 5 SP56
X X X X SP56 = OFF X X X X SP56 = ON
V1407 V1407 until end of scan
S S or next instruction
A S S
that uses SP56
B V1401 0
Table
5 0 0 0 6
Table Pointer
0 0 0 6 V1400 V1401 1
Table
2 3 4 0 6
Table Pointer (Resets to 1, not 0)
0 0 0 1 V1400
V1402 9 9 9 9 1 V1402 9 9 9 9 1
C V1403
V1404
3
8
0
9
7
8
4
9
2
3
1
Source
2 3 4 V1500
V1403
V1404
3
8
0
9
7
8
4
9
2
3
1
Source
2 3 4 V1500
V1405 1 0 1 0 4 V1405 1 0 1 0 4
D V1406
V1407
2
X
0
X X
4 6
X
5 SP56
SP56 = OFF
V1406
V1407
2
X
0
X
4
X
6
X
5 SP56
SP56 = OFF
S S
S S
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
A
SP56
Discrete Bit Flags Description
On when the table counter equals 0.
B
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed, or the
C
end of the scan The pointer for this instruction can be set to start anywhere in the table. It is not set
automatically. You have to load a value into the pointer somewhere in your program. 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. The destination location (V1500) is specified in the Remove from Table
instruction. The table counter will be decreased by “1” after the instruction is executed.
3 DirectSOFT32 Display
4 K6 of the accumulator
5 O 1400
300 and load the value into
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
L D G
9 SHFT
SHFT
ANDST
L D
3
A
PREV
B
6
E
ENT
A A ENT
ANDST 3 0 1 4 0 0
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
A S
DirectSOFT32 Display (optional one-shot method)
X1 C0
Also, our example uses a normal input contact (X1) PD
automatically, the data would be removed from the Load the constant value 6
The following diagram shows the scan-by-scan results of the execution for our example
program. In our example we’re showing 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 1
automatically decrements from 4–0 as the instruction is executed. Notice how the last two
table positions, 5 and 6, are not moved up through the table. Also, notice how SP56, which
comes on when the table counter is zero, is only on until the end of the scan.
2
3
Scan N
Before RFT Execution
Table
Table Counter
(Automatically d ecremented)
4
Table Counter V1401 0 5 0 0 1 0 0 0 4 V1400 V1401 9 9 9 9 1 0 0 0 0 3 V1400
indicates that
these 4
positions will
be
V1402
V1403
9
3
9
0
9
7
9
4
2
3
Destination
X X X X V1500
V1402
V1403
4
8
0
9
7
8
9
9
2
3
5
0
0
0
Destination
5 0 0 V1500
5
V1404 8 9 8 9 4 Start here V1404 8 9 8 9 4
used
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 = OFF
6
V1407 X X X X V1407 X X X X
7
Scan N+1 Before RFT Execution After RFT Execution
V1401 9
Table
9 9 9 1
Table Counter
0 0 0 3 V1400 V1401 4
Table
0 7 9 1 9
9
Table Counter
(Automatically decremented)
0 0 0 2 V1400
8
V1402 4 0 7 9 2 V1402 8 9 8 9 2 9
V1403
V1404
8
8
9
9
8
8
9
9
3
4
Destination
0 5 0 0 V1500
Start here V1403
V1404
8
8
9
9
8
8
9
9
3
4
9
9
Destination
9 9 9 V1500 9
V1405 1 0 1 0 5 V1405 1 0 1 0 5
V1406
V1407
2
X
0
X
4
X
6
X
6 SP56
SP56 = OFF
V1406
V1407
2
X
0
X
4
X
6
X
6 SP56
SP56 = OFF
10
Scan N+2 Before RFT Execution After RFT Execution
11
Table Counter
V1401
V1402
4
8
Table
0
9
7
8
9
9
1
2
Table Counter
0 0 0 2 V1400
Start here
V1401
V1402
8
8
Table
9
9
8
8
9
9
1
2
4
0
7
(Automatically decremented)
0 0 0 1 V1400 12
Destination 9
Destination
13
V1403 8 9 8 9 3 V1403 8 9 8 9 3
9 9 9 9 V1500 4 0 7 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
V1406 2 0 4 6 6 SP56 V1406 2 0 4 6 6 SP56
V1407 X X X X SP56 = OFF
V1407 X X X X SP56 = OFF
14
Scan N+3 Before RFT Execution
Table Counter
After RFT Execution
Table Counter
(Automatically decremented)
A
Table Table
V1401
V1402
V1403
8
8
8
9 8 9
9
9
8
8
9
9
1
2
3
0 0 0
Destinatio
1 V1400 Start here V1401
V1402
V1403
8
8
8
9 8
9
9
8
8
9
9
9
1
2
3
8
9
8
9
0 0 0
Destination
0 V1400
B
4 0 7 9 V1500 8 9 8 9 V1500
C
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405 1 0 1 0 5 V1405 1 0 1 0 5
V1406 2 0 4 6 6 SP56 V1406 2 0 4 6 6 SP56
X X X X SP56 = OFF X X X X SP56 = ON
V1407 V1407
until end of scan
or next instruction
that uses SP56 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
placed in the first stack location after the Load Address instruction is executed. The octal 1
address 1400 (V1400), which is the starting location for the destination table and table
counter, is loaded into the accumulator. The source location (V1500) is specified in the Add
to Top instruction. The table counter will be increased by “1” after the instruction is
2
executed.
DirectSOFT32 Display 3
X1 LD
K6
LDA
O 1400
5
Convert octal 1400 to HEX
300 and load the value into
the accumulator
ATT
6
V1500
$ B ENT
STR 1
9
ANDST 3 6
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
10
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
determines the number of additions that can be
made before the instruction will stop executing. So,
it is helpful to understand how the system uses this
V1401
V1402
0
9
5
9
0
9
0
9
1
2
0 0 0
Data Source
2 V1400
11
V1403 3 0 7 4 3
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 only
be 4 additions of data before the execution was
V1406
V1407
2
X
0
X X
4 6
X
6
13
stopped. This can easily be calculated by:
Table length – table counter = number of executions
( e .g .: 6 - 2 = 4 ) 14
DirectSOFT32 Display (optional one-shot method)
Also, our example uses a normal input contact (X1)
to control the execution. Since the CPU scan is X1 C0
PD A
extremely fast, and the table counter increments C0
B
LD
automatically, the data would be moved into the K6
table very quickly. If this is a problem for your Load the constant value 6
(HEX) into the lower 16 bits
application, you have an option of using a one-shot
(PD) to add one value each time the input contact
of the accumulator
LDA
C
transitions from low to high. O 1400
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 – 6
1 as the instruction is executed. Notice how SP56 comes on when the table counter is 6, which
is equal to the table length. Plus, although our example does not show it, we are assuming
2 that there is another part of the program that changes the value in V1500 (data source) prior
to the execution of the ATT instruction.
3 Example of Execution
Scan N Before ATT Execution After ATT Execution
4 V1401 0
Table
5 0 0 1
Table counter
0 0 0 2 V1400 V1401 1
Table
2 3 4 1 1
Table counter
(Automatically Incremented)
0 0 0 3 V1400
2
V1402 9 9 9 9 2 V1402 0 5 0 0 2 3
5 V1403
V1404
3
8
0
9
7
8
4
9
3
4
Data Source
1 2 3 4 V1500
V1403
V1404
9
3
9
0
9
7
9
4
3
4
4
1
Data Source
2 3 4 V1500
V1405 1 0 1 0 5 V1405 8 9 8 9 5
6 V1406
V1407
2
X
0
X X
4 6
X
6
SP56
SP56 = OFF
V1406
V1407
1
X
0
X
1
X
0
X
6
SP56
SP56 = OFF
Discard Bucket
7 2046
8
Table counter
Table Table counter Table (Automatically Incremented)
V1401 1 2 3 4 1 0 0 0 3 V1400 V1401 5 6 7 8 1 5 0 0 0 4 V1400
6
V1402 0 5 0 0 2 V1402 1 2 3 4 2 7
10 V1406
V1407
1
X
0
X
1
X
0
X
6 SP56
SP56 = OFF
V1406
V1407
8
X
9
X
8
X
9
X
6
SP56
SP56 = OFF
Discard Bucket
11 1010
Scan N+2 Before ATT Execution After ATT Execution Table counter
12 V1401 5
Table
6 7 8 1
Table counter
0 0 0 4 V1400 V1401
Table
4 3 4 3 1 4
3
4
(Automatically Incremented)
0 0 0 5 V1400
V1402 1 2 3 4 2 V1402 5 6 7 8 2
3 Data Source
13
Data Source
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
V1407
8
X
9
X
8
X
9
X
6 SP56
SP56 = OFF
V1406
V1407
3
X
0
X
7
X
4
X
6 SP56
SP56 = OFF
Discard Bucket
8989
A Scan N+3 Before ATT Execution After ATT Execution Table counter
B V1401
V1402
4
5
Table
3 4
6 7
3
8
1
2
Table counter
0 0 0 5 V1400 V1401
V1402
7
4
Table
7
3
7
4
7
3
1
2
7
7
7
(Automatically Incremented)
0 0 0 6 V1400
Data Source 7
Data Source
C V1403
V1404
V1405
1
0
9
2
5
9
3
0
9
4
0
9
3
4
5
7 7 7 7 V1500
V1403
V1404
V1405
5
1
0
6
2
5
7
3
0
8
4
0
3
4
5
7 7 7 7 V1500
D V1406
V1407
3
X
0
X
7
X
4
X
6 SP56
SP56 = OFF
V1406
V1407
9
X
9
X
9
X
9
X
6
Discard Bucket
SP56
SP56 = ON
until end of scan
or next instruction
3074 that uses SP56
11 DirectSOFT 32
13 LDA
0 3000
Convert octal 3000 to HEX
and load the value into the
accumulator. This is the
table beginning.
14 TSHFR
Do a table shift right by 12
bits, which is 14 octal.
0 14
A
Handheld Programmer Keystrokes
B $
STR
A
0
ENT
L D F
C SHFT
ANDST
L D
3
A
PREV
D
5
A
ENT
A A
SHFT ENT
ANDST 3 0 3 0 0 0
D SHFT T
MLR
SHFT
S
RST
H
7
F
5
R
ORN
NEXT B
1
E
4
ENT
DirectSOFT 32
2 SHFT L
ANDST
D
3
PREV C
2
ENT
3
0
PREV G
3
6
G
0
6
G
0
6
G
0
6
ENT
0 3000 accumulator. This is the
table beginning.
V M O V D B A A
4 AND
SHFT
ORST INST# AND 3 1 0 0
ENT
LD
K6666
Load the constant value
6666 (Hex.) into the lower
16 bits of the accumulator.
ORMOV command, we specify the table destination, Load the constant value 2
10 V3100. (Hex) into the lower 16 bits
of the accumulator.
LDA
11 Handheld Programmer Keystrokes
$
STR
A
0
ENT
0 3000
L
ANDST
D
3
3
A
0
D
2
3
A
0
A
0
A
0
ENT
accumulator. This is the
table beginning.
LD
ORMOV
0 3100
The example to the right shows a table of two words
A at V3000 and logically XORs it with K3333. The Copy the table to V3100,
ORing its contents with the
copy of the table at V3100 shows the result of the accumulator as it is written.
B XOR operation for each word.
The ladder program example for the XORMOV is V 3000 V 3100
C similar to the one above for the ORMOV. Just use
the XORMOV instruction. On the handheld 1 1 1 1 X OR MOV
K 3333
2 2 2 2
programmer, you must use the SHFT key and spell
D “XORMOV” explicitly.
1 1 1 1 2 2 2 2
Swap (SWAP)
S WAP
The Swap instruction exchanges the
1 data in two tables of equal length.
A aaa
Step 1: Load the length of the tables (number of V memory locations) into the first level of
2 the accumulator stack. This parameter must be a HEX value, 0 to FF. Remember that
the tables must be of equal length.
3 Step 2: Load the starting V memory location for the first table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert an octal
4 address to hex.
Step 3: Insert the Swap instruction. This specifies the starting address of the second table.
5 This parameter must be a HEX value. You can use the LDA instruction to convert an
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 The example to the right shows a table of two words at V3000. We will swap its contents
Operand Data Type DL06 Range
8 aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
9 with another table of two words at 3100 by
V 3000 V 3100
using the Swap instruction. The required
10 ladder program is given below. 1 2 3 4 S WAP A B C D
A LD
K2
(Hex.) into the lower 16 bits
of the accumulator.
Handheld Programmer Keystrokes
$ P D A ENT
SHFT
B LDA
0 3000
Convert octal 3000 to HEX
and load the value into the
accumulator. This is the
table beginning.
SHFT
STR
L
ANDST
D
CV
3
3
PREV C
0
2
ENT
SHFT L D A D A A A ENT
C
ANDST 3 0 3 0 0 0
C0 LDD
9 4 0
Constant (K)
1 0 3 0 1
In this example, the Date
11
K94010301
V2000
Acc.
9 4 0 1 0 3 0 1
13
Copy the value in
the accumulator to
V2000 and V2001
9 4 0
V2001
1 0 3
V2000
0 1
14
Format
DATE
V2000
9
V2001
4 0 1 0
V2000
3 0 1
A
Set the date in the CPU
using the value in V2000
and 2001
Handheld Programmer Keystrokes
Year Month Day Day of Week
B
$ NEXT NEXT NEXT NEXT A ENT
C
STR 0
GX
OUT
0
SHFT
3
D
0
3
1
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
1 clock) in the CPU. The instruction requires two consecutive T IME
V memory locations (Vaaa) which are used to set the time. If V aaa
2 the values in the specified locations are not valid, the time
will not be set. The current time can be read from memory
3 locations V7747 and V7766–V7770.
11 C0 LDD
K7300
0 0 0 7 3 0 0 0 The TIME instruction uses the
value set in V2000 and V2001 to
set the time in the appropriate V
Acc. 0 0 0 7 3 0 0 0
OUTD Acc. 0 0 0 7 3 0 0 0
13 V2000
0 0 0 7 3 0 0 0
14 V2001 V2000
V2001
Format
V2000
TIME
A V2000
0 0 0 7 3 0 0 0
STR 0
C SHFT
A
L
ANDST
D
D
A
3
D
B
3
ENT
PREV H
7
D
3
A
0
A
0
A
0
ENT
0 3 0 1
D GX
OUT
SHFT
T
D
3
I
C
M
2
A
E
0
A
0
A
C
0
A
ENT
A A
SHFT SHFT ENT
MLR 8 ORST 4 2 0 0 0
SHFT N O P ENT
3
NOP TMR INST# CV
4
End (END) 5
The End instruction marks the termination point of the normal END
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
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 7
conditional; therefore, no input contact is allowed.
Direct SOFT32 Handheld Programmer Keystrokes
8
END
SHFT E
4
N
TMR
D
3
ENT
9
Stop (STOP)
10
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 12
operation and switch to the program mode.
13
DirectSOFT32 Handheld Programmer Keystrokes
C0 $
STR
SHFT C
2
A
0
ENT 14
STOP
SHFT S
RST
SHFT T
MLR
O
INST#
P
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
R S T W T
SHFT ENT
ORN RST MLR ANDN MLR
10 RSTWT
11
12
13
14
A
B
C
D
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
aaa
1-FFFF
6
7
In the following example, when C7 is on, all the program logic between the GOTO and the 8
corresponding LBL instruction (designated with the same constant Kaaa value) will be
skipped. The instructions being skipped will not be executed by the CPU. 9
10
DirectS OF T32 Handheld Programmer Keys trokes 11
$ C H
C7 S HF T E NT
K5
GOTO
S TR
S HF T G O T
2
O
7
F
E NT
12
6 INS T# MLR INS T# 5
$
S TR
B
1
E NT 13
X1 C2 GX C C
S HF T E NT
OUT OUT 2 2
14
S HF T
L
ANDS T
B
1
L
ANDS T
F
5
E NT
A
LBL K5 $
S TR
F
5
E NT B
GX C E NT
X5 Y2
OUT 2
C
OUT
D
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 larger the Watch Dog Timer setting. For more information on the Watch Dog
Timer, refer to the RSTWT instruction.
2
Direct SOFT32
X1 K3
1 2 3 3
FOR
4
RSTWT
5
X20 Y5
OUT
6
7
NEXT
8
Handheld Programmer Keystrokes
9
$ B ENT
STR
SHFT F
5
O
INST#
1
R
ORN
D
3
ENT
10
SHFT R
ORN
S
RST
T
MLR
W
ANDN
T
MLR
ENT
11
$ SHFT I C A ENT
STR 8 2 0
GX
OUT
F
5
ENT
12
SHFT N
TMR
E
4
X
SET
T
MLR
ENT
13
14
A
B
C
D
A
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 1
Y0–Y17 will be reset to off and then the CPU will return to the main body of the program.
Direct SOFT32 Display X1 K3
GTS
2
C0
LD
K10 3
END
4
SBR K3
5
X20 Y5
OUTI 6
X21 Y10
X35
OUTI
7
RT C
X35 Y0 Y17
8
RSTI
RT
9
Handheld Programmer Keystrokes 10
$ B ENT
STR 1
SHFT G
6
T
MLR
S
RST
D
3
ENT 11
SHFT E
4
N
TMR
D
3
ENT 12
SHFT S SHFT B R D ENT
$
STR
SHFT
RST
I
8
1
C
ORN
2
A
0
3
ENT
13
GX
$
OUT
SHFT
SHFT
I
I
8
F
C
5
ENT
B ENT
14
STR 8 2 1
GX
$
OUT
SHFT I
I
8
B
D
1
A
F
0
ENT
A
SHFT ENT
STR 8 3 5
SHFT R
ORN
T
MLR
C
2
ENT B
SP SHFT I D F ENT
STRN 8 3 5
S
RST
SHFT I
8
A
0
B
1
H
7
ENT C
SHFT R T ENT
ORN MLR
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. The CPU
1 will return to the main body of the program after the RT instruction is executed.
2 Direct SOFT32
X1 K3
3 GTS
4
5 END
6 SBR K3
7
X20 Y5
8 OUT
9 X21 Y10
OUT
10
11 RT
$ B ENT
STR 1
13 SHFT G
6
T
MLR
S
RST
D
3
ENT
14
SHFT E N D ENT
A SHFT S
RST
4 TMR
SHFT B
3
1
R
ORN
D
3
ENT
B $
GX
STR
SHFT I
F
8
C
2
A
0
ENT
ENT
OUT 5
C $
STR
SHFT I
8
C
2
B
1
ENT
GX B A
D OUT
SHFT R T
1
ENT
0
ENT
ORN MLR
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
aaa
1-7
4
Master Line Reset (MLR) 5
The Master Line Reset instruction marks the end of control
for the corresponding MLS instruction. The MLR reference
is one less than the corresponding MLS.
K aaa
MLR
6
Operand Data Type DL06 Range
7
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
aaa
0-7
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.
The following example shows how the MLS and MLR instructions operate by creating a sub
10
power rail for control logic.
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.
DirectSOFT32
3 X0 K1
A
Handheld Programmer Keystrokes
$ A ENT
MLS STR 0
4 X1 C0
Y
MLS
B
1
ENT
$ B
5 X2
OUT
C1 GX
STR 1
SHFT C
ENT
A ENT
OUT 2 0
6 OUT
$
STR
C
2
ENT
X3 Y0
GX C B
7 OUT
$
OUT
D
SHFT
ENT
2 1
ENT
X10 K2 STR 3
8 MLS
C
GX
OUT
A
0
ENT
$ B A
9 X5 Y1
OUT Y
STR
C
1 0
ENT
ENT
MLS 2
10 X4 Y2
OUT
$
STR
F
5
ENT
GX B
11 K1
D $
OUT
E
1
ENT
MLR ENT
STR 4
12 X5 C2
GX
OUT
C
2
ENT
OUT
13 X6 Y3
T
$
MLR
B
F
1
ENT
ENT
STR 5
14 OUT
GX
OUT
SHFT C
2
C
2
ENT
K0
B
A MLR
$
GX
STR
G
D
6
ENT
X7 Y4 ENT
OUT 3
B OUT T
MLR
A
0
ENT
C $
STR
H
7
ENT
GX E C ENT
D OUT 4 2
Interrupt Instructions
Interrupt (INT)
1
The Interrupt instruction allows a section of ladder logic
to be placed below the main body of the program and
INT O aaa
2
executed only when needed. High-Speed I/O Modes 10,
20, and 40 can generate an interrupt. With Mode 40, 3
you may select an external interrupt (input X0), or a
time-based interrupt (3–999 ms). 4
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
5
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 6
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
configuration. In the DL06, only one software interrupt is available. The software interrupt
7
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 8
with the hardware input signal (e.g. X1 will initiate INT 1).
9
Operand Data Type DL06 Range
aaa 10
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . O 0-3
8 SP0
Direct SOFT32
LD
K40
Load the constant value
(K40) into the lower 16 bits
of the accumulator
Handheld Programmer Keystrokes
$
STR
SHFT SP
STRN
A
0
ENT
L D K E A
10
ANDST 3 JMP 4
11 X2
ENI SHFT
SP
STRN
E
4
N
C
TMR
2
I
8
ENT
ENT
DISI
12 SHFT D I S I ENT
3 8 RST 8
E N D
13
SHFT ENT
END 4 TMR 3
SHFT I N T A ENT
8 TMR MLR 0
INT O0
$ SHFT I B ENT
14
STR 8 1
X1 Y5
X SHFT I F ENT
SETI SET 8 5
$ SHFT I D ENT
X3 Y7 STR 8 3
A SETI
IRT
X
SHFT
SET
SHFT
I
8
I
R
ORN
8
T
MLR
H
7
ENT
ENT
B
C
D
5
SP0 Load the constant value
LD $ 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
Copy the value in the lower GX V H G D D
6
OUT SHFT ENT
16 bits of the accumulator to OUT AND 7 6 3 3
V7633 V7633
SHFT L D SHFT K B A E ENT
ANDST 3 JMP 1 0 4
7
(K10) into the lower 16 bits OUT AND 7 6 3 4
K104 of the accumulator
$ E ENT
STR 4
8
V7634 V7634
SP E ENT
STRN 4
X4
SHFT D I S I ENT
ENI 3 8 RST 8
X4
DISI
SHFT E N D ENT
9
4 TMR 3
END
SHFT
$
STR
I
SHFT
8
N
I
TMR
8
T
MLR
C
2
A
ENT
0
ENT
10
INT O0
11
X SHFT I F 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
1 Fault (FAULT)
2 The Fault instruction is used to display a message on the handheld
programmer, the optional LCD display or in the DirectSOFT FAULT
status bar. The message has a maximum of 23 characters and can A aaa
3 be either V memory data, numerical constant data or ASCII text.
To display the value in a V memory location, specify the V memory location in the
4 instruction. To display the data in ACON (ASCII constant) or NCON (Numerical constant)
instructions, specify the constant (K) value for the corresponding data label area.
5 Operand Data Type DL06 Range
....................................A aaa
6 V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
1-FFFF
11 *SW 146
12
Direct SOFT32 Handheld Programmer Keystrokes
13 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
D L B L B
B ACON
A SW
SHFT
SHFT A
3
0
ANDST
C
2
O
INST#
1 ANDST
N
TMR
S
1
RST
W
ENT
ANDN
ENT
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
4
5 END
6 DLBL
K1
7 ACON
A SW
8
9 NCON
K 2031
10
11 NCON
K 3436
13
E N D
14 SHFT
SHFT D
4
L
TMR
B
3
L
ENT
B ENT
3 ANDST 1 ANDST 1
A SHFT A
0
C
2
O
INST#
N
TMR
S
RST
W
ANDN
ENT
N C O N C A D B
B SHFT
N
TMR
C
2 INST#
O N
TMR
D
2
E
0
D
3
G
1
ENT
SHFT ENT
TMR 2 INST# TMR 3 4 3 6
C
D
Port 2 on the DL06 has standard RS232 levels, and should work with most printer serial
input connections.
1 Text element – this is used for printing character strings. The character strings are defined as
the character (more than 0) ranged by the double quotation marks. Two hex numbers
2 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:
3 # Character code Description
1 $$ Dollar sign ($)
4 2 $” Double quotation (”)
3 $L or $l Line feed (LF)
5 4
5
$N or $n
$P or $p
Carriage return line feed (CRLF)
Form feed
6 $R or $r Carriage return (CR)
6 7 $T or $t Tab
The following examples show various syntax conventions and the length of the output to the
7 printer.
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
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
types are shown in the table below. The Character code must be capital letters. 1
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. 2
#
1
Character code
none
Description
16-bit binary (decimal number)
3
2 :B 4 digit BCD
3 :D 32-bit binary (decimal number) 4
4 :DB 8 digit BCD
Example:
5
V2000 Print binary data in V2000 for decimal number
V2000 : B Print BCD data in V2000
6
V2000 : D Print binary number in V2000 and V2001 for decimal number 7
V2000 : D B Print BCD data in V2000 and V2001
Example: The following example prints a message containing text and a variable. The “reactor
temperature” labels the data, which is at V2000. You can use the : B qualifier after the V2000
8
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. 9
X1 PRINT K2
“Reactor temperature = ” V2000 “deg. $N”
Print the message to Port 2
when X1 makes an off-to-on
10
⊥ ⊥ transition.
Bit element
1 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 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
Print “TRUE” for an ON state, and
2 :BOOL “FALSE” for an OFF state
4 3 :ONOFF Print “ON” for an ON state, and
“OFF” for an OFF state
5 Example:
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
6 C100 Prints the status of C100 in 1/0 format
C100 : BOOL Prints the status of C100 in TRUE/FALSE format
7 C100 : ON/OFF Prints the status of C100 in ON/OFF format
V2000.15 : BOOL Prints the status of bit 15 in V2000 in TRUE/FALSE format
8 The maximum numbers of characters you can print is 128. The number of characters for
each element is listed in the table below:
9 Element Type Maximum Characters
10 Text, 1 character
16 bit binary
1
6
32 bit binary 11
11 4 digit BCD
8 digit BCD
4
8
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
1 data (V2000 – V2004) will be read from a CPU at station address 5 and copied into V
memory locations V2300–V2304 in the CPU with the master port.
2 Direct SOFT32
X1 SP116 LD
3 KF205
Master Slave
The constant value KF205
CPU CPU
4 specifies the port number (2)
and the slave address (5)
LD
5 K10
LDA
V2301
V2302
8
1
5
9
3
3
4
6
8
1
5
9
3
3
4
6
V2001
V2002
V2303 9 5 7 1 9 5 7 1 V2003
7 O 2300
9 be read into
RX
10 V2000
$ B ENT
13 W
STR
SHFT
1
SP B B G ENT
ANDN STRN 1 1 6
14 SHFT L
ANDST
D
3
SHFT K
JMP
SHFT F
5
SHFT C
2
A
0
F
5
ENT
B SHFT R
ORN
X
SET
C
2
A
0
A
0
A
0
ENT
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
1 of data is read from the Master CPU and copied to V memory locations V2000–V2004 in
the slave CPU at station address 5.
2 Direct SOFT32
X1 SP116 LD
3 KF205
Master Slave
The constant value KF205
specifies the port number (2) CPU CPU
4 and the slave address (5)
LD
5 K10
6 bytes to be written
LDA
V2301
V2302
8
1
5
9
3
3
4
6
8
1
5
9
3
3
4
6
V2001
V2002
V2303 9 5 7 1 9 5 7 1 V2003
O 2300
7 Octal address 2300 is
V2304
V2305
1
X
4
X
2
X
3
X
1
X
4
X
2
X
3 V2004
X V2005
converted to 4C0 HEX and
$ B ENT
STR 1
13 W
ANDN
SHFT SP
STRN
B
1
C
1
E
6
ENT
14 SHFT L
ANDST
D
3
SHFT K
JMP
SHFT F
5
SHFT
C
2
A
0
F
5
ENT
B SHFT W
ANDN
X
SET
C
2
A
0
A
0
A
0
ENT
C
D
LCD
When enabled, the LCD instruction causes a user-defined
text message to be displayed on the LCD Display Panel.
The display is 16 characters wide by 2 rows high so a total
LCD
Line Number: Kn 1
"text message"
of 32 characters can be displayed. Each row is addressed
separately; the maximum number of characters the 2
instruction will accept is 16.
The text message can be entered directly into the message field of the instruction set-up 3
dialog, or it can be located anywhere in user V-memory. If the text is located in V-memory,
the LCD instruction is used to point to the memory location where the desired text
originates. The length of the text string is also required.
4
From the DirectSOFT32 project folder, use the Instruction Browser to locate the LCD
instruction. When you select the LCD instruction and click OK, the LCD dialog will appear,
5
as shown in the examples. The LCD instruction is inserted into the ladder program via this
set-up dialog box. 6
Display text strings can include embedded variables. Date and time settings and V-memory
values can be embedded in the displayed text. Examples of each are shown. 7
Direct Text Entry 8
The two dialogs to the right show the
selections necessary to create the two ladder
instructions below. Double quotation marks
9
are required to delineate the text string. In
the first dialog, the text “Sludge Pit Alarm“ 10
uses sixteen character spaces and will appear
on line 1 when the instruction is enabled.
Note, the line number is K1. Clicking the
11
“check” button causes the instruction to be
inserted into the ladder program. 12
LCD
Line Number: K1
13
"Sludge Pit Alarm"
LCD
14
Line Number: K2
"Effluent Overflo" A
By identifying the second Line Number as
K2, the text string “Effluent Overflow” will
B
appear on the second line of the display
when the second instruction is enabled. C
S l u d g e P i t A l a r m D
E f f l u e n t O v e r f l o
7 _date:e
_date:a
European format
Asian format
DD/MM/YY
YY/MM/DD
_time:12 12 hour format HH:MMAM/PM
8 _time:24 24 hour format HH:MM:SS
LCD
9 Line Number:
"Alarm 1 " _time:12
K1
10 LCD
Line Number: K2
11 _date:us
A l a r m 1 1 1 : 2 1 P M
12 0 5 - 0 8 - 0 2
Embedding V-memory data
13 Any V-memory data can be displayed in
any one of six available data formats. An
14 example appears to the right. A list of data
formats and modifiers is on the next page.
A Note that different data formats require
differing numbers of character positions
on the display.
B LCD
C Line Number:
"Count = " V2500:B
K1
D C o u n t = 0 4 1 2
:DB [:DB]
V2001 = 0000 0000 0000 0011
V2000:DB
1
0
2
0
3
0
4
3
5
0
6 7 8
0 0 0
10
(8 digit BCD) [:DBS] V2000:DBS 3 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
(real number) 1 2 3 4 5
Double Word
6 7 8 9 10 11 12 13
12
:R [:R] V2000:R f 2 2 2 . 1 1 1 1 1
(DWord floating
point number) [:RS] V2000:RS f 2 2 2 . 1 1 1 1 1 13
[:RC0] V2000:RC0 f 0 0 0 2 2 2 . 1 1 1 1 1
[:R0] V2000:R0
V2001/V2000 = 222.1
f 2 2 2 .
Double Word
1 1 1 1 1
14
(real number) 1 2 3 4 5 6 7 8 9 10 11 12 13
:E
(DWord floating [:E]
point number [:ES]
V2000:E
V2000:ES
f 2 . 2
f 2 . 2 2
2
1
1
0
0
0
0
E
E
+
+
0
0
2
2 A
with exponent) [:EC0]
[:E0]
V2000:EC0
V2000:E0
f 2 . 2 2
f 2 . 2 2
1
1
0
0
0
0
E
E
+
+
0
0
2
2
B
f = plus/minus flag (plus = no symbol, minus = - )
The S, C0, and 0 modifiers alter the presentation of leading zeros and spaces. S removes C
leading spaces and left justifies the result. C0 replaces leading spaces with leading zeros.
0 is a modification of C0. 0 eliminates any leading zeros in the C0 format version and D
converts them to spaces.
V10007
14 LCD
Line Number: K2
V10010 i H
Starting V Memory Address: V10010
V10011 h g
A Number of Characters: K16
V10012
V10013
T
m e
V10014 p
B V10015 l A
V10016 r a
A d m i n O f f i c e
C H i g h T e m p A l a r m
V10017 m
2 01 – Read Coil
02 – Read Input Status
584/984 Mode
484 Mode
1–65535
1001–1999
7
8 MRX Master Memory Address Ranges
Operand Data Type DL06 Range
9 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
0–1777
0–1777
10 Control Relays. . . . . . . . . . . . . . . . . . . . . . . . . . C
Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S
0–3777
0–1777
11 Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0–377
0–377
12 Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP
V–memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
0–777
all
13 Global Inputs . . . . . . . . . . . . . . . . . . . . . . . . . GX
Global Outputs . . . . . . . . . . . . . . . . . . . . . . . . GY
0–3777
0–3777
14
A Number of Elements
Operand Data Type DL06 Range
B V–memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
all
Bits: 1–2000 Registers: 1–125
C
Exception Response Buffer
D Operand Data Type DL06 Range
V–memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V all
MRX 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 bit is
2
optional. When used, it should be ahead of any network instruction boxes since the error bit
is reset when an MRX or MWX instruction is executed. Typically network communications 3
will last longer than 1 CPU scan. The program must wait for the communications to finish
before starting the next transaction. 4
5
6
This rung does a MODBUS read from the first 32 coils of slave address number one.
7
It will place the values into 32 bits of the master starting at C0.
MWX 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 with
2 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
3 optional. When used, it should be ahead of any network instruction boxes since the error bit
is reset when an MRX or MWX instruction is executed.
Typically network communications will last longer than 1 CPU scan. The program must wait
4 for the communications to finish before starting the next transaction.
5
6 This rung does a MODBUS write to the first holding register 40001 of slave address
number one. It will write the values over that reside in V2000. This particular function
code only writes to 1 register. Use Function Code 16 to write to multiple registers.
7 Only one Network instruction (WX, RX, MWX, MRX) can be enabled in one scan.
That is the reason for the interlock bits. For using many network instructions on the
same port, look at using the Shift Register instruction.
9 3 Port Number:
Slave Address:
Function Code:
K2
K1
06-Preset Single Register
Start Slave Memory Address: 40001
10 Start Master Memory Address:
Number of Elements:
V2000
n/a
Modbus Data type: 584/984 Mode
13
14
A
B
C
D
ASCII Instructions
The DL06 CPU supports several instructions and methods that allow ASCII strings to be 1
read into and written from the PLC communications ports. Specifically, port 2 on the DL06
can be used for either reading or writing raw ASCII strings, but cannot be used for both on
the same CPU. The DL06 can also decipher ASCII embedded within a supported protocol
2
(K–Sequence, DirectNet, Modbus) via the CPU port.
Reading ASCII Input Strings
3
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
4
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 5
write raw ASCII input strings into port 2 based on the (AIN) instruction’s parameters.
2) Write embedded ASCII strings directly to V–memory from an external HMI or similar 6
master device via a supported communications protocol using the CPU ports. The AIN
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
7
device via a supported communications protocol using port 2. The RX instruction places
the data directly into V–memory. 8
Writing ASCII Output Strings
The following instructions can be used to write ASCII output strings: 9
1) Print from V–memory (PRINTV) – Use this instruction to write raw ASCII strings out of
port 2 to a display panel or a serial printer, etc. The instruction features the starting 10
V–memory address, string length, byte swapping options, etc. When the instruction’s
permissive bit is enabled, the string is written to port 2. 11
2) Print to V–memory (VPRINT) – Use this instruction to create pre–coded ASCII strings in
the PLC (i.e. alarm messages). When the instruction’s permissive bit is enabled, the
message is loaded into a pre–defined V–memory address location. Then the (PRINTV)
12
instruction may be used to write the pre–coded ASCII string out of port 2. American,
European and Asian Time/Date stamps are supported. 13
Additionally, if a DL06 PLC is a master on a network, the Network Write instruction (WX)
can be used to write embedded ASCII data to an HMI or slave device directly from 14
V–memory via a supported communications protocol using port 2.
A
B
C
D
7
8
9
10
11
12
13
14
A
B
C
D
1 Parameter
Data Destination All V–memory
2 Fixed Length
Bits: Busy, Complete,
K1–128
6 AIN Complete
C1
7 1
AIN Port Number:
Data Destination:
Fixed Length
K2
V2000
K32
Interchar. Timeout: None
10 2
C1
Data Read
C100
OUT
11
12 Fixed Length example when character to character timing is critical
13
AIN Complete Intercharacter timeout
14 5
C1 C2 AIN Port Number:
Data Destination:
K2
V2000
Fixed Length K32
A Interchar. Timeout:
First Char. Timeout:
Byte Swap:
20ms
None
All
Busy: C0
B Complete:
Interchar. Timeout Error:
C1
C2
First Char. Timeout Error: C3
AIN Complete
C C1
Data Read
C100
6 OUT
D
1 Parameter
Data Destination All V–memory
2 Fixed Length K1–128
Bits: Busy, Complete,
Timeout Error, Overflow C0–3777
3
4
5 AIN Variable Length Example
6 AIN variable length example used to read barcodes on boxes (PE = photoelectric sensor)
7 9
Box present PE
C5
Scan code
C6
SET
9 10 Fixed Length
Interchar. Timeout:
First Char. Timeout:
K40
100ms
2000ms
Byte Swap: All but Null
10 Termination Code(s):
Overflow Error:
Busy:
0D
C4
C0
Complete: C1
11 AIN Complete
Interchar. Timeout Error:
First Char. Timeout Error:
C2
C3
Scan code
12 11
C1 C6
RST
Intercharacter Timeout
13 C2
14 Firstcharacter Timeout
C3
9
10
11 ASCII Characters
HEX Equivalent
D
Found Index Number = 0012 V4000
C7
Search string not found
in table
Data not found with
AFIND
8
V2200 Kffff
C10
16 SET
17
C7 C10 AFIND to complete
T0
12
Delay time for
AFIND to complete AEX
K2
13
T0
18 Source Base Address:
Extract at Index:
V2001
K0
14
Number of Bytes: K4
Shift ASCII Option:
Byte Swap:
None
All A
Convert ASCII: To BCD (HEX)
Destination Base Address: V3000
Give delay time for
B
AFIND instruction
C7
to complete
C
RST
D
10
Parameter DL06 Range
11 Source Base Address All V–memory
Extract at Index All V–memory or K0–127
12 Number of Bytes Constant range: V-memory location
“Convert BCD (HEX) ASCII” K1–128 containing BCD value:
not checked 1–128
13
Number of Bytes Constant range: V-memory location
14 “Convert BCD (HEX) ASCII” K1–4
checked
containing BCD value:
1–4
Destination Base
A Address
All V–memory
B
C
D
10
11
12
CMPV Example
The CMPV instruction executes when the AIN instruction is complete. If the compared
V–memory tables are equal, SP61 will turn ON.
13
14
A
AIN Complete
C1
CMPV
VPRINT Time / Date Stamping– the codes in the table below can be used in the VPRINT
13 ASCII string message to “print to V–memory” the current time and/or date.
C
D
VPRINT V-memory element – the following modifiers can be used in the VPRINT ASCII
string message to “print to V–memory” register contents in integer format or real format. Use
V-memory number or V-memory number with “:” and data type. The data types are shown 1
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 text
2
string. Failure to do this will result in an error code 499.
VPRINT V-memory text element – the following is used for “printing to V–memory” text
stored in registers. Use the % followed by the number of characters after V-memory number
1 for representing the text. If you assign “0” as the number of characters, the function will read
the character count from the first location. Then it will start at the next V-memory location
2 and read that number of ASCII codes for the text from memory.
Example:
3 V2000 % 16 16 characters in V2000 to V2007 are printed.
V2000 % 0 The characters in V2001 to Vxxxx (determined by the number in V2000) will be
4 printed.
VPRINT Bit element – the following is used for “printing to V–memory” the state of the
5 designated bit in V-memory or a control relay bit. The bit element can be assigned by the
designating point (.) and bit number preceded by the V-memory number or relay number.
6 The output type is described as shown in the table below.
# Data format Description
7 1
2
none
: BOOL
Print 1 for an ON state, and 0 for an OFF state
Print “TRUE” for an ON state, and “FALSE” for an OFF state
3 : ONOFF Print “ON” for an ON state, and “OFF” for an OFF state
8
Example:
9 V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format
10 C100 : BOOL Prints the status of C100 in TRUE/FALSE format
C100 : ON/OFF Prints the status of C100 in ON/OFF format
11 V2000.15 : BOOL Prints the status of bit 15 in V2000 in TRUE/FALSE format
The maximum numbers of characters you can VPRINT is 128. The number of characters
12 required for each element, regardless of whether the :S, :C0 or :0 modifiers are used, is listed
in the table below.
13 Maximum
Element type Characters
14 Text, 1 character 1
16 bit binary 6
A 32 bit binary
4 digit BCD
11
4
B 8 digit BCD
Floating point (real number)
8
3
Floating point (real with exponent) 13
C V-memory/text
Bit (1/0 format)
2
1
Text element – the following is used for “printing to V–memory” character strings. The
character strings are defined 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. 1
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
$”
$Lor $l
Double quotation (”)
Line feed (LF)
4
4 $N or $n Carriage return line feed (CRLF)
5
6
$P or $p
$R or $r
Form feed
Carriage return (CR)
5
7 $T or $t Tab 6
The following examples show various syntax conventions and the length of the output to the
printer. 7
”” Length 0 without character
”A”
” ”
Length 1 with character A
Length 1 with blank
8
” $” ”
”$R$L”
Length 1 with double quotation mark
Length 2 with one CR and one LF
9
”$0D$0A” Length 2 with one CR and one LF
”$$” Length 1 with one $ mark 10
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 11
contains invalid text or no quotations. It is important to test your VPRINT instruction data
during the application development. 12
13
14
A
B
C
D
1
2
3
4 VPRINT Example Combined with PRINTV Instruction
5 The VPRINT instruction is used to create a string in V–memory. The PRINTV is used to print the string out
of port 2.
6 Create String Permissive
C12 VPRINT
7 28 Byte Swap:
"Print to" Address
All
V4000
"STX" V3000:B"$0D"
8 Delay permissive for
VPRINT
10 29
C13 TMR
11 to complete
T1
T1 PRINTV
13 30 Port Number:
Start Address:
Number of Bytes:
K2
V4001
V4000
Append: None
14 Byte Swap:
Busy:
None
C15
Complete: C16
A C13
Delay Permissive for
VPRINT
B RST
C
D
9 Byte Swap
Preferences
No Byte Swapping
(AIN, AEX, PRINTV, VPRINT)
Byte
High Low
V2000 0005h
10 A B C D E V2001 B A
V2002 D C
11 V2003 xx E
SWAPB Example
The AIN Complete bit is used to trigger the SWAPB instruction. Use a one–shot so the
SWAPB only executes once. 1
2
AIN complete
3
SWAPB
C1
21
Starting Address: V2001 4
Number of Bytes: K32
Byte Swap: All
5
ASCII Clear Buffer (ACRB) 6
The ASCII Clear Buffer instruction will clear the ASCII receive buffer of the specified
communications port number. Port Number:must be DL06 port 2 (K2) 7
8
9
10
ACRB Example 11
The AIN Complete bit or the AIN diagnostic bits are used to clear the ASCII buffer.
12
Ain Complete
C1
ACRB 13
33 K2
Intercharacter timeout 14
C2
Firstcharacter timeout
A
C3
B
AIN overflow error
C4
C
D