DL06 User Manual Vol1
DL06 User Manual Vol1
Volume 1 of 2
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.
VOLUME ONE:
TABLE OF CONTENTS
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 iii
Table of Contents
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 vii
Table of Contents
viii DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Table of Contents
Introduction
The Purpose of this Manual
Thank you for purchasing a DL06 Micro PLC. This manual shows you how to install,
program, and maintain all PLCs in the DL06 family. It also helps you understand how to
interface them to other devices in a control system.This manual contains important
information for personnel who will install DL06 PLCs and for the PLC programmer. This
user manual will provide the information you need to get and keep your system up and
running.
Supplemental Manuals
The 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
have purchased one of our operator interface panels or DirectSOFT™ programming
software, you will want to refer to the manuals that are written for these products.
Technical Support
We strive to make our manuals the best in the industry. We rely on your feedback to let us
know if we are reaching our goal. If you cannot find the solution to your particular
application, or, if for any reason you need technical assistance, please call us at:
770–844–4200.
Our technical support group will work with you to answer your questions. They are available
Monday through Friday from 9:00 A.M. to 6:00 P.M. Eastern Time. We also encourage you
to visit our web site where you can find technical and non-technical information about our
products and our company.
In Brazil: http://www.soliton.com.br
If you have a comment, question or suggestion about any of our products, services, or
manuals, please fill out and return the ‘Suggestions’ card that was included with this manual.
1–2 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
Conventions Used
When you see the “notepad” icon in the left-hand margin, the paragraph to
its immediate right will be a special note. Notes represent information that
may make your work quicker or more efficient. The word NOTE: in
boldface will mark the beginning of the text.
When you see the “exclamation point” icon in the left-hand margin, the
paragraph to its immediate right will be a warning. This information could
prevent injury, loss of property, or even death in extreme cases. Any warning in
this manual should be regarded as critical information that should be read in
its entirety. The word WARNING in boldface will mark the beginning of the text.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–3
Chapter 1: Getting Started
Programming Methods
Two programming methods are available: RLL (Relay Ladder Logic) and RLLPLUS. RLLPLUS
combines the added feature of flow chart programming (Stage) to the standard RLL language.
Both the DirectSOFT™ programming package and the handheld programmer support
RLLPLUS as well as standard RLL instructions.
DirectSOFT32 Programming for Windows™
The DL06 Micro PLC can be programmed with DirectSOFT32, V4.0 or later, a Windows-
based software package that supports familiar features such as cut-and-paste between
applications, point-and-click editing, viewing and editing multiple application programs at
the same time, etc.
1–4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
DirectSOFT32 (part number PC-PGMSW) supports the DirectLOGIC CPU families. You
can use the full version of DirectSOFT32 to program the DL05, DL06, DL105, DL205,
DL305, and DL405. (Upgrade software may be required for new CPUs when they become
available). A separate manual discusses DirectSOFT32 programming software.
DirectSOFT32 version 4.0 or later is needed to program the DL06.
Handheld Programmer
All DL06 Micro PLCs have a built-in programming port for use with the handheld
programmer (D2–HPP), the same programmer used with the DL05, DL105 and DL205
families. The handheld programmer can be used to create, modify and debug your
application program. A separate manual discusses the Handheld Programmer. Only
D2–HPPs with firmware version 2.2 or later will program the DL06.
* See Chapter 2, Specifications for more information about a particular DL06 version.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–5
Chapter 1: Getting Started
Quick Start
This example is not intended to tell you everything you need to know about programming
and starting-up a complex control system. It is only intended to give you an opportunity to
demonstrate to yourself and others the basic steps necessary to power up the PLC and
confirm its operation. Please look for warnings and notes throughout this manual for
important information you will not want to overlook.
Step 1: Unpack the DL06 Equipment
Unpack the DL06 and gather the parts necessary to build this demonstration system. The
recommended components are:
• DL06 Micro PLC
• AC power cord or DC power supply
• Toggle switches (see Step 2 on next page).
• Hook-up wire, 16-22 AWG
• DL06 User Manual (this manual)
• A small screwdriver, 5/8” flat or #1 Philips type
You will need at least one of the following programming options:
• DirectSOFT32 Programming Software V4.0 or later (PC-PGMSW or PC-PGM-BRICK),
DirectSOFT32 Manual (included with the software), and a programming cable (D2-DSCBL
connects the DL06 to a personal computer)
or
• D2-HPP Handheld Programmer, firmware version 2.20 or later, (comes with programming cable).
Please purchase Handheld Programmer Manual D2-HPP-M separately.
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
1–6 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
D0-06DA, D0-06DD1,
D0-06DD2, D0-06DR,
LOGIC 06
K oyo
D0-DD1-D, and D0-06DR1-D
DC Input
-
12 - 24 VDC
+
Toggle Switches
UL Listed
90 - 120 VAC
Toggle Switches
fuse
UL Listed
WARNING: Remove power and unplug the DL06 when wiring the
switches. Use only UL-approved switches rated for at least
250VAC, 1A for AC inputs. Firmly mount the switches before
using.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–7
Chapter 1: Getting Started
Fuse
Fuse
fuse
110/220 VAC Power Input 12/24 VDC Power Input
G LG 0V Y0 Y2 C1 Y5 Y7 Y1 G LG N.C. Y0 Y2 C1 Y5 Y7 Y10 Y1
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 + - N.C. C0 Y1 Y3 Y4 Y6 C2 Y11
OUTPUT: 17-240V 50 - 60Hz 0.5A PWR: 100-240V 50-60H OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 12-24 20W
Y Y
0 1 2 3 4 5 6 7 10 11 12 13 14 15 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
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 #
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
D2–DSCBL
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
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
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
Note: The Handheld Programmer cannot create or access LCD, ASCII or MODBUS instructions.
1–8 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
OUT
$ A Move to the first
NEXT ENT
STR 0 address and enter
X0 contact
END
GX A Enter output Y0
ENT
OUT 0
After entering the simple example program put the PLC in Run mode by using the Mode key
on the Handheld Programmer.
The RUN indicator on the PLC will illuminate indicating the CPU has entered the Run
mode. If not, repeat this step, ensuring the program is entered properly or refer to the
troubleshooting guide in chapter 9.
After the CPU enters the run mode, the output status indicator for Y0 should follow the
switch status on input channel X0. When the switch is on, the output will be on.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–9
Chapter 1: Getting Started
1–10 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
Push–UP RAISE
X0
LDD
V1076
After reviewing the programming concepts above, you’ll be equipped with a variety of tools to
write your application program.
Step 7: Choose the Instructions
Once you have installed the Micro PLC and TMR T1
understand the main programming concepts, you K30
can begin writing your application program. At CNT CT3
K10
that time you will begin to use one of the most
powerful instruction sets available in a small PLC.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–11
Chapter 1: Getting Started
Q. Does the DL06 Micro PLC comply with European Union (EU) Directives?
A. The Micro PLC has met the requirements of the European Union Directives (CE).
1–12 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 1: Getting Started
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 1–13
INSTALLATION, WIRING, CHAPTER
AND SPECIFICATIONS
2
In This Chapter...
Safety Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–2
Orientation to DL06 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . .2–4
Mounting Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–6
Wiring Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–10
System Wiring Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–13
Glossary of Specification Terms . . . . . . . . . . . . . . . . . . . . . . . . . . .2–25
Wiring Diagrams and Specifications . . . . . . . . . . . . . . . . . . . . . . . .2–26
Chapter 2: Installation, Wiring, and Specifications
Safety Guidelines
NOTE: Products with CE marks perform their required functions safely and adhere to relevant standards as
specified by CE directives provided they are used according to their intended purpose and that the
instructions in this manual are adhered to. The protection provided by the equipment may be impaired if
this equipment is used in a manner not specified in this manual.
WARNING: Providing a safe operating environment for personnel and equipment is your responsibility
and should be your primary goal during system planning and installation. Automation
systems can fail and may result in situations that can cause serious injury to personnel or
damage to equipment. Do not rely on the automation system alone to provide a safe
operating environment. You should use external electro-mechanical devices, such as relays
or limit switches, that are independent of the PLC application to provide protection for any
part of the system that may cause personal injury or damage. Every automation application
is different, so there may be special requirements for your particular application. Make sure
you follow all national, state, and local government requirements for the proper installation
and use of your equipment.
2–2 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
To Disconnect
PLC Power
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
After an Emergency shutdown or any other type of power interruption, there may be
requirements that must be met before the PLC control program can be restarted. For
example, there may be specific register values that must be established (or maintained from
the state prior to the shutdown) before operations can resume. In this case, you may want to
use retentive memory locations, or include constants in the control program to ensure a
known starting point.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–3
Chapter 2: Installation, Wiring, and Specifications
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
Ports
LOGIC 06
K oyo
The output and power connector accepts external power and logic and chassis ground
connections on the indicated terminals. The remaining terminals are for connecting
commons and output connections Y0 through Y17. The sixteen output terminals are
numbered in octal, Y0-Y7 and Y10-Y17. On DC output units, the end terminal on the right
accepts power for the output stage. The input side connector provides the location for
connecting the inputs X0 and X23 and the associated commons.
WARNING: For some applications, field device power may still be present on the terminal block even
though the Micro PLC is turned off. To minimize the risk of electrical shock, check all field
device power before you expose or remove either connector
2–4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
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
2. From the center of the connector block, pry upward with the screwdriver until the
connector is loose.
The terminal blocks on DL06 PLCs have regular (m3 size) screw terminals, which will accept
either standard blade-type or #1 Philips screwdriver tips. You can insert one 16 AWG wire
under a terminal, or two 18 AWG wires (one on each side of the screw). Be careful not to
over-tighten; maximum torque is 6 inch/ounces.
Spare terminal blocks are available in an accessory kit. Please refer to part number
D0-ACC-2. You can find this and other accessories on our web site.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–5
Chapter 2: Installation, Wiring, and Specifications
Mounting Guidelines
In addition to the panel layout guidelines, other specifications can affect the installation of a
PLC system. Always consider the following:
• Environmental Specifications
• Power Requirements
• Agency Approvals
• Enclosure Selection and Component Dimensions
Unit Dimensions
The following diagram shows the outside dimensions and mounting hole locations for all
versions of the DL06. Make sure you follow the installation guidelines to allow proper
spacing from other components.
Enclosures
Your selection of a proper enclosure is important to ensure safe and proper operation of your
DL06 system. Applications of DL06 systems vary and may require additional features. The
minimum considerations for enclosures include:
• Conformance to electrical standards
• Protection from the elements in an industrial environment
• Common ground reference
• Maintenance of specified ambient temperature
• Access to equipment
• Security or restricted access
• Sufficient space for proper installation and maintenance of equipment
2–6 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
1.5"
Panel or single 38mm
point ground Power Source min
Star Washers Star Washers
5. There must be a single point ground (i.e. copper bus bar) for all
devices in the panel requiring an earth ground return. The single point of
ground must be connected to the panel ground termination. The panel ground
termination must be connected to earth ground. Minimum wire sizes, color coding, and
general safety practices should comply with appropriate electrical codes and standards for
your area.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–7
Chapter 2: Installation, Wiring, and Specifications
6. A good common ground reference (Earth ground) is essential for proper operation of the
DL06. One side of all control and power circuits and the ground lead on flexible shielded
cable must be properly connected to Earth ground. There are several methods of providing an
adequate common ground reference, including:
a) Installing a ground rod as close to the panel as possible.
b) Connection to incoming power system ground.
7. Evaluate any installations where the ambient temperature may approach the lower or upper
limits of the specifications. If you suspect the ambient temperature will not be within the
operating specification for the DL06 system, measures such as installing a cooling/heating
source must be taken to get the ambient temperature within the range of specifications.
8. The DL06 systems are designed to be powered by 95-240 VAC or 12–24 VDC normally
available throughout an industrial environment. Electrical power in some areas where the
PLCs are installed is not always stable and storms can cause power surges. Due to this,
powerline filters are recommended for protecting the DL06 PLCs from power surges and
EMI/RFI noise. The Automation Powerline Filter, for use with 120 VAC and 240 VAC, 1–5
Amps, is an excellent choice, however, you can use a
filter of your choice. These units install easily between the power source and the PLC.
NOTE: If you are using other components in your system, make sure you refer to the appropriate manual to
determine how those units can affect mounting dimensions.
2–8 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
35mm
Retaining Clip
NOTE: Refer to our catalog or web site for a complete listing of DINnector connection systems.
Environmental Specifications
The following table lists the environmental specifications that generally apply to DL06
Micro PLCs. The ranges that vary for the Handheld Programmer are noted at the bottom
of this chart. Certain output circuit types may have derating curves, depending on the
ambient temperature and the number of outputs ON. Please refer to the appropriate
section in this chapter pertaining to your particular DL06 PLC.
Environmental Specifications
Specification Rating
Storage temperature –4° F to 158° F (–20° C to 70° C)
Ambient operating temperature* 32° F to 131° F (0° C to 55° C)
Ambient humidity** 5% – 95% relative humidity (non–condensing)
Vibration resistance MIL STD 810C, Method 514.2
Shock resistance MIL STD 810C, Method 516.2
Noise immunity NEMA (ICS3–304)
Atmosphere No corrosive gases
Agency approvals UL, CE (C1D2), FCC class A
* Operating temperature for the Handheld Programmer and the DV–1000 is 32° to 122° F
(0° to 50° C) Storage temperature for the Handheld Programmer and the DV–1000 is –4° to
158° F (–20° to70° C).
**Equipment will operate down to 5% relative humidity. However, static electricity problems
occur much more frequently at low humidity levels (below 30%). Make sure you take
adequate precautions when you touch the equipment. Consider using ground straps, anti-
static floor coverings, etc. if you use the equipment in low-humidity environments.
Agency Approvals
Some applications require agency approvals for particular components. The DL06 Micro
PLC agency approvals are listed below:
• UL (Underwriters’ Laboratories, Inc.)
• CUL (Canadian Underwriters’ Laboratories, Inc.)
• CE (European Economic Union)
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–9
Chapter 2: Installation, Wiring, and Specifications
Wiring Guidelines
Connect the power input wiring for the DL06. Observe all precautions stated earlier in this
manual. For more details on wiring, see Chapter 2 on Installation, Wiring, and Specifications.
When the wiring is complete, close the connector covers. Do not apply power at this time.
12 - 24 VDC
+ -
fuse
110/220 VAC Power Input
Fuse
Fuse
12/24 VDC Power Input
G LG 0V Y0 Y2 C1 Y5 Y7 G LG N.C. Y0 Y2 C1 Y5 Y7
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C + - N.C. C0 Y1 Y3 Y4 Y6
OUTPUT: 17-240V 50 - 60Hz 0.5A PWR: 100-240V 50 OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 12-24
Y Y
0 1 2 3 4 5 6 7 10 11 12 13 14 0 1 2 3 4 5 6 7 10 11 12 13 14
X X
INPUT: 90 - 120V 7 - 15mA INPUT: 12 - 24V 3 - 15mA
WARNING: Once the power wiring is connected, secure the terminal block cover in the closed position.
When the cover is open there is a risk of electrical shock if you accidentally touch the
connection terminals or power wiring.
2–10 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
NOTE: The rating between all internal circuits is BASIC INSULATION ONLY.
NOTE: Recommended wire size for field devices is 16 - 22 AWG solid/stranded. Tighten terminal screws to
7.81 lb-in (0.882 N*m) to 9.03 lb-in (1.02 N*m).
2. Always use a continuous length of wire. Do not splice wires to attain a needed length.
3. Use the shortest possible wire length.
4. Use wire trays for routing where possible.
5. Avoid running wires near high energy wiring.
6. Avoid running input wiring close to output wiring where possible.
7. To minimize voltage drops when wires must run a long distance , consider using multiple wires for
the return line.
8. Avoid running DC wiring in close proximity to AC wiring where possible.
9. Avoid creating sharp bends in the wires.
10. Install the recommended powerline filter to reduce power surges and EMI/RFI noise.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–11
Chapter 2: Installation, Wiring, and Specifications
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
2–12 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
Power 4 Optional
Supply CPU card slots
Isolation
boundary
Input circuit 2 comm. ports
To programming device
20 discrete Inputs or Operator interface
The next figure shows the internal layout of DL06 PLCs, as viewed from the front panel.
To Programming Device
or Operator Interface
DL06
PLC
2 Comm.
CPU Ports
Main
Power
Supply
Power
Input 20 Discrete Inputs Commons 16 Discrete Outputs Commons
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–13
Chapter 2: Installation, Wiring, and Specifications
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.
PORT1 PORT2 RUN STOP
DV–1000CBL
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 8–30VDC power.
DL06 Micro PLC
2 3
Y1 Y3
50 - 60Hz
4
Y4
5
Y6 C2 Y11 Y13 Y14 Y16 N.C.
2.0A, 6 - 27V
6 7 10 11
2.0A
12
PWR: 100-240V
13 14 15 16
50-60Hz 40VA
17 20 21 22
D0-06DR
23
RUN
CPU
TX1
RX1
VGA male male
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.
TERM Use cable part no.
PORT1 PORT2 RUN STOP
EZ-2CBL-1
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
Use cable part no.
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
D2–DSCBL
PORT1 PORT2 RUN STOP
The D2-HPP Handheld Programmer comes with a communications cable. For a replacement
part, use the cable shown below.
DL06 Micro PLC
RJ12 RJ12 D2–HPP
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
phone style phone style
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
X TX2
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
2–14 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
+ Input +
Sensing Output
– Input Switch Output –
Load
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–15
Chapter 2: Installation, Wiring, and Specifications
Most DL06 input and output circuits are grouped into banks that share a common return
path. The best indication of I/O common grouping is on the wiring label. The I/O common
groups are separated by a bold line. A thinner line separates
the inputs associated with that common. To the right,
notice that X0, X1, X2, and X3 share the common
terminal C0, located to the left of X1.
The following complete set of labels shows five banks of
four inputs and four banks of four outputs. One common
is provided for each bank.
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
This set of labels is for DC (sinking) output versions such as the D0-06DD1 and
D0-06DD1-D. One common is provided for each group of four outputs, and one designated
terminal on the output side accepts power for the output stage.
G 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
2–16 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
Supply
Ground – + Common
In the next circuit, a field device has an open-emitter PNP transistor output. It sources
current to the PLC input point, which sinks the current back to ground. Since the field
device is sourcing current, no additional power supply is required between the device and the
PLC DC Input.
Field Device
=> PLC DC Input
Input
(sinking)
Output (sourcing)
Ground Common
In the next example we connect a PLC DC output point to the sinking input of a field
device. This is a bit tricky, because both the PLC output and field device input are sinking
type. Since the circuit must have one sourcing and one sinking device, we add sourcing
capability to the PLC output by using a pull-up resistor. In the circuit below, we connect
Rpull-up from the output to the DC output circuit power input.
PLC DC Output
Power
+DC pwr
Field Device
R pull-up
(sourcing)
(sinking) Output Input R input
+ (sinking)
Supply
Common – Ground
NOTE: DO NOT attempt to drive a heavy load (>25 mA) with this pull-up method.
NOTE 2: Using the pull-up resistor to implement a sourcing output has the effect of inverting the output
point logic. In other words, the field device input is energized when the PLC output is OFF, from a
ladder logic point-of-view. Your ladder program must comprehend this and generate an inverted
output. Or, you may choose to cancel the effect of the inversion elsewhere, such as in the field
device.
It is important to choose the correct value of R pull-up. In order to do so, we need to know
the nominal input current to the field device (I input) when the input is energized. If this
value is not known, it can be calculated as shown (a typical value is 15 mA). Then use I input
and the voltage of the external supply to compute R pull-up. Then calculate the power Ppull-
up (in watts), in order to size R pull-up properly.
V input (turn–on)
I input =
R input
2
V supply – 0.7 V supply
R pull-up = – R input P pull-up =
I input R pullup
Y0 Common Y1 Y2 Y3 Y4 Common Y5 Y6 Y7
In the circuit below, all loads use the same AC power supply which powers the DL06 PLC. In
this example, all commons are connected together.
fuse
L L L L L L L L L L L L L L L L
In the circuit on the following page, loads for Y0 – Y3 use the same AC power supply which
powers the DL06 PLC. Loads for Y4 – Y7 use a separate DC supply. In this example, the
commons are separated according to which supply powers the associated load.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–19
Chapter 2: Installation, Wiring, and Specifications
+24 VDC
L N
fuse
-
+
fuse
L L L L L L L L
LOGIC 06
K oyo
AC
Supply
–324 VDC
2–20 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
This figure shows the same circuit with a transorb (TVS) across the coil. Notice that the
voltage spike is significantly reduced.
+24 VDC
Use the following table to help select a TVS or MOV suppressor for your application based
on the inductive load voltage.
Surge Suppressors
Vendor / Catalog Type Inductive Load Voltage Part Number
TVS 110/120 VAC ZL-TD8-120
TVS 24 VDC ZL-TD8-24
General Instrument TVS 110/120 VAC P6KE180CAGICT–ND
Transient Voltage Suppressors, TVS 220/240 VDC P6KE350CA
LiteOn Diodes; from DigiKey TVS 12/24 VDC or VAC P6K30CAGICT–ND
Catalog; Phone: 1-800-344-4539 Diode 12/24 VDC or VAC 1N4004CT–ND
Harris Metal Oxide Varistors;| MOV 110/120 VAC V150LA20C
from Newark Catalog: MOV 220/240 VAC V250LA20C
Phone 1-800-463-9275
Output Input
Common + – Common
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–21
Chapter 2: Installation, Wiring, and Specifications
+24 VDC
-
In the next example, the first eight inputs are sinking, and the last twelve are sourcing.
2–22 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
fuse
-
+24 VDC
+
L L L L L L L L L L L L L L L L
+ +
L L L L L L L L L L L L L L L L
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–23
Chapter 2: Installation, Wiring, and Specifications
Phase A = X0
Phase B = X1
DL06 versions with DC type output points can use the High Speed I/O Pulse Output
feature. It can generate high-speed pulses at up to 10 kHz for specialized control such as
stepper motor / intelligent drive systems. Output Y0 and Y1 can generate pulse and direction
signals, or it can generate CCW and CW pulse signals respectively. See Chapter 3 on high-
speed input and pulse output options.
Motor
Amplifier
-
+24 VDC
+
Signal Common
Power Input Pulse
Direction
2–24 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–25
Chapter 2: Installation, Wiring, and Specifications
LOGIC 06
K oyo
AC
Input Point Wiring
Supply
Equivalent Input Circuit Equivalent Output Circuit Derating Chart for AC Outputs
+V Internal module circuitry Points
+V 16
Optical
Isolator L
OUTPUT Optical 0.5 A Y0 - Y7
Isolator
Input 12
Y10 - Y17
8
4
Common COM
17-240 0
VAC 0 10 20 30 40 50 50˚C
To 32 50 68 86 104 122 122˚C
Ambient Temperature ( ˚C/ ˚F)
2–26 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
AC Input Specifications
Input Voltage Range (Min. - Max.) 80 – 132 VAC, 47 - 63 Hz
Operating Voltage Range 90 – 120 VAC, 47 - 63 Hz
8 mA @100 VAC at 50 Hz
Input Current 10 mA @100 VAC at 60 Hz
12 mA @132 VAC at 50 Hz
Max. Input Current 15 mA @132 VAC at 60 Hz
Input Impedance 14K @50 Hz, 12K @60Hz
ON Current/Voltage > 6 mA @ 75 VAC
OFF Current/Voltage < 2 mA @ 20 VAC
OFF to ON Response < 40 mS
ON to OFF Response < 40 mS
Status Indicators Logic Side
Commons 4 channels / common x 5 banks (isolated)
AC Output Specifications
Output Voltage Range (Min. - Max.) 15 – 264 VAC, 47 – 63 Hz
Operating Voltage 17 – 240 VAC, 47 – 63 Hz
On Voltage Drop 1.5 VAC (>50mA) 4.0 VAC (<50mA)
Max Current 0.5 A / point, 1.5 A / common
Max leakage current <4 mA @ 264 VAC
Max inrush current 10 A for 10 mS
Minimum Load 10 mA
OFF to ON Response 1 mS
ON to OFF Response 1 mS +1/2 cycle
Status Indicators Logic Side
Commons 4channels / common x 4 banks (isolated)
Fuses None (external recommended)
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–27
Chapter 2: Installation, Wiring, and Specifications
LOGIC 06
K oyo
Equivalent Input Circuit Derating Chart for Relay Outputs Equivalent Output Circuit
Points
+V +V Internal module circuitry
16
2.0A Y0 - Y7
Optical 12 +V
Isolator Y10 - Y17 L
Input 8
To LED Output
4
0
Common 0 10 20 30 40 50 50˚C
32 50 68 86 104 122 122˚C Common
To LED
Ambient Temperature ( ˚C/ ˚F)
6–27 VDC
6–240 VAC
2–28 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
The sixteen relay output channels use terminals on the right side top connector. Outputs are
organized into two banks of three normally-open relay contacts. Each bank has a common
terminal. The wiring example on the last page shows all commons connected together, but
separate supplies and common circuits may be used. The equivalent output circuit shows one
channel of a typical bank. The relay contacts can switch AC or DC voltages.
D0-06AR General Specifications
External Power Requirements 100 – 240 VAC, 40 VA maximum,
Communication Port 1 9600 baud (Fixed), 8 data K–Sequence (Slave), DirectNET (Slave), MODBUS (Slave)
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
Programming cable type D2–DSCBL
Operating Temperature 32 to 131° F (0 to 55 C)
Storage Temperature –4 to 158° F (–20 to 70 C)
Relative Humidity 5 to 95% (non-condensing)
Environmental air No corrosive gases permitted
Vibration MIL STD 810C 514.2
Shock MIL STD 810C 516.2
Noise Immunity NEMA ICS3–304
Terminal Type Removable
Wire Gauge One AWG16 or two AWG18, AWG24 minimum
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–29
Chapter 2: Installation, Wiring, and Specifications
LOGIC 06
K oyo
Points
16
0.5 A Y0 - Y7 DC
12 Supply
Y10 - Y17
8
0
0 10 20 30 40 50 50˚C
32 50 68 86 104 122 122˚C
Ambient Temperature ( ˚C/ ˚F)
17-240
VAC
To LED
High Speed Inputs (X0-X3) Standard Inputs (X4-X23) Equivalent Output Circuit
2–30 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DC Input Specifications
Parameter High–Speed Inputs, X0 – X3 Standard DC Inputs X4 – X23
Input Voltage Range 10.8 – 26.4 VDC 10.8 – 26.4 VDC
Operating Voltage Range 12 – 24 VDC 12 – 24 VDC
Maximum Voltage 30 VDC (7 kHz maximum frequency) 30 VDC
Minimum Pulse Width 70 µS N/A
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC
Input Impedance 1.8 k @ 12 – 24 VDC 2.8 k @ 12 – 24 VDC
Minimum ON Current >5 mA >4 mA
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 µS 2 – 8 mS, 4 mS typical
ON to OFF Response <70 µS 2 – 8 mS, 4 mS typical
Status Indicators Logic side Logic side
Commons 4 channels / common x 5 bank (isolated)
AC Output Specifications
Output Voltage Range (Min. - Max.) 15 – 264 VAC, 47 – 63 Hz
Operating Voltage 17 – 240 VAC, 47 – 63 Hz
On Voltage Drop 1.5 VAC @> 50mA, 4 VAC @< 50mA
Max Current 0.5 A / point, 1.5 A / common
Max leakage current < 4 mA @ 264 VAC, 60Hz
Max inrush current 10 A for 10 mS
Minimum Load 10 mA
OFF to ON Response 1 mS
ON to OFF Response 1 mS +1/2 cycle
Status Indicators Logic Side
Commons 4 channels / common x 4 banks (isolated)
Fuses None (external recommended)
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–31
Chapter 2: Installation, Wiring, and Specifications
fuse
-
+24 VDC
+
L L L L L L L L L L L L L L L L
LOGIC 06
K oyo
DC
Supply
COM
2–32 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–33
Chapter 2: Installation, Wiring, and Specifications
LOGIC 06
K oyo
0
0 10 20 30 40 50 50˚C DC
32 50 68 86 104 122 122˚C
Supply
Ambient Temperature ( ˚C/ ˚F)
Optical
+V +V common. Note the
Input
Isolator +V requirement for external
+ To LED
+
power.
– 24VDC
-
Common Output
L To LED
Optical
Isolator
Common
2–34 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–35
Chapter 2: Installation, Wiring, and Specifications
LOGIC 06
K oyo
0
0
32
10
50
20
68
30
86
40
104
50
122
50˚C
122˚C
DC Input Point Wiring
Supply
Ambient Temperature ( ˚C/ ˚F)
+V
+V +V +V L
Optical
Isolator
Output
Input Optical
+ To LED Isolator
Input
– To LED
+
Common Common
– To LED
Common
6–27 VDC
6–240 VAC
2–36 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DC Input Specifications
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
Operating Voltage Range 12 -24 VDC 12 -24 VDC
Peak Voltage 30 VDC (7 kHz maximum frequency) 30 VDC
Minimum Pulse Width 70 µs N/A
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC
Input Impedance 1.8 k @ 12 – 24 VDC 2.8 k @ 12 – 24 VDC
Max. Input Current 6mA @12VDC 13mA @24VDC 4mA @12VDC 8.5mA @24VDC
Minimum ON Current >5 mA >4 mA
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 µs 2 – 8 mS, 4 mS typical
ON to OFF Response <70 µs 2 – 8 mS, 4 mS typical
Status Indicators Logic side Logic side
Commons 4 channels / common x 5 banks (isolated)
LOGIC 06
K oyo
DC
Supply
+V Internal module circuitry +V
+V +
Optical 24VDC Optical
Isolator Isolator
Input L
OUTPUT
+ To LED
– + 6–27
VDC
Common To LED
COM
0
– + 6–27
0 10 20 30 40 50 50˚C
Common 32 50 68 86 104 122 122˚C VDC
Ambient Temperature ( ˚C/ ˚F)
COM
2–38 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–39
Chapter 2: Installation, Wiring, and Specifications
Points
16
12
2.0A Y0 - Y7 LOGIC 06
K oyo
Y10 - Y17
8
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
4
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
0
0 10 20 30 40 50 50˚C
32 50 68 86 104 122 122˚C
Ambient Temperature ( ˚C/ ˚F)
Inputs are organized into five banks of four. Each bank has an isolated common terminal, and
may be wired as either sinking or sourcing inputs. The wiring example above shows all
commons connected together, but separate supplies and common circuits may be used.
Outputs are organized into four banks of four normally-open relay contacts. Each bank has a
common terminal. The wiring example above shows all commons connected together, but
separate supplies and common circuits may be used. The equivalent output circuit shows one
channel of a typical bank. The relay contacts can switch AC or DC voltages.
+V +V
Internal module circuitry
+V Optical
Isolator +V
Optical Input L
Isolator To LED
Input + Output
+ To LED
–
– Common
Common
Common
To LED
6–27 VDC
6–240 VAC
High-speed Input Circuit (X0-X3) Standard Input Circuit (X4-X23)
Standard Output Circuit
2–40 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
DC Input Specifications
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
Operating Voltage Range 12 -24 VDC 12 -24 VDC
Peak Voltage 30 VDC (7 kHz maximum frequency) 30 VDC
Minimum Pulse Width 70 µs N/A
ON Voltage Level > 10 VDC > 10 VDC
OFF Voltage Level < 2.0 VDC < 2.0 VDC
Input Impedance 1.8 k @ 12 – 24 VDC 2.8 k @ 12 – 24 VDC
Max. Input Current 6mA @12VDC 13mA @24VDC 4mA @12VDC 8.5mA @24VDC
Minimum ON Current >5 mA >4 mA
Maximum OFF Current < 0.5 mA <0.5 mA
OFF to ON Response <70 µs 2 – 8 mS, 4 mS typical
ON to OFF Response < 70 µs 2 – 8 mS, 4 mS typical
Status Indicators Logic side Logic side
Commons 4 channels / common x 5 banks (isolated)
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–41
Chapter 2: Installation, Wiring, and Specifications
D0-10ND3
10-point DC input module
D0-10ND3 Specifications
Number of Inputs 10 (sink/source)
Input Voltage Range 10.8-26.4VDC
Operating Voltage Range 12-24VDC
Peak Voltage 30.0VDC
Typical:4.0mA @ 12VDC
Input Current 8.5mA @ 24VDC
Maximum Input Current 11mA @ 26.4VDC
Input Impedance 2.8Kq @ 12-24VDC
On Voltage Level > 10.0 VDC
Off Voltage Level < 2.0 VDC
Minimum ON Current 3.5mA
Minimum OFF Current 0.5mA
Off to On Response 2-8ms, Typ. 4ms
On to Off Response 2-8ms, Typ. 4ms
Module activity:
Status Indicators one green LED
Commons 2 non-isolated
Fuse No fuse
Base Power Required Typical. 35mA (all pts. ON)
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
2–42 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
Derating chart
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–43
Chapter 2: Installation, Wiring, and Specifications
D0-10TD1
10-point DC output module
D0-10TD1 Specifications
Number of Outputs 10 (sinking)
Operating Voltage Range 6-27VDC
Output Voltage Range 5-30VDC
Peak Voltage 50.0VDC
0.3A/point
Maximum Output Current 1.5A/common
Minimum Output Current 0.5mA
ON Voltage Drop 0.5.VDC @0.3A
Maximum Leakage Current 15µA @ 30.0VDC
Maximum Inrush Current 1A for 10ms
OFF to ON Response <10µs
ON to OFF Response <60µs
Module activity:
Status Indicators one green LED
2 non-isolated
Commons (5 points/common)
Fuse No fuse
Max. 150mA
Base Power Required (5V) (All pts. on)
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
Derating chart
Equivalent output circuit
2–44 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–45
Chapter 2: Installation, Wiring, and Specifications
D0-10TD2
10-point DC output module
D0-10TD2 Output Specifications
Number of Outputs 10 (sourcing)
Operating Voltage Range 12-24VDC
Output Voltage Range 10.8-26.4VDC
Peak Voltage 50.0VDC
0.3A/point
Maximum Output Current 1.5A/common
Minimum Output Current 0.5mA
ON Voltage Drop 1.0.VDC @0.3A
Maximum Leakage Current 1.5µA @ 30.0VDC
Maximum Inrush Current 1A for 10ms
OFF to ON Response <10µs
ON to OFF Response <60µs
Module activity:
Status Indicators one green LED
2 non-isolated
Commons (5 points/common)
Fuse No fuse
Max. 150mA
Base Power Required (5V) (All pts. On)
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
2–46 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
Derating chart
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–47
Chapter 2: Installation, Wiring, and Specifications
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
2–48 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
D0-08TR Specifications
Outputs per module 8
Operating voltage range 6-27 VDC/6-240 VAC
Output type Relay, form A, SPST
Peak voltage 30.0 VDC/264 VAC
Maximum current (resistive) 1 A/point, 4 A/common
Minimum load current 0.5mA
Maximum leakage current 0.1 mA @ 264 VAC
ON voltage drop N/A
Maximum inrush current Output: 3A for 10 ms Common: 10A for 10 ms
ON to OFF response < 10 ms
OFF to ON response < 15 ms
Status indicators Module acitivity: one green LED
Commons 2 isolated. (4 points/common)
Fuse N/A
Max. 280 mA
Base power required (5V) (all points ON)
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–49
Chapter 2: Installation, Wiring, and Specifications
D0-08CDD1
4-point DC input and 4-point relay output module
Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly.
2–50 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 2: Installation, Wiring, and Specifications
I/O Addressing
Module I/O Points and Addressing
Each option module has a set number of I/O points. This holds true for both the discrete
modules and the analog modules. The following chart shows the number of I/O points per
module when used in the DL06.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 2–51
HIGH-SPEED INPUT AND CHAPTER
PULSE OUTPUT FEATURES
3
2
In This Chapter
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–2
Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . . .3–4
Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–7
Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–24
Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–38
Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .3–64
Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–69
Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . .3–73
Chapter 3: High-speed Input and Pulse Output Features
Introduction
Built-in Motion Control Solution
Many machine control applications require various
types of simple high-speed monitoring and control.
These applications usually involve some type of motion
control, or high-speed interrupts for time-critical
events. The DL06 Micro PLC solves this traditionally
expensive problem with built-in CPU enhancements.
Let’s take a closer look at the available high-speed I/O
features.
The available high-speed input features are:
• High Speed Counter (7 kHz max.) with up to 24 counter presets and built-in interrupt subroutine,
counts up only, with reset
• Quadrature encoder inputs to measure counts and clockwise or counter clockwise direction (7 kHz
max.), counts up or down, with reset
• High-speed interrupt inputs for immediate response to critical or time-sensitive tasks
• Pulse catch feature to monitor one input point, having a pulse width as small as 100µs (0.1ms)
• Programmable discrete filtering (both on and off delay up to 99ms) to ensure input signal integrity
(this is the default mode for inputs X0–X3)
The available pulse output features are:
• Single-axis programmable pulse output (10 kHz max.) with three profile types, including
trapezoidal moves, registration, and velocity control
Availability of HSIO Features
IMPORTANT: Please note the following restrictions on availability of features:
• High-speed input options are available only on DL06s with DC inputs.
• Pulse output options are available only on DL06s with DC outputs.
• Only one HSIO feature may be in use at one time. You cannot use a high–speed input feature and
the pulse output at the same time.
Specifications
DL06 Part Number Discrete Input Type Discrete Output Type High-Speed Input Pulse Output
D0–06AA AC AC No No
D0–06AR AC Relay No No
D0–06DA DC AC Yes No
D0–06DD1 DC DC Yes Yes
D0–06DD2 DC DC Yes Yes
D0–06DR DC Relay Yes No
D0–06DD1–D DC DC Yes Yes
D0–06DR–D DC Relay Yes No
3–2 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
DL06
PLC Output Circuit
Y0, Y1 Y2 - Y17
High-Speed CPU
I/O Circuit
X0 - X3 X4 - X23
Input Circuit
20 Discrete Inputs
The high-speed I/O circuit (HSIO) is dedicated to the first four inputs (X0 – X3) and the
first two outputs (Y0 – Y1). We might think of this as a “CPU helper”. In the default
operation (called “Mode 60”) the HSIO circuit just passes through the I/O signals to or from
the CPU, so that all twenty inputs behave equally and all sixteen outputs behave equally.
When the CPU is configured in any other HSIO Mode, the HSIO circuit imposes a
specialized function on the portion of inputs and outputs shown. The HSIO circuit operates
independently of the CPU program scan. This provides accurate measurement and capturing of
high-speed I/O activity while the CPU is busy with ladder program execution.
Wiring Diagrams for Each HSIO Mode
After choosing the appropriate HSIO mode for your application, you’ll need to refer to the
section in this chapter for that specific mode. Each section includes wiring diagrams to help
you connect the High-Speed I/O points correctly to field devices. An example of the
quadrature counter mode diagram is shown below.
C0 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
Signal
– + Signal Common
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–3
Chapter 3: High-speed Input and Pulse Output Features
In choosing one of the six high-speed I/O modes, the I/O points listed in the table below
operate only as the function listed. If an input point is not specifically used to support a
particular mode, it usually operates as a filtered input by default. Similarly, output points
operate normally unless Pulse Output mode is selected.
3–4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Up/Down counter
(Standard counting) Up Counting Down Counting Reset,
Pulse Input or
20 Pulse Input or
Filtered Input
Regular Output Regular Output
Up/Down counter Phase A Input Phase B Input Filtered Input
(Quadrature counting)
Pulse Input or Pulse Input or Pulse Input or Pulse Input or Pulse or Direction or
30 Pulse Output Filtered Input Filtered Input Filtered Input Filtered Input CW Pulse CCW Pulse
Interrupt, Interrupt, Interrupt,
40 High-Speed Interrupt Interrupt Pulse Input or Pulse Input or Pulse Input or Regular Output Regular Output
Filtered Input Filtered Input Filtered Input
Pulse Input, Pulse Input, Pulse Input,
50 Pulse Catch Pulse Input Interrupt or Interrupt or Interrupt or Regular Output Regular Output
Filtered Input Filtered Input Filtered Input
60 Filtered Input Filtered Input Filtered Input Filtered Input Filtered Input Regular Output Regular Output
Default Mode
Mode 60 (Filtered Inputs) is the default mode. The DL06 is initialized to this mode at the
factory, and any time you initialize the scratchpad memory. In the default condition, X0–X3
are filtered inputs (10 mS delay) and Y0–Y1 are standard outputs.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–5
Chapter 3: High-speed Input and Pulse Output Features
CPU
I/O Data
High-Speed V-Memory
I/O Circuit Mode Select
V7633 xxxx
X0 - X3 X4 - X23
Input Circuit
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.
0 0 5 0
Bits 0 – 7 define the mode number 00, 10.. 60 previously referenced in this chapter. The
example data “2050” shown selects Mode 50 – Pulse Catch (BCD = 50).
Configuring Inputs X0 – X3
In addition to configuring V7633 for the HSIO mode, you’ll V-Memory
need to program the next four locations in certain modes Mode V7633 xxxx
according to the desired function of input points X0 – X3. X0 V7634 xxxx
Other memory locations may require configuring, depending on X1 V7635 xxxx
the HSIO mode (see the corresponding section for particular X2 V7636 xxxx
HSIO modes).
X3 V7637 xxxx
3–6 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
HSIO CPU
I/O data
Counter 1 Counter 2 V-memory
Filter Mode Select
CLK Reset CLK Reset V7633 0010
X0 X2 X1 X3 X4 - X23
Input Circuit
Instead of using X2 and X3 as dedicated reset inputs, you can configure X2 and X3 as normal
filtered inputs. In this way, the counter reset must be generated in ladder logic.
HSIO CPU
I/O data
Counter 1 Counter 2 V-memory
Filter Mode Select
CLK Reset CLK Reset V7633 0010
X0 X1 X2 - X3 X4 - X23
Input Circuit
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–7
Chapter 3: High-speed Input and Pulse Output Features
Wiring Diagram
A general wiring diagram for counters/encoders to the DL06 in HSIO Mode 10 is shown
below. Many types of pulse-generating devices may be used, such as proximity switches,
single-channel encoders, magnetic or optical sensors, etc. Devices with sinking outputs (NPN
open collector) are probably the best choice for interfacing. If the counter sources to the
inputs, it must output 12 to 24 VDC. Note that devices with 5V sourcing outputs will not
work with DL06 inputs.
C0 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
Signal
– + Signal Common
In the circuit diagram below, an encoder has open-emitter PNP transistor outputs. It sources
current to the PLC input point, which sinks the current back to ground. Since the encoder
sources current, no additional power supply is required. However, note that the encoder
output must be 12 to 24 volts (5V encoder outputs will not work).
Counter Output
+12 to 24 VDC X0 - X3 Input
Input
(sinking)
Output (sourcing)
:
Ground Common
3–8 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
0 0 1 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor or Data View
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part of
your application program. An example program later in this section shows how to do this.
Presets and Special Relays
Presets are used to cause a particular action to occur when the count reaches the preset value.
Refer to the figure below. Each counter features 24 presets, which you can program. Presets
are double word numbers so they occupy two V-memory registers. The user selects the preset
values, and the counter continuously compares the current count with the preset. When the
two are equal, a special relay contact is energized and program execution jumps to the
interrupt routine.
We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you
desire. After the interrupt service routine is complete, the CPU returns to the ladder program, resuming
program execution from the point of interruption. The compare function is ready for the next preset event.
X0, up counter clock
Counter 1 Current CPU Scan
X2, external reset Reset 1 Value Input
Does = Update
X1, up counter clock Count 1 =
Counter 2 Current
Preset? INT
Value Ladder
X3, external reset Reset 2
Program
Counter 2: Preset Data Execution
HSIO
V3710 0000 1500 Interrupt
V3712 0000 2500 Does Routine
V3632 0000 Data2000
= Current
Counter 1: Preset Count 2 = Program
V3630 Instruction
V3634 0000
0000 1000 2500 Preset? SPxxx
V3632 0000 2000
V3636 0000
V3634 0000 2500 3175 Output
V3636 0000 3175 Update IRT
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–9
Chapter 3: High-speed Input and Pulse Output Features
Event C Event C (A + B + C)
Preset = 150 Preset = 150
Event B Event B (A + B)
Preset = 100 Preset = 100
Event A Event A
Preset = 50 Preset = 50
In the example above, presets are established at 50, 100, and 150. The difference between
absolute and incremental modes is shown. Absolute presets trigger events at the preset values,
50, 100, and 150. Incremental presets trigger events at the cumulative totals: 50, 150, and
300.
3–10 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
OUT
Output this address to Preset Table
V7630, the location of the
V7630 pointer to the Preset data. V2001 V2000 0000 1000
V2003 V2002 0000 2000
Using Fewer than 24 Presets V2005 V2004 0000 2500
When all 24 available presets are used, the CPU V2007 V2006 0000 3175
knows automatically when it reaches the end of the
preset table. When using fewer than 24 presets,
however, it is necessary to signal the CPU that it has
V2077 V2076 0000 0000
reached the last preset. The way to signal the end of
the block of presets is to insert one of the following
“table-end” codes into the next available register pair:
Table-end Code Applicable Mode Meaning
0000 FFFF Absolute and Incremental Signals end of presets
0000 00FF Incremental Signals end of presets and restarts presets. Does not
reset accumulated pulse counts of CT174 or CT176.
0000 FF00 Incremental Signals end of presets, restarts presets and resets
accumulated pulse counts of CT174 or CT176.
As shown in the table above, each of the “table-end” signals has a different meaning. Use the
LDD Kffff instruction to insert the table-end code into the next register pair beyond the
preset table. In the example, four presets are used. The 0000 FFFF in V3641-V3640 indicates
the previous preset was the last preset.
Default Preset Table Example
Load 0000 FFFF V3631 V3630 0000 1000
LDD into accumulator.
Kffff V3633 V3632 0000 2000
Output this value to V3635 V3634 0000 2500
OUT V3640, the register
V3640 V3637 V3636 0000 3175
beyond the Preset Table.
V3641 V3640 0000 FFFF
In absolute mode, the counter and the cumulative total are reset each time a preset is reached.
In incremental mode, you can choose not to reset the counter or the cumulative total, or you
can choose to reset only the counter, or you can choose to reset the counter and the
cumulative total when the table-end code is read. In the example, FFFF has been placed in
V3640 since the last preset was in V3636, and we are using fewer than 24 presets.
NOTE: In incremental mode each successive preset must be greater than the previous preset value. If a
preset value is less than a lower-numbered preset value, the CPU cannot compare to that value,
since the counter can only count upwards.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–11
Chapter 3: High-speed Input and Pulse Output Features
The consecutive addresses shown above for each relay are those assigned by the CPU as
default addresses. The Pointer for the start of these addresses is stored by the CPU at V7630.
If you have a conflict of addresses because of pre-existing code written to these addresses, you
can change the default block of addresses merely by having your ladder logic place a different
pointer value in V7630. To change the table location. use the LDA and OUT instructions as
shown on the previous page.
3–12 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
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
Industrial Lathe
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 B C
PORT1 PORT2 RUN STOP
The timing diagram below shows the duration of each equal relay contact closure. Each
contact remains on until the next one closes. All go off when the counter resets.
Equal Relays A B C
SP540
SP541
SP542
NOTE: Each successive preset must be two numbers greater than the previous preset value. In the
industrial lathe example, B>A+2 and C>B+2.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–13
Chapter 3: High-speed Input and Pulse Output Features
X Input Configuration
The configurable discrete input options for High-Speed Counter Mode are listed in the table
below. Input X0 is dedicated for the first counter clock input. Input X1 can be the clock for
the second counter or a filtered input. The section on Mode 60 operation at the end of this
chapter describes programming the filter time constants. Inputs X2 and X3 can be configured
as the counter resets, with or without the interrupt option. The interrupt option allows the
reset input (X2 and X3) to cause an interrupt like presets do, but there is no SP relay contact
closure (instead, X2 and X3 will be on during the interrupt routine, for 1 scan). Or finally,
X2 and X3 may be left simply as a filtered input.
Input Options
Input Configuration Register Function Hex Code Required
0001 (absolute) (default)
X0 V7634 Counter #1 Clock
0101 (incremental)
0001 (absolute) (default)
Counter #2 Clock
0101 (incremental)
*With the counter reset, you have the option of a normal reset or a faster reset. However, the
fast reset does not recognize changed preset values during program execution. When ‘0007’ or
‘0107’ are set in V7636 or V7637 and preset values are changed during program execution,
the DL06 recognizes the changed preset values at the time of the reset. When ‘0207’ or ‘0307’
are set in V7636 or V7637 the CPU does not check for changed preset values, so the DL06
has a faster reset time.
3–14 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Direct SOFT32
SP1
ENI Required
XX
Enable Input UDC CT174
(or CT176)
XX
Preload Input Kxxxxxxxx
XX
Reset Input Preset Range:
1-99999999
When the enable input is energized, the up/down counter CT174 will respond to pulses on
X0 and increment. The updown counter CT176 will respond to pulses on X1 and increment.
The reset input contact behaves in a logical OR fashion with the physical reset input. X2
(when selected) resets counter 1. X3 (when selected) resets counter 2. So,the high speed
counter can receive a reset form either the contact(s) on the reset rung in the ladder, OR the
external reset X2 or X3, if you have configured X2 or X3 as an external reset.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–15
Chapter 3: High-speed Input and Pulse Output Features
Direct SOFT32
First Scan Only
SP0 Load constant K10 into the accumulator . This
LD selects Mode 10 as the HSIO mode.
K10
3–16 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
SP1
UDC CT176 CT176
always enables the counter. The Preload Input in
SP1 the middle is always of f. The third rung’s Reset
K99999999 input is always off, because we will use the
external reset.
SP1
SP62 Y0
OUT The execution of the above CMPD instruction turns
on special relay contact SP62 if the current count
is greater than the comparison number (K123456).
SP62 Y1
OUT The execution of the above CMPD instruction turns
on special relay contact SP62 if the current count
is greater than the comparison number (K345678).
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–17
Chapter 3: High-speed Input and Pulse Output Features
I/O Counter
X3 - Cutter head extended
Assignments X4 - Cutter head retracted Device
Start
Y0 - Lead screw motor Cutter head Lead screw
Y1 - Cutter head solenoid
Direct SOFT32
SP0 Enable Interrupts before reaching a preset
ENI generates an interrupt. Special Relay SP0 is on
during the first CPU scan.
3–18 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
SP1
UDC CT174 CT174 is the HSIO counter. The first rung’ s SP1
always enables the counter. The preload input in
SP1 the middle is off (unused in this example).
K99999999
SP1
X3 Y1
RST Input X3 energizes when the groove has finished
cutting. So, we retract the cutter head.
X4 Y0
SET Turn lead screw on again, after cutter head has
retracted.
SP540 Preset 1 Y0
RSTI Inside the interrupt service routine, we turn OFF the
lead screw motor immediately .
SP541
Y1 These special “equal” relays turn on individually as
Preset 2 the corresponding preset is reached. In this
SETI application, each results in the cutting of a groove
SP542 (Y1), so they are logically ORed together .
Preset 3
X2 C10
SETI Input X2 will be energized inside the interrupt
routine if X2 external interrupt was the source.
IRT Return from the interrupt service routine.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–19
Chapter 3: High-speed Input and Pulse Output Features
Some applications will require a different type of action at each preset. It is possible for the
interrupt routine to distinguish one preset event from another, by turning on a unique output
for each equal relay contact SPxxx. We can determine the source of the interrupt by
examining the equal relay contacts individually, as well as X2. The X2 contact will be on
(inside the interrupt routine only) if the interrupt was caused by the external reset, X2 input.
3–20 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
DirectSOFT32
SP0 Load constant K10 into the accumulator . This
LD selects Mode 10 as the HSIO mode.
K10
C0
SET Set C0 on at powerup to enable counting.
C0
UDC CT174 CT174 is the HSIO counter. The first rung’s C0
contact enables the counter . The dummy input is in
C1 the middle.
K99999999
C2
The third rung’s Reset input is normally off,
because we will use the external reset. You can
SP0 optionally reset the counter value on each powerup
using the SP0 contact.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–21
Chapter 3: High-speed Input and Pulse Output Features
C1
Generate a preload counter input pulse, which
PD causes the counter to preload from V1174-V1175.
C0 C1 C0
Enable the counter by setting C0, when the
SET preolad pulse on C1 has occurred (C1 is off).
3–22 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–23
Chapter 3: High-speed Input and Pulse Output Features
HSIO CPU
I/O data
Counter V-memory
Filter Mode Select
Phase A Phase B Reset V7633 0020
X0 X1 X2 X3 X4 - X23
Input Circuit
For standard up/down counting, input X0 is dedicated to the up counting signal, and input
X1 is dedicated to the down counting signal. The X2 input resets the counter to zero when
energized.
HSIO CPU
I/O data
Counter V-memory
Filter Mode Select
Up Down Reset V7633 0020
X0 X1 X2 X3 X4 - X23
Input Circuit
3–24 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Clockwise sequence
Phase A
Phase B
Counterclockwise sequence
Phase A
Phase B
K oyo
A
Quadrature Encoder Input
B
LOGIC 06
K oyo
Reset
Up Down
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–25
Chapter 3: High-speed Input and Pulse Output Features
In the next circuit, an encoder has open-emitter PNP transistor outputs. It sources current to
the PLC input point, which sinks the current back to ground. Since the encoder sources
current, no additional power supply is required. However, note that the encoder output must
be 12 to 24 volts (5V encoder outputs will not work).
Encoder Output,
(one phase)
+12 to 24VDC Phase A or B Input
Input
(sinking)
Output (sourcing)
Ground Common
3–26 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
0 0 2 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT’s memory editor
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part
of your application program. An example program later in this section shows how to do this.
Presets and Special Relays
The goal of counting is to cause a particular action to occur when the count reaches a preset
value. Refer to the figure below. Each counter features 24 presets, which you can program. A
preset is a number you select and store so that the counter will continuously compare the
current count with the preset. When the two are equal, a special relay contact is energized and
program execution jumps to the interrupt routine.
We recommend using the special relay(s) in the interrupt service routine to cause any
immediate action you desire. After the interrupt service routine is complete, the CPU returns
to the ladder program, resuming program execution from the point of interruption. The
compare function is ready for the next preset event.
X0, up counter clock
Counter 1 Current CPU Scan
X2, external reset Reset 1 Value Input
Does = Update
X1, up counter clock Count 1 =
Counter 2 Current
Preset? INT
Value Ladder
X3, external reset Reset 2
Program
Counter 2: Preset Data Execution
HSIO
V3710 0000 1500 Interrupt
V3712 0000 2500 Does Routine
V3632 0000 Data2000
= Current
Counter 1: Preset Count 2 = Program
V3630 Instruction
V3634 0000
0000 1000 2500 Preset? SPxxx
V3632 0000 2000
V3636 0000
V3634 0000 2500 3175 Output
V3636 0000 3175 Update IRT
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–27
Chapter 3: High-speed Input and Pulse Output Features
X Input Configuration
The configurable discrete input options for High-Speed Counter Mode are listed in the table
below. The section on Mode 60 operation at the end of this chapter describes programming
the filter time constants.
Mode 20 Up/Down Counter
Configuration
Input Function Hex Code Required
Register
0202 (standard, absolute)
Up counting
0302 (standard, incremental)
0002 (quadrature, absolute) (default)
X0 V7634
0102 (quadrature, incremental)
Phase A
1002 (quadrature, absolute) 4x counting*
1102 (quadrature, incremental) 4x counting*
X1 V7635 Down counting or Phase B 0000
Counter Reset (no interrupt) 0007** (default)
0207**
Counter Reset (with interrupt) 0107**
X2 V7636 0307**
Pulse input 0005
Filtered input xx06 (xx = filter time, 0 - 99ms (BCD)
Pulse input 0005
X3 V7637
Filtered input xx06 (xx = filter time, 0 - 99ms (BCD) (default)
* With this feature, you can count 4 times more with the same encoder.
4x counting 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Normal counting 1 2 3 4
Phase A
Phase B
** With the counter reset you have the option of a normal reset or a faster reset. However, the fast
reset does not recognize changed preset values during program execution. When ‘0007’ or ‘0107’
are set in V7636 and preset values are changed during program execution, the DL06 recognizes the
changed preset values at the time of the reset. When ‘0207’ or ‘0307’ are set in V7636 the CPU
does not check for changed preset values, so the DL06 has a faster reset time.
3–28 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
When the enable input is energized, the counter will respond to quadrature pulses on X0 and
X1, incrementing or decrementing the counter at CT174 – CT175. The reset input contact
behaves in a logical OR fashion with the physical reset input X2. This means the quadrature
counter can receive a reset from either the contact(s) on the reset rung in the ladder, OR the
external reset X2.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–29
Chapter 3: High-speed Input and Pulse Output Features
DirectSOFT32
ENI
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.
K18724
SP1
3–30 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
INT O0
SP541 Y11
Set Y1 to ON when the counter reaches or goes below
OUT our comparison value while COUNTING DOWN.
IRT
The Load Accumulator instructions have set up the V-memory as required, i.e. 20 in V7633
for the mode and 0202 in V7634 to designate the standard up/down with the absolute preset
mode. By placing 0107 in V7636, an external reset for counter CT174 is selected and it will
execute interrupt 0 on the rising edge of the reset. Presets for up/down counting have been
stored in memory locations V3630 through V3635. The next even numbered location
following this has FFFF to indicate we have no more presets.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–31
Chapter 3: High-speed Input and Pulse Output Features
SP0
LD
K20
Mode 20 Up/Down counter
OUT
V7633
LD
K202 Standard counting
Absolute preset mode at X0 and X1
OUT
V7634
LD
K0
Must be zero with mode 20
OUT
V7635
LD
K7
External reset without interrupt (X2)
OUT
V7636
LD
K1006
Discrete filtered input at (X3) 10 ms.
OUT
V7637
SP1
UDC CT174 Up/Down counter
SP1 Only one counter is used with mode 20. The actual
K500 count (32-bit) is stored in V1175/V1174. When pulses
are received at point 00, the value in V1175/V1174
SP1 will decrement.
Actual counts
Y20
V1174 K450 When the pulse count reaches and exceeds 450,
OUT the "over 450" light (Y20) will turn on.
3–32 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Counter output
CT174 TMR
TIMER 0 OUTPUT
TO
K300
Over 500 latch
T0 C5
RST
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–33
Chapter 3: High-speed Input and Pulse Output Features
SP0
LD
K20
Mode 20
OUT
V7633
LD
K2
Quadrature counting
absolute mode at X0 and X1
OUT
V7634
LD
K0
Must be zero
OUT
V7635
LD
K107
External reset w/interrupt (X2)
OUT
V7636
LD
K1006 Discrete filtered input at (X3)
10 ms.
OUT
V7637
SP0
LDD Presets for up counting.
K5000 This rung loads the counter's presets.
In this case, the absolute preset
OUTD mode has been selected.
V3630
LDD
K6000
OUTD
V3632
LDD
K7500
OUTD
V3634
LDD
K8000
OUTD
V3636
LDD
KFFFF Tell CPU that there are
no more presets.
OUTD
V3640
3–34 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Forwarding
Manual start of drilling positioning
process momentary PB. table.
X20 Y30
SET
C1 C1
RST
Drilling sequence Drilling sequence
completed completed
(one hole only). (one hole only).
2nd preset
actual counts.
V1174 V3632 V1174 K6100
3rd preset
actual counts.
V1174 V3634 V1174 K7600
SP1
UDC CT174
SP1
K8388607
SP1
Drill turning.
Y21
SET
Drill fully extended.
Limit switch 1. Drill press down.
X10 Y20
RST
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–35
Chapter 3: High-speed Input and Pulse Output Features
Drill turning.
Y21
RST
END
INT O0
Forwarding
SP540 Positioning Table. Y30
OUT
Forwarding
SP541 Positioning Table. Y30
OUT
Forwarding
SP542 Y30
Positioning Table.
OUT
Forwarding
SP543 Positioning Table. Y30
OUT
Reversing
Positioning
Table.
Y31
SET
IRT
3–36 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–37
Chapter 3: High-speed Input and Pulse Output Features
Drive
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
Amplifier
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
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.
3–38 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
HSIO
SP 104 Profile Complete
CPU
PULSE GEN Y0 Start Profile
Y1 Preload Position Value
X1 Filtered Input
Interrupt FILTER V-memory
Mode select
V7633 xx30
X1 during
Automatic/Step
Trapezoidal Profile X0, X1, X2, X3 X4 - X23
Input Circuit
IMPORTANT NOTE: In Pulse Output Mode, Y0 and Y1 references are redefined or are used differently in
two ways. Physical references refer to terminal screws, while logical references refer to I/O references in
the ladder program. Please read the items below to understand this very crucial point.
Notice the I/O point assignment and usage in the above diagram:
• X0, X1, X2 and X3 can be filtered inputs or pulse inputs in Pulse Output Mode, and they are
available as input contacts to the ladder program.
• X1 behaves as an external interrupt to the pulse generator for automatic/step trapezoidal profiles. In
other profile modes, it can be used as a filtered input or pulse input just like X0 (registration mode
configuration shown above).
• References “Y0” and “Y1” are used in two different ways. At the discrete output connector, Y0 and
Y1 terminals deliver the pulses to the motion system. The ladder program uses logical references Y0
and Y1 to initiate “Start Profile” and “Load Position Value” HSIO functions in Mode 30.
Hopefully, the above discussion will explain why some I/O reference names have dual
meanings in Pulse Output Mode. Please read the remainder of this section with care, to
avoid confusion about which actual I/O function is being discussed.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–39
Chapter 3: High-speed Input and Pulse Output Features
Wiring Diagram
The generalized wiring diagram below shows pulse outputs Y0 and Y1 connected to the drive
amplifier inputs of a motion control system.
Motor
Amplifier
-
+24 VDC
+
Signal Common
Power Input Pulse
Direction
Common – Ground
The following circuit shows how to interface to a sinking drive input using a pullup resistor.
Please refer to Chapter 2 to learn how to calculate and install R pullup.
3–40 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
0 0 3 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to do
this.
Memory Location V3630 (default)
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0
0 7 0 0
3–42 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
* If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on.
**To set a negative number, put 8 in the most significant digit. For example: -8388608 is 88388608 in V3631 and V3632.
Velocity Control
V-Memory Function Range Units
V3630 Velocity Profile 2000 only –
V3631 / 3632 Direction Select 0=CW, 80000000=CCW, Pulses
V3633 Velocity 4 to 1000 x 10 pps
V3636 Error Code (see end of section) –
3–44 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
800
The user determines the starting velocity, the acceleration/deceleration times, and the total
number of pulses. The CPU computes the profile from these inputs.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–45
Chapter 3: High-speed Input and Pulse Output Features
1000
4 Target = 7000 pulses 5
800 positioning velocity = 1000 Hz
3 6
600
2 7
400
1 8
200
100 200 300 400 5000 400 300 200 100
Time
Acceleration Deceleration
0 pulses 1000 pulses 6000 pulses 7000 pulses
Define steps 1 through 4 for gradual acceleration to the target velocity and define steps 5
through 8 for gradual deceleration from the target velocity. This type of profile is appropriate
for applications involving large stepper motors and/or large inertia loads. It can, however, be
used to provide gradual ramping in applications involving smaller motors and loads.
Velocity Control Defined
The Velocity Control defines only the direction and speed of motion. There is no target
position specified, so the move can be of indefinite length. Only the first velocity value needs
to be defined. The remaining velocity values can be created while motion is in progress.
Arrows in the profile shown indicate velocity changes.
800
600
400
200
Time
3–46 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Accel Decel
Starting
Velocity Ending velocity (optional)
Time
Start position Target position
Start
External Interrupt Y0
(Optional) X1
SP104
Profile Complete
The time line of signal traces below the profile indicates the order of events. The HSIO uses
logical output Y0 as the Start input to the HSIO, which starts the profile. Immediately the
HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the
progress of the move. Typically a ladder program will monitor this bit so it knows when to
initiate the next profile move.
You can also use the external interrupt (X1). Once the external interrupt feature is selected for
the profile, the DL06 keeps outputting the pulses until X1 turns on. Then, the DL06 outputs
the pulses defined as the target position.
If you are familiar with motion control, you’ll notice that we do not have to specify the
direction of the move. The HSIO function examines the target position relative to the current
position, and automatically outputs the correct direction information to the motor drive.
Notice that the motion accelerates immediately to the starting velocity. This segment is useful
in stepper systems so we can jump past low speed areas when low-torque problems or a
resonant point in the motor might cause a stall. (When a stepper motor stalls, we have lost
the position of the load in open-loop positioning systems). However, it is preferable not to
make the starting velocity too large, because the stepper motor will also “slip” some pulses due
to the inertia of the system. You can also set up the ending velocity for the same reason.
When you need to change the current position value, use logical Y1 output coil to load a new
value into the HSIO counter. If the ladder program loads a new value in CT174/CT175
(V1174/V1175), then energizing Y1 will copy that value into the HSIO circuit counter. This
must occur before the profile begins, because the HSIO ignores Y1 during motion.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–47
Chapter 3: High-speed Input and Pulse Output Features
Time
Start position Target position = 5000
The following program will realize the profile drawn above, when executed. The beginning of
the program contains all the necessary setup parameters for Pulse Output Mode 30. We only
have to do this once in the program, so we use first-scan contact SP0 to trigger the setup.
DirectSOFT32
3–48 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–49
Chapter 3: High-speed Input and Pulse Output Features
Velocity
Registration Profile
Target Velocity
Accel Decel
Starting
Velocity
External Interrupt X1
The time line of signal traces below the profile indicates the order of events. The CPU uses
logical output Y0 to start the profile. Immediately the HSIO turns off the Profile Complete
signal (SP104), so the ladder program can monitor the move’s completion by sensing the
signal’s on state.
3–50 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
The Automatic Trapezoidal profile we want to perform is drawn and labeled in the following
figure. It consists of a non-zero starting velocity, and moderate target velocity.
Time
Start position Target position = 5000
The following program will realize the profile drawn above, when executed. The first program
rung contains all the necessary setup parameters. We only have to do this once in the
program, so we use first-scan contact SP0 to trigger the setup.
DirectSOFT32
SP0 Load constant K30 into the accumulator. This selects
LD Mode 30 as the HSIO mode.
K30
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–51
Chapter 3: High-speed Input and Pulse Output Features
Profile / Target Output this constant to V3630, the location of the Profile
OUT Select / Starting Velocity setup register.
Velocity V3630
Load the constant K5000 which selects a target
Target Position LDD position of 5000 pulses. Don’t forget to use double
K5000 word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
OUTD the Target Position double-word register.
V3631
X3 Y0
SET We use an input to allow the operator to start the
profile. X3 is a momentary Start switch. When the
operator turns X3 ON, logical output Y0 starts the
Profile Complete profile.
SP104 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
occur until after the interrupt from X1 has occurred
PD and the profile is complete.
C0 Y0
RST
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.
3–52 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Limit Switches CCW limit (X0) Home limit (X1) CW limit (X2)
Motion
Numbering System -3000 -2000 -1000 0 1000 2000 3000
In the drawing above, the load moves left or right depending on the CW/CCW direction of
motor rotation. The PLC ladder program senses the CW and CCW limit switches to stop the
motor, before the load moves out-of-bounds and damages the machine. The home limit
switch is used at powerup to establish the actual position. The numbering system is arbitrary,
depending on a machine’s engineering units.
At powerup, we do not know whether the load is located to the left or to the right of the
home limit switch. Therefore, we will initiate a home search profile, using the registration
mode. The home limit switch is wired to X1, causing the interrupt. We choose an arbitrary
initial search direction, moving in the CW (left-to-right) direction.
• If the home limit switch closes first, then we stop and initialize the position (this value is typically
“0”, but it may be different if preferred).
• However, if the CW limit switch closes first, we must reverse the motor and move until the home
limit switch closes, stopping just past it.
In the latter case, we repeat the first move, because we always need to make the final approach
to the home limit switch from the same direction, so that the final physical position is the same
in either case!
Direct SOFT32 Filtered Inputs
SP0 Selects Mode 30 as The constant K2006
LD the HSIO mode. LD selects a 20 mS filter
K30 K2006 time constant.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–53
Chapter 3: High-speed Input and Pulse Output Features
C1
The CW limit has
SET been reached.
The home search profile will execute specific parts of the program, based on the order of
detection of the limit switches. Ladder logic sets C0 to initiate a home search in the CW
direction. If the CW limit is encountered, the program searches for home in the CCW
direction, passes it slightly, and does the final CW search for home. After reaching home, the
last ladder rung preloads the current position to “0”.
3–54 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Time
Start position
Start
External Interrupt Y0
(Optional) X1
SP104
Profile Complete
The time line of signal traces below the profile indicates the order of events. The HSIO uses
logical output Y0 as the start input to the HSIO, which starts the profile. Immediately, the
HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the
progress of the move. Typically, a ladder program will monitor this bit so it knows when to
initiate the next profile move. You can also use the external interrupt (X1). Once the external
interrupt feature selected for the profile, the DL06 keeps outputting the pulses until X1 turns
on. Then the DL06 outputs the pulses defined as the target position.
Each acceleration and deceleration slope consists of 4 steps. You can set up the velocity and
the distance (number of pulses) of each step. You 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
the 3rd and 4th step. If the acceleration slope and the deceleration slope are identical, you can
just put zero into all the velocity and the distance parameters for the deceleration slope.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–55
Chapter 3: High-speed Input and Pulse Output Features
OUT
V7636 Output this constant to V7636, configuring X2.
3–56 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Program
Example SP0 Load the constant K20 which is required to select
LD the step 1 acceleration velocity of 200 Hz.
K20
Step 1 Acceleration Output this constant to V3633, the location of the
OUT step 1 acceleration velocity setup register.
V3633
Load the constant K100 which selects the step 1
LD distance of 100 pulses.
Step 1 Distance K100
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–57
Chapter 3: High-speed Input and Pulse Output Features
Continued from previous page
Program
Example SP0 Load the constant K400 which selects the step 5
LD distance of 400 pulses.
K400
Step 5 Distance Output this constant to V3644, the location of
OUT the step 5 distance.
V3644
Load the constant K60 which is required to select
LD the step 6 deceleration velocity of 600 Hz.
Step 6 Deceleration K60
X0 Load
LDD value.
K0
3–58 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Velocity
Time
Start Y0
Profile
Complete SP104
The time line of signal traces below the profile indicates the order of events. Assuming the
velocity is set greater than zero, motion begins when the Start input (Y0) energizes. Since
there is no end position target, the profile is considered in progress as long as the Start input
remains active. The profile complete logical input to ladder logic (X0) correlates directly to
the Start input status when velocity profiles are in use.
While the Start input is active, the ladder program can command a velocity change by writing
a new value to the velocity register (V3633 by default). The full speed range of 40 Hz to 10
kHz is available. Notice from the drawing that there are no acceleration or deceleration ramps
between velocity updates. This is how velocity profiling works with the HSIO. However, the
ladder program can command more gradual velocity changes by incrementing or
decrementing the velocity value more slowly. A counter or timer can be useful in creating
your own acceleration/deceleration ramps. Unless the load must do a very complex move, it is
easier to let the HSIO function generate the accel/decel ramps by selecting the trapezoidal or
registration profiles instead.
Unlike the trapezoidal and registration profiles, you must specify the desired direction of
travel with velocity profiles. Load the direction select register (V3631/V3632 by default) with
8000 0000 hex for CCW direction, or 0 for CW direction.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–59
Chapter 3: High-speed Input and Pulse Output Features
Time
The following program uses dedicated discrete inputs to load in new velocity values. This
program is fun to try, because you can create an infinite variety of profiles with just two or
three input switches. The intent is to turn on only one of X2, X3, or X4 at a time. The
beginning of the program contains all the necessary setup parameters for Pulse Output Mode
30. We only have to do this once in the program, so we use first-scan contact SP0 to trigger
the setup.
DirectSOFT32
3–60 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Profile / Target Output this constant to V3630, the location of the Profile
OUT Select setup register .
Velocity V3630
Load the constant K80000000 which selects CCW
Select Direction LDD direction for Velocity Profiles. Don’t forget to use double
K80000000 word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
OUTD the Target Position double-word register .
V3631
Start Profile
X1 Y0
OUT We use a spare filtered input to allow the operator
to start the profile. When the operator turns X1 ON
and leaves it on, logical output Y0 starts the profile.
Go Slow
X2 Load the constant K50 which is required to select a
LD velocity of 500 pps when the operator closes X2.
K50
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–61
Chapter 3: High-speed Input and Pulse Output Features
3–62 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
4. Wiring – Verify the wiring to the stepper motor is correct. Remember the signal ground
connection from the PLC to the motion system is required.
5. Motion system – Verify that the drive is powered and enabled. To verify the motion system is
working, you can use Mode 60 operation (normal PLC inputs/outputs) as shown in the test
program below. With it, you can manually control Y0 and Y1 with X0 and X1, respectively. Using
an input simulator is ideal for this type of manual debugging. With the switches you can single-
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.
DirectSOFT32
SP0 Load constant K60 into the accumulator. This
LD selects Mode 60 as the HSIO mode.
K60
X0 Y0
OUT Use a switch on X0 input to manually control output Y0.
X1 Y1
OUT Use a switch on X1 input to manually control output Y1.
6. Memory Error – HSIO configuration parameters are stored in the CPU system memory.
Corrupted data in this memory area can sometimes interfere with proper HSIO operation. If all
other corrective actions fail, initializing the scratchpad memory may solve the problem. With
DirectSOFT32, select the PLC menu, then Setup, then Initialize Scratchpad.
Symptom: The motor turns in the wrong direction.
Possible causes:
1. Wiring – If you have selected CW and CCW type operation, just swap the wires on Y0 and Y1
outputs.
2. Direction control – If you have selected Pulse and Direction type operation, just change the
direction bit to the opposite state.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–63
Chapter 3: High-speed Input and Pulse Output Features
Input Circuit
Alternately, you may configure the HSIO circuit to generate interrupts based on a timer, as
shown below. In this configuration, inputs X0 is a filtered input.
Input Circuit
3–64 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
0 0 4 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to do
this.
Interrupts and the Ladder Program
Refer to the drawing below. The source of the interrupt may be external (X0 - X3). An
internal timer can be used instead of X0 as the interrupt source. The setup parameter in
V7634 serves a dual purpose:
• It selects between the two interrupt sources (external or internal timer). The timed interrupt can
only be used with X0.
• In the case of the timer interrupt, it programs the interrupt timebase between 5 and 999 mS.
The resulting interrupt uses label INT 0, 1, 2 or 3 in the ladder program. Be sure to include
the Enable Interrupt (ENI) instruction at the beginning of your program. Otherwise, the
interrupt routine will not be executed.
CPU Scan
Input
Update
Ladder INT
X0, External Interrupt Program
Execution
Interrupt
Routine
TIMER Current Program
Instruction
Interrupt source / IRT
Time select Input
Update
V7634 xxx4
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–65
Chapter 3: High-speed Input and Pulse Output Features
0.1 mS minimum
External
Interrupt X0
Time
If you are only using one of the points for an interrupt, you may want to select a different main
mode (i.e. 10, 20, 30, 50, or 60); and then, just configure one of the terminals not taken as an
interrupt. For example, you might want to configure your CPU for the UP counter mode (Mode
10) and use point 03 for a high speed interrupt. You should read the individual sections for any
alternate mode you might choose. There you will find instructions on how to select a high speed
interrupt as a secondary feature.
3–66 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Y6
RST Reset output Y6.
Main Program
END END coil marks the end of the main program..
Interrupt Routine Insert interrupt service routine rungs here for your
application.
SP1 Y5
SETI Set output Y5
INT O1
Interrupt Routine Insert interrupt service routine rungs here for your
application.
SP1 Y6
SETI Set output Y6.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–67
Chapter 3: High-speed Input and Pulse Output Features
Direct SOFT32
3–68 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Latch Latch
or V-memory
Filter Mode select
Set Reset V7633 0050
Input Circuit
0.1 mS minimum
Pulse
Input X0
Time
Note: that the pulse catch and filtered input functions are opposite in nature. The pulse catch feature seeks
to capture narrow pulses, while the filter input feature seeks to reject narrow pulses.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–69
Chapter 3: High-speed Input and Pulse Output Features
X0
SP100
The status relay for X0 is SP100. The other status relays are shown in the table below.
0 0 5 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to do
this.
3–70 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
X Input Configuration
The configurable discrete input options for Pulse Catch Mode are listed in the table below.
Each input has its own configuration register and filter time constant.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–71
Chapter 3: High-speed Input and Pulse Output Features
Direct SOFT32
Main Program
SP100 Y0
SET Use the pulse catch input to set output Y0 on. This will
work even for a very short pulse on X0.
SP101 Y1
SET Use the pulse catch input to set output Y1 on. This will
work even for a very short pulse on X1.
3–72 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
FILTERS X0-X3
V-memory
Mode select
V7633 0060
X0 X1 X2 X3 X4-X23
Input Circuit
Physical Input X0
Logical Input X0
Time
Physical Input X0
Logical Input X0
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–73
Chapter 3: High-speed Input and Pulse Output Features
0 0 6 0
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
• DirectSOFT32’s memory editor
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral
part of your application program. An example program later in this section shows how to to
this.
X Input Configuration
The configurable discrete input options for Discrete Filtered Inputs Mode are listed in the
table below. The filter time constant (delay) is programmable from 0 to 99 mS (the input acts
as a normal discrete input when the time constant is set to 0). The code for this selection
occupies the upper byte of the configuration register in BCD. We combine this number with
the required “06” in the lower byte to get “xx06”, where xx = 0 to 99. Input X0, X1, X2, and
X3 can only be filtered inputs. Each input has its own configuration register and filter time
constant.
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)
X3 V7637 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
3–74 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 3: High-speed Input and Pulse Output Features
Direct SOFT32
Main Program Insert Main Program rungs here for your application.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 3–75
CPU SPECIFICATIONS AND CHAPTER
OPERATION
4
In This Chapter
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–2
CPU Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–3
CPU Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–4
Using Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–8
CPU Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–12
I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–17
CPU Scan Time Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . .4–20
Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–25
DL06 System V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–29
Control Relay Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–35
Timer Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–37
Counter Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–37
Remote I/O Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–38
Module Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–42
Power Budgeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–44
Configuring the DL06’s Comm Ports . . . . . . . . . . . . . . . . . . . . . . .4–46
Connecting to MODBUS and DirectNET Networks . . . . . . . . . . . .4–48
MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–48
Non–Sequence Protocol (ASCII In/Out and PRINT) . . . . . . . . . . . .4–50
Network Slave Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–51
Network Master Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–56
Network Master Operation (using MRX and MWX Instructions) . .4–60
Chapter 4: CPU Specifications and Operation
Introduction
The Central Processing Unit (CPU) is the heart of the Micro PLC. Almost all PLC
operations are controlled by the CPU, so it is important that it is set up correctly. This
chapter provides the information needed to understand:
• Steps required to set up the CPU
• Operation of ladder programs
• Organization of Variable Memory
Power
Input 16 Discrete Outputs
Power 4 Optional
Supply CPU card slots
Isolation
boundary
Input circuit 2 comm. ports
To programming device
20 discrete Inputs or Operator interface
Note: The High-Speed I/O function (HSIO) consists of dedicated but configurable hardware in the DL06. It
is not considered part of the CPU, because it does not execute the ladder program. For more on
HSIO operation, see Chapter 3.
4–2 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
CPU Specifications
Specifications
Feature DL06
Total Program memory (words) 14.8K
Ladder memory (words) 7680
Total V-memory (words) 7616
User V-memory (words) 7488
Non-volatile V Memory (words) 128
Contact execution (boolean) 2.0uS
Typical scan (1k boolean) 3 - 4mS
RLL Ladder style Programming Yes
RLL and RLLPLUS Programming Yes
Run Time Edits Yes
Scan Variable / fixed
Handheld programmer Yes
DirectSOFT32 programming for Windows. Yes
Built-in communication ports (RS232C) Yes
FLASH Memory Standard on CPU
Local Discrete I/O points available 36
Local Analog input / output channels maximum None
High-Speed I/O (quad., pulse out, interrupt, pulse catch, etc.) Yes, 2
I/O Point Density 20 inputs, 16 outputs
Number of instructions available (see Chapter 5 for details) 229
Control relays 1024
Special relays (system defined) 512
Stages in RLLPLUS 1024
Timers 256
Counters 128
Immediate I/O Yes
Interrupt input (external / timed) Yes
Subroutines Yes
For/Next Loops Yes
Math (Integer and floating point) Yes
Drum Sequencer Instruction Yes
Time of Day Clock/Calendar Yes
Internal diagnostics Yes
Password security Yes
System error log Yes
User error log Yes
Optional D2-BAT-1 available
Battery backup (not included with unit)
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–3
Chapter 4: CPU Specifications and Operation
4–4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
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
The Handheld programmer D2-HPP is connected to the CPU with a handheld programmer
cable. This device is ideal for maintaining existing installations or making small program
changes. The handheld programmer is shipped with a cable, which is approximately 6.5 feet
(200 cm) long.
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.
TERM For replacement
PORT1 PORT2 RUN STOP cable, use part no.
DV–1000CBL
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–5
Chapter 4: CPU Specifications and Operation
status indicators
G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17
PWR
AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. RUN
OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA CPU
Y D0-06DR TX1
RX1
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA
LOGIC 06
K oyo
Status Indicators
The status indicator LEDs on the CPU front panels have specific functions which can help in
programming and troubleshooting.
Mode Switch Functions
The mode switch on the DL06 PLC provides positions for enabling and disabling program
changes in the CPU. Unless the mode switch is in the TERM position, RUN and STOP
mode changes will not be allowed by any interface device, (handheld programmer,
DirectSOFT32 programming package or operator interface). Programs may be viewed or
monitored but no changes may be made. If the switch is in the TERM position and no
program password is in effect, all operating modes as well as program access will be allowed
through the connected programming or monitoring device.
4–6 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
MODE
Menu Options Key
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–7
Chapter 4: CPU Specifications and Operation
Battery door
WARNING: Do not attempt to recharge the battery or dispose of an old battery by fire. The battery may
explode or release hazardous materials.
4–8 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Auxiliary Functions
Many CPU setup tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions
perform many different operations, ranging from clearing ladder memory, displaying the scan
time, copying programs to EEPROM in the handheld programmer, etc. They are divided into
categories that affect different system parameters. Appendix A provides a description of the
AUX functions.
You can access the AUX Functions from DirectSOFT32 or from the D2–HPP Handheld
Programmer. The manuals for those products provide step-by-step procedures for accessing
the AUX Functions. Some of these AUX Functions are designed specifically for the Handheld
Programmer setup, so they will not be needed (or available) with the DirectSOFT32 package.
The following table shows a list of the Auxiliary functions for the Handheld Programmer.
AUX 2* — RLL Operations
21 Check Program 58 Test Operations
22 Change Reference 59 Override Setup
23 Clear Ladder Range 5B HSIO Configuration
24 Clear All Ladders 5C Display Error History
AUX 3* — V-Memory Operations 5D Scan Control Setup
31 Clear V Memory AUX 6* — Handheld Programmer Configuration
AUX 4* — I/O Configuration 61 Show Revision Numbers
41 Show I/O Configuration 62 Beeper On / Off
42 I/O Diagnostics 65 Run Self Diagnostics
44 Power Up I/O Configuration check AUX 7* — EEPROM Operations
45 Select Configuration 71 Copy CPU memory to HPP EEPROM
46 Configure I/O 72 Write HPP EEPROM to CPU
AUX 5* — CPU Configuration 73 Compare CPU to HPP EEPROM
51 Modify Program Name 74 Blank Check (HPP EEPROM)
52 Display/Change Calendar 75 Erase HPP EEPROM
53 Display Scan Time 76 Show EEPROM Type (CPU and HPP)
54 Initialize Scratchpad AUX 8* — Password Operations
55 Set Watchdog Timer 81 Modify Password
56 Set Communication Port 2 82 Unlock CPU
57 Set Retentive Ranges 83 Lock CPU
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–9
Chapter 4: CPU Specifications and Operation
WARNING: You may never have to use this feature unless you want to clear any setup information
that is stored in system memory. Usually, you’ll only need to initialize the system
memory if you are changing programs and the old program required a special system
setup. You can usually load in new programs without ever initializing system memory.
Remember, this AUX function will reset all system memory. If you have set special parameters
such as retentive ranges, etc. they will be erased when AUX 54 is used. Make sure that you
have considered all ramifications of this operation before you select it.
Setting Retentive Memory Ranges
The DL06 PLCs provide certain ranges of retentive memory by default. The default ranges
are suitable for many applications, but you can change them if your application requires
additional retentive ranges or no retentive ranges at all. The default settings are:
DL06
Memory Area
Default Range Available Range
Control Relays C1000 – C1777 C0 – C1777
V Memory V400 – V37777 V0 – V37777
Timers None by default T0 – T377
Counters CT0 – CT177 CT0 – CT177
Stages None by default S0 – S1777
You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT32. menus to
select the retentive ranges. Appendix A contains detailed information about auxiliary
functions.
WARNING: The DL06 CPUs do not come with a battery. The super capacitor will retain the values in
the event of a power loss, but only for a short period of time, depending on conditions. If
the retentive ranges are important for your application, make sure you obtain the optional
battery.
4–10 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Using a Password
The DL06 PLCs allow you to use a password to help minimize the risk of unauthorized
program and/or data changes. Once you enter a password you can “lock” the PLC against
access. Once the CPU is locked you must enter the password before you can use a
programming device to change any system parameters.
You can select an 8-digit numeric password. The Micro PLCs are shipped from the factory
with a password of 00000000. All zeros removes the password protection. If a password has
been entered into the CPU you cannot just enter all zeros to remove it. Once you enter the
correct password, you can change the password to all zeros to remove the password
protection.
WARNING: Make sure you remember your password. If you forget your password you will not be able to
access the CPU. The Micro PLC must be returned to the factory to have the password (along
with the ladder project) removed.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–11
Chapter 4: CPU Specifications and Operation
CPU Operation
Achieving the proper control for your equipment or process requires a good understanding of
how DL06 CPUs control all aspects of system operation. There are four main areas to
understand before you create your application program:
• CPU Operating System — the CPU manages all aspects of system control. A quick overview of all
the steps is provided in the next section.
• CPU Operating Modes — The two primary modes of operation are Program Mode and Run
Mode.
• CPU Timing — The two important areas we discuss are the I/O response time and the CPU scan
time.
• CPU Memory Map — DL06 CPUs offer a wide variety of resources, such as timers, counters,
inputs, etc. The memory map section shows the organization and availability of these data types.
CPU Operating System
At powerup, the CPU initializes the internal electronic
hardware. Memory initialization starts with examining Power up
the retentive memory settings. In general, the contents
Initialize hardware
of retentive memory is
Initialize various memory
preserved, and non-retentive memory is initialized to based on retentive
zero (unless otherwise specified). configuration
NO
Report error , set flag
register , turn on LED
NO
Fatal error
YES
Force CPU into
PGM mode
4–12 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Program Mode
In Program Mode, the CPU does not execute the application program or update the output
points. The primary use for Program Mode is to enter or change an application program. You
also use program mode to set up the CPU parameters, such as HSIO features, retentive
memory areas, etc.
You can use a programming device, such as
DirectSOFT32 or the D2–HPP Handheld
Programmer to place the CPU in Program
Mode.
Run Mode
In Run Mode, the CPU executes the
application program and updates the I/O
system. You can perform many operations
during Run Mode. Some of these include: Download
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 Program
• 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 RX2
INPUT: 12 - 24V 3 - 15mA
You can also edit the program during Run Solve the Application Program
Mode. The Run Mode Edits are not
“bumpless” to the outputs. Instead, the CPU
Write
Write Outputs
Outputs
maintains the outputs in their last state while it
accepts the new program information. If an
Write Outputs to Specialty I/O
error is found in the new program, then the
CPU will turn all the outputs off and enter the
Diagnostics
Program Mode. This feature is discussed in
more detail in Chapter 9.
WARNING: Only authorized personnel fully familiar with all aspects of the application should make
changes to the program. Changes during Run Mode become effective immediately. Make
sure you thoroughly consider the impact of any changes to minimize the risk of personal
injury or damage to equipment.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–13
Chapter 4: CPU Specifications and Operation
Read Inputs
The CPU reads the status of all inputs, then stores it in the image register. Input image
register locations are designated with an X followed by a memory location. Image register data
is used by the CPU when it solves the application program.
Of course, an input may change after the CPU has just read the inputs. Generally, the CPU
scan time is measured in milliseconds. If you have an application that cannot wait until the
next I/O update, you can use Immediate Instructions. These do not use the status of the
input image register to solve the application program. The Immediate instructions
immediately read the input status directly from the I/O modules. However, this lengthens the
program scan since the CPU has to read the I/O point status again. A complete list of the
Immediate instructions is included in Chapter 5.
Service Peripherals and Force I/O
After the CPU reads the inputs from the input modules, it reads any attached peripheral
devices. This is primarily a communications service for any attached devices. For example, it
would read a programming device to see if any input, output, or other memory type status
needs to be modified. There are two basic types of forcing available with the DL06 CPUs:
• Forcing from a peripheral – not a permanent force, good only for one scan
• Bit Override – holds the I/O point (or other bit) in the current state. Valid bits are X, Y, C, T, CT,
and S. (These memory types are discussed in more detail later in this chapter).
Regular Forcing — This type of forcing can temporarily change the status of a discrete bit.
For example, you may want to force an input on, even though it is really off. This allows you
to change the point status that was stored in the image register. This value will be valid until
the image register location is written to during the next scan. This is primarily useful during
testing situations when you need to force a bit on to trigger another event.
Bit Override — Bit override can be enabled on a point-by-point basis by using AUX 59 from
the Handheld Programmer or, by a menu option from within DirectSOFT32™. Bit
override basically disables any changes to the discrete point by the CPU. For example, if you
enable bit override for X1, and X1 is off at the time, then the CPU will not change the state
of X1. This means that even if X1 comes on, the CPU will not acknowledge the change. So, if
you used X1 in the program, it would always be evaluated as “off ” in this case. Of course, if
X1 was on when the bit override was enabled, then X1 would always be evaluated as “on”.
There is an advantage available when you use the bit override feature. The regular forcing is
not disabled because the bit override is enabled. For example, if you enabled the Bit Override
for Y0 and it was off at the time, then the CPU would not change the state of Y0. However,
you can still use a programming device to change the status. Now, if you use the
programming device to force Y0 on, it will remain on and the CPU will not change the state
of Y0. If you then force Y0 off, the CPU will maintain Y0 as off. The CPU will never update
the point with the results from the application program or from the I/O update until the bit
override is removed. The following diagram shows a brief overview of the bit override feature.
Notice the CPU does not update the Image Register when bit override is enabled.
4–14 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
WARNING: Only authorized personnel fully familiar with all aspects of the application should make
changes to the program. Make sure you thoroughly consider the impact of any changes to
minimize the risk of personal injury or damage to equipment.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–15
Chapter 4: CPU Specifications and Operation
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
area to store the status of the desired action for the PORT1 PORT2 RUN STOP
4–16 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Write Outputs
Once the application program has solved the instruction logic and constructed the output
image register, the CPU writes the contents of the output image register to the corresponding
output points. Remember, the CPU also made sure that any forcing operation changes were
stored in the output image register, so the forced points get updated with the status specified
earlier.
Write Outputs to Specialty I/O
After the CPU updates the outputs in the local and expansion bases, it sends the output point
information that is required by any Specialty modules which are installed.
Diagnostics
During this part of the scan, the CPU performs all system diagnostics and other tasks such as
calculating the scan time and resetting the watchdog timer. There are many different error
conditions that are automatically detected and reported by the DL06 PLCs. Appendix B
contains a listing of the various error codes.
Probably one of the more important things that occurs during this segment is the scan time
calculation and watchdog timer control. The DL06 CPU has a “watchdog” timer that stores
the maximum time allowed for the CPU to complete the solve application segment of the
scan cycle. If this time is exceeded the CPU will enter the Program Mode and turn off all
outputs. The default value set from the factory is 200 ms. An error is automatically reported.
For example, the Handheld Programmer would display the following message “E003 S/W
TIMEOUT” when the scan overrun occurs.
You can use AUX 53 to view the minimum, maximum, and current scan time. Use AUX 55
to increase or decrease the watchdog timer value.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–17
Chapter 4: CPU Specifications and Operation
Field Input
Output
Off/On Delay
In this case, you can calculate the response time by simply adding the following items:
Input Delay + Scan Time + Output Delay = Response Time
Normal Maximum I/O Response
The I/O response time is longest when the input changes just after the Read Inputs portion
of the execution cycle. In this case the new input status is not read until the following scan.
The following diagram shows an example of the timing for this situation.
Scan
Field Input
Output
Off/On Delay
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
4–18 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Field Input
Input
Off/On Delay
Output
Off/On Delay
In this case, you can calculate the response time by simply adding the following items.
Input Delay + Instruction Execution Time + Output Delay = Response Time
The instruction execution time would be calculated by adding the time for the immediate
input instruction, the immediate output instruction, and any other instructions in between
the two.
NOTE: Even though the immediate instruction reads the most current status from I/O, it only uses the
results to solve that one instruction. It does not use the new status to update the image register.
Therefore, any regular instructions that follow will still use the image register values. Any immediate
instructions that follow will access the I/O again to update the status.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–19
Chapter 4: CPU Specifications and Operation
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
shown previously there are several segments that make up
the scan cycle. Each of these segments requires a certain
amount of time to complete. Of all the segments, the Update input
following are the most important:
Read input data from
• Input Update Specialty and Remote I/O
• Peripheral Service
Service peripheral
• Program Execution
• Output Update CPU Bus Communication
Reading Inputs
The time required during each scan to read the input
Do diagnostics
status of built-in inputs is 52.6 µs. Don’t confuse this
with the I/O response time that was discussed earlier.
OK YES
Writing Outputs OK?
YES
Force CPU into
PGM mode
4–20 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Service Peripherals
Communication requests can occur at any time during the scan, but the CPU only “logs” the
requests for service until the Service Peripherals portion of the scan. The CPU does not spend
any time on this if there are no peripherals connected.
During the Service Peripherals portion of the scan, the CPU analyzes the communications
request and responds as appropriate. The amount of time required to service the peripherals
depends on the content of the request.
Modes DL06
Minimum 12.0µs
Program Mode
Maximum 12.0µs
Minimum 20.0µs
Run Mode
Maximum 27.0µs
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–21
Chapter 4: CPU Specifications and Operation
LD K50 9.00 µs
STRN C103 .67 µs C102
LD
OUT V2006 1.82 µs K50
STR X5 .67 µs
ANDN X10 .51 µs C103
OUT V2006
OUT Y3 1.82 µs
END 12.80 µs
X5 X10 Y3
OUT
SUBT OTAL 51.11 µs
4–22 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Octal 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20
After counting PLC resources, it’s time to access PLC resources (there’s a difference). The
CPU instruction set accesses resources of the PLC using octal addresses. Octal addresses are
the same as octal quantities, except they start counting at zero. The number zero is significant
to a computer, so we don’t skip it.
Our circles are in an array of square containers to X= 0 1 2 3 4 5 6 7
the right. To access a resource, our PLC instruction
will address its location using the octal references X
shown. If these were counters, “CT14” would 1X
access the black circle location.
2X
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–23
Chapter 4: CPU Specifications and Operation
decimal (10 fingers, 10 toes), we prefer to enter and view PLC data in decimal as well.
However, computers are more efficient in using pure binary numbers. A compromise solution
between the two is Binary-Coded Decimal (BCD) representation. A BCD digit ranges from 0
to 9, and is stored as four binary bits (a nibble). This permits each V-memory location to
store four BCD digits, with a range of decimal numbers from 0000 to 9999.
In a pure binary sense, a 16-bit word can represent numbers from 0 to 65535. In storing
BCD numbers, the range is reduced to only 0 to 9999. Many math instructions use Binary-
Coded Decimal (BCD) data, and DirectSOFT32 and the handheld programmer allow us to
enter and view data in BCD.
Hexadecimal Numbers
Hexadecimal numbers are similar to BCD numbers, except they utilize all possible binary
values in each 4-bit digit. They are base-16 numbers so we need 16 different digits. To extend
our decimal digits 0 through 9, we use A through F as shown.
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
is from 0000 to FFFF (hex). PLCs often need this full range for sensor data, etc. Hexadecimal
is just a convenient way for humans to view full binary data.
Hexadecimal number A 7 F 4
V-memory storage 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0
4–24 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Memory Map
With any PLC system, you generally have many different types of information to process.
This includes input device status, output device status, various timing elements, parts counts,
etc. It is important to understand how the system represents and stores the various types of
data. For example, you need to know how the system identifies input points, output points,
data words, etc. The following paragraphs discuss the various memory types used in DL06
Micro PLCs. A memory map overview for the
CPU follows the memory descriptions. G LG 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
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
diagram shows how the octal numbering system PORT1 PORT2 RUN STOP
X7 X6 X5 X4 X3 X2 X1 X0
Bit # 15 14 13 12 11 10 9 8 7 6 5 V40400
4 3 2 1 0
These discrete memory areas and their corresponding V memory ranges are listed in the
memory area table for DL06 Micro PLCs on the following pages.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–25
Chapter 4: CPU Specifications and Operation
4–26 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–27
Chapter 4: CPU Specifications and Operation
Clamp
Special Relays (SP Data Type) SET
S400
Part
Special relays are discrete memory locations with Locked S3
JMP
pre-defined functionality. There are many different X2
4–28 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Starting location for the multi–step presets for channel 1. The default value is
V7630 3630, which indicates the first value should be obtained from V3630. Since there Default: V3630
are 24 presets available, the default range is V3630 – V3707. You can change the Range: V0- V3710
starting point if necessary.
Starting location for the multi–step presets for channel 2. The default value is
V7631 3710, which indicates the first value should be obtained from V3710. Since there Default: V3710
are 24 presets available, the default range is V3710 – V3767. You can change the Range: V0- V3710
starting point if necessary.
V7632 Setup Register for Pulse Output N/A
Default: 0060
Lower Byte Range:Range:
10 – Counter 20 –
Quadrature 30 – Pulse Out
Sets the desired function code for the high speed counter, interrupt, pulse catch, 40 – Interrupt 50 – Pulse
V7633 pulse train, and input filter. Location can also be used to set the power-up in Run Catch
In.
60 – Filtered discrete
Upper Byte Range:Bits
Mode option. 8–11, 14, 15: Unused, Bit
13: Power–up in RUN,only
if Mode Switch is inTERM
position. Bit 12 is used to
enable the battery.
V7634 X0 Setup Register for High-Speed I/O functions Default: 1006
V7635 X1 Setup Register for High-Speed I/O functions Default: 1006
V7636 X2 Setup Register for High-Speed I/O functions Default: 1006
V7637 X3 Setup Register for High-Speed I/O functions Default: 1006
V7640 PID Loop table beginning address "V1200 – V7377
V10000 - V17777"
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–29
Chapter 4: CPU Specifications and Operation
4–30 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Y0
Output Points Y0 – Y777 V40500 – V40537 512
C0 C0
Control Relays C0 – C1777 V40600 - V40677 1024
SP0
Special Relays SP0 – SP777 V41200 – V41237 512
T0
Timer Status Bits T0 – T377 V41100 – V41117 256
CNT CT0
Counters CT0 – CT177 V41140 – V41147 128 K10
CT0
Counter Status Bits CT0 – CT177 V41140 – V41147 128
Data Words None V7400 – V7577 128 None specific, used with many
Non-volatile instructions
SG S0
Stages S0 – S1777 V41000 – V41017 1024
S001
GX0 GY0
Remote I/O GX0-GX3777 V40000-V40177 2048
GY0-GY3777 V40200-V40377 2048
V700-V777 64
System parameters None V7600 – V7777 128 None specific, used for various purposes
V36000-V37777 1024
1-The DL06 systems are limited to 20 discrete inputs and 16 discrete outputs with the
present available hardware, but 512 point addresses exist.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–31
Chapter 4: CPU Specifications and Operation
4–32 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–33
Chapter 4: CPU Specifications and Operation
4–34 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–35
Chapter 4: CPU Specifications and Operation
4–36 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–37
Chapter 4: CPU Specifications and Operation
4–38 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–39
Chapter 4: CPU Specifications and Operation
4–40 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–41
Chapter 4: CPU Specifications and Operation
Module Placement
Slot Numbering
The DL06 has four slots, which are numbered as follows:
Slot 1
Slot 2
Slot 3
Slot 4
4–42 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–43
Chapter 4: CPU Specifications and Operation
Power Budgeting
The DL06 has four option card slots. To determine whether the combination of cards you
select will have sufficient power, you will need to perform a power budget calculation.
Power supplied
Power is supplied from two sources, the internal base unit power supply and, if required, an
external supply (customer furnished). The D0-06xx (AC powered) PLCs supply a limited
amount of 24VDC power. The 24VDC output can be used to power external devices. For
power budgeting, start by considering the power supplied by the base unit. All DL06 PLCs
supply the same amount of 5VDC power. Only the AC units offer 24VDC auxiliary power.
Be aware of the trade-off between 5VDC power and 24VDC power. The amount of 5VDC
power available depends on the amount of 24VDC power being used, and the amount of
24VDC power available depends on the amount of 5VDC power consumed. Determine the
amount of internally supplied power from the table on the following page.
Power required by base unit
Because of the different I/O configurations available in the DL06 family, the power
consumed by the base unit itself varies from model to model. Subtract the amount of power
required by the base unit from the amount of power supplied by the base unit. Be sure to
subtract 5VDC and 24VDC amounts.
Power required by option cards
Next, subtract the amount of power required by the option cards you are planning to use.
Again, remember to subtract both 5VDC and 24VDC. If your power budget analysis shows
surplus power available, you should have a workable configuration.
4–44 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Power Supplied by Base Units DLO6 Power Consumed by Option Cards
Part Number 5 VDC (mA) 24 VDC (mA) Part number 5 VDC 24 VDC
<1500mA 300mA D0-07CDR 130mA none
D0-06xx
<2000mA 200mA D0-08CDD1 100mA none
D0-06xx-D 1500mA none D0-08TR 280mA none
D0-10ND3 35mA none
If the 5VDC loading is less than 2000mA but more than
1500mA, than available 24VDC supply current is 200mA. D0-10TD1 150mA none
If the 5VDC loading is less than 1500mA, then the D0-10TD2 150mA none
available 24VDC current is 300mA.
D0-16ND3 35mA none
D0-16TD1 200mA none
D0-16TD2 200mA none
F0-04AD-1 50mA none
DL06 Base Unit Power Required
F0-2AD2DA-2 50mA 30mA
Part Number 5 VDC (mA) 24 VDC (mA)
F0-4AD2DA-1 100mA 40mA
D0-06AA 800mA none
F0-4AD2DA-2 100mA none
D0-06AR 900mA none
D0-DEVNETS 45mA none
D0-06DA 800mA none
D0-06DD1 600mA 280mA*
Power Budgeting Example
D0-06DD2 600mA none
5VDC 24VDC
D0-06DR 950mA none Power Source power (mA) power (mA)
D0-06DD1-D 600mA none
D0-06DD1 A 1500mA 300mA
D0-06DR-D 950mA none (select row
A or row B) B 2000mA 200mA
5VDC 24VDC
Current Required power (mA) power (mA)
D0-06DD1 600mA 280mA*
D0-16ND3 35mA 0
D0-10TD1 150mA 0
D0-08TR 280mA 0
DL06 Power Consumed by Other Devices F0-4AD2DA-2 100mA 0
Part Number 5 VDC (mA) 24 VDC (mA) D0-06LCD 50mA 0
D0-06LCD 50mA none Total Used 1215mA 280mA
D2-HPP 200mA none A 285mA 20mA
Remaining
DV1000 150mA none B 785mA note 1
* Auxiliary 24VDC used to power V+ terminal of D0-06DD1
sinking outputs.
Note 1: If the PLC’s auxiliary 24VDC power source is used to power the sinking outputs, use power
choice A, above.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–45
Chapter 4: CPU Specifications and Operation
4–46 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
RS-422 Network
RS-422 signals are for RXD+
long distaces ( 1000 ASCII
RXD–
TXD+
meters maximum). Use Slave
Device
TXD–
Signal GND
terminator resistors at 9 TXD+ Termination
10 TXD– Resistor at
both ends of RS-422 13 RXD+ both ends of
The recommended cable 6 RXD– network
network wiring, for RS422 is Belden 11 RTS+
9729 or equivalent. 12 RTS–
matching the 14 CTS+ PORT 2
Master
impedence rating of 15 CTS–
7 0V
the cable (between 100
and 500 ohms).
Termination
Resistor
TXD+ / RXD+ TXD+ / RXD+
TXD+ / RXD+
RS-485 Network
TXD– / RXD– TXD– / RXD– TXD– / RXD–
RS-485 signals are for
longer distances (1000 Signal GND Signal GND Signal GND
Connect shield
meters max) and for RXD– to signal ground
RXD–
multi-drop networks.
Use termination
0V
resistors at both ends RTS+ 0V RTS+
• Timeout: amount of time the port will wait after it sends a message to get a response before logging
an error.
• RTS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send
the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the
DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a
multi-drop network, the RTS ON Delay time must be set to at least 5ms and the RTS OFF Delay time
must be set to at least 2ms. If you encounter problems, the time can be increased.
• Station Number: For making the CPU port a MODBUS master, choose “1”. The possible range for
MODBUS slave numbers is from 1 to 247, but the DL06 network instructions used in Master
mode will access only slaves 1 to 99. Each slave must have a unique number. At powerup, the port is
automatically a slave, unless and until the DL06 executes ladder logic network instructions which
use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the
port again.
• Baud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400
baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value. Refer to the appropriate product manual for details.
• Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
• Parity: Choose none, even, or odd parity for error checking.
•Echo Suppression: Select the appropriate radio button based on the wiring configuration used on
port 2.
Then click the button indicated to send the Port configuration to the CPU, and click Close.
4–48 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
• Timeout: Amount of time the port will wait after it sends a message to get a response before logging
an error.
• RTS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send
the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the
DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a
multi-drop network, the RTS ON Delay time must be set to at least 5ms and the RTS OFF Delay
time must be set to at least 2ms. If you encounter problems, the time can be increased.
• Station Number: For making the CPU port a DirectNET master, choose “1”. The allowable range
for DirectNET slaves is from 1 to 90 (each slave must have a unique number). At powerup, the port
is automatically a slave, unless and until the DL06 executes ladder logic instructions which attempt
to use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the
port again.
• Baud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400
baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value.
• Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
• Parity: Choose none, even, or odd parity for error checking.
• Format: Choose between hex or ASCII formats.
Then click the button indicated to send the Port configuration to the CPU, and click Close.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–49
Chapter 4: CPU Specifications and Operation
• Timeout: Amount of time the port will wait after it sends a message to get a response before logging
an error.
• RTS On Delay Time: The amount of time between raising the RTS line and sending the data.
• RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data.
• Data Bits: Select either 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
baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors
or noise problems on the network. Important: You must configure the baud rates of all devices on
the network to the same value. Refer to the appropriate product manual for details.
• Stop Bits: Choose 1 or 2 stop bits to match the number of stop bits specified for the connected
devices.
• Parity: Choose none, even, or odd parity for error checking. Be sure to match the parity specified
for the connected devices.
• Echo Suppression: Select the appropriate radio button based on the wiring configuration used on
port 2.
• Xon/Xoff Flow Control: Choose this selection if you have port 2 wired for Hardware Flow Control
(Xon/Xoff ) with RTS and CTS signal connected between all devices.
• RTS Flow Control: Choose this selection if you have Port 2 RTS signal wired between all devices.
Then click the button indicated to send the Port configuration to the CPU, and click Close.
4–50 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–51
Chapter 4: CPU Specifications and Operation
4–52 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
The following examples show how to generate the MODBUS address and data type for hosts
which require this format.
Example 1: V2100
Find the MODBUS address for User V location V2100.
Holding Reg 1088
1. Find V memory in the table.
2. Convert V2100 into decimal (1088).
3. Use the MODBUS data type from the table.
V Memory, user data (V) 3200 V1200 – V7377 640 – 3839 Holding Register
Example 2: Y20
Find the MODBUS address for output Y20.
1. Find Y outputs in the table. Coil 2064
2. Convert Y20 into decimal (16).
3. Add the starting address for the range (2048).
4. Use the MODBUS data type from the table.
Example 4: C54
Find the MODBUS address for Control Relay C54.
1. Find Control Relays in the table.
Coil 3116
2. Convert C54 into decimal (44).
3. Add the starting address for the range (3072).
4. Use the MODBUS data type from the table.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–53
Chapter 4: CPU Specifications and Operation
4–54 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
The following examples show how to generate the MODBUS addresses for hosts which
require this format.
Example 1: V2100 584/984 Mode
Find the MODBUS address for User V location V2100. 41089
1. Find V memory in the table.
2. Convert V2100 into decimal (1088).
3. Add the MODBUS starting address for the
mode (40001).
V Memory, system (V) 128 V1200 – V7377 3480 – 3735 4001 40001 Holding Register
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–55
Chapter 4: CPU Specifications and Operation
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
Master
MODBUS RTU Protocol,, or DirectNET
When using the DL06 PLC as the master station, simple RLL instructions are used to initiate
the requests. The WX instruction initiates network write operations, and the RX instruction
initiates network read operations. Before executing either the WX or RX commands, we will
need to load data related to the read or write operation onto the 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.
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
Master
Network
WX (write)
RX (read)
Slave
The following step-by-step procedure will provide you the information necessary to set up
your ladder program to receive data from a network slave.
4–56 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–57
Chapter 4: CPU Specifications and Operation
DL305 Series CPU Memory Type–to–MODBUS Cross Reference (excluding 350 CPU)
MODBUS MODBUS
PLC Memory Type PLC Base Address PLC Memory Type PLC Base Address
Base Address Base Address
TMR/CNT Current R600 V0 TMR/CNT Status Bits CT600 GY600
Values
I/O Points IO 000 GY0 Control Relays CR160 GY160
Data Registers R401,R400 V100 Shift Registers SR400 GY400
Stage Status Bits S0 GY200
(D3-330P only)
4–58 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
C100
RST
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–59
Chapter 4: CPU Specifications and Operation
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
Master
MODBUS RTU Protocol,, or DirectNET
4–60 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
Timeout: Amount of time the port will wait after it sends a message to get a response before
logging an error.
• RTS On Delay Time: The amount of time between raising the RTS line and sending the
data.
• RTS Off Delay Time: The amount of time between resetting the RTS line after sending the
data.
• Station Number: For making the CPU port a MODBUS master, choose “1”. The possible
range for MODBUS slave numbers is from 1 to 247. Each slave must have a unique
number. At powerup, the port is automatically a slave, unless and until the DL06 executes
ladder logic MWX/MRX network instructions which use the port as a master. Thereafter,
the port reverts back to slave mode until ladder logic uses the port again.
• Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and
38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you
experience data errors or noise problems on the network. Important: You must configure
the baud rates of all devices on the network to the same value. Refer to the appropriate
product manual for details.
• Stop Bits: Choose 1 or 2 stop bits for use in the protocol.
• Parity: Choose none, even, or odd parity for error checking.
• Echo Suppression: Select the appropriate radio button based on the wiring configuration
used on port 2.
Then click the button indicated to send the Port configuration to the CPU, and click Close.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–61
Chapter 4: CPU Specifications and Operation
4–62 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–63
Chapter 4: CPU Specifications and Operation
4–64 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–65
Chapter 4: CPU Specifications and Operation
CNT
Port 2 busy bit Number of times that
1 SP116 the PLC has tried to
poll network
_FirstScan
SP0 CTO
K9999
SP117 will come on when: 1) The slave device sends an "Exception Response." If this
occurs, look at the V-memory location associated with that instruction and consult the
MODICON MODBUS manual for details. 2) Cabling problem. Consult wiring diagram in
user manual and verify. 3) Setting for communications are not matching. For example:
Baud rates, parities, stop bits all must match. 4) Polling a slave address number that
doesn't exist.
Under good conditions, SP116 will be counting up and SP117 will not. You will get an
occasional error in many field environments that introduce electrical/RF noise into the
application. Each application will dictate what allowable "percentage" of error is
acceptable. Anything below 10% typically does not affect the throughput very much.
4–66 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02
Chapter 4: CPU Specifications and Operation
This rung does a MODBUS write to the first holding register 40001 of slave address number one.
It writes the values over that reside in V2000. This particular function code only writes to one
register. Use function code 16 to write to multiple registers. Only one Network Instruction
(WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using
many network instructions on the same port, use the Shift Register instruction.
DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 4–67
STANDARD RLL CHAPTER
INSTRUCTIONS
5
In This Chapter
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–2
Using Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–5
Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–10
Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–26
Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–32
Timer, Counter and Shift Register Instructions . . . . . . . . . . . . . . . .5–39
Accumulator / Stack Load and Output Data Instructions . . . . . . . .5–52
Logical Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . .5–69
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–86
Transcendental Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–118
Bit Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–120
Number Conversion Instructions (Accumulator) . . . . . . . . . . . . . .5–127
Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–141
Clock / Calendar Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–171
CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–173
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–175
Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–183
Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–186
MODBUS RTU Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–201
ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–207
Chapter 5: Standard RLL Instructions
Introduction
DL06 Micro PLCs offer a wide variety of instructions to perform many different types of
operations. This chapter shows you how to use each standard Relay Ladder Logic (RLL)
instruction. In addition to these instructions, you may also need to refer to the Drum
instruction in Chapter 6, or the Stage programming instructions in Chapter 7.
There are two ways to quickly find the instruction you need.
• If you know the instruction category (Boolean, Comparative Boolean, etc.) just use the title at the
top of the page to find the pages that discuss the instructions in that category.
• If you know the individual instruction name, use the following table to find the page(s) that
discusses the instruction.
X0 Y0
OUT
All programs must have
an END statement
END
Simple Rungs
You use a contact to start rungs that contain both contacts and coils. The boolean instruction
that does this is called a Store or, STR instruction. The output point is represented by the
Output or, OUT instruction. The following example shows how to enter a single contact and
a single output coil.
Direct SOFT32 Example Handheld Mnemonics
X0 Y0 STR X0
OUT Y0
OUT END
END
Normally Closed Contact
Normally closed contacts are also very common. This is accomplished with the Store Not, or
STRN instruction. The following example shows a simple rung with a normally closed
contact.
Direct SOFT32 Example Handheld Mnemonics
X0 Y0 STRN X0
OUT OUT Y0
END
END
Contacts in Series
Use the AND instruction to join two or more contacts in series. The following example shows
two contacts in series and a single output coil. The instructions used would be STR X0, AND
X1, followed by OUT Y0.
Direct SOFT32 Example Handheld Mnemonics
X0 X1 Y0 STR X0
AND X1
OUT OUT Y0
END
END
Midline Outputs
Sometimes it is necessary to use midline outputs to get additional outputs that are conditional
on other contacts. The following example shows how you can use the AND instruction to
continue a rung with more conditional outputs.
X0 X1 Y0 STR X0
AND X1
OUT OUT Y0
AND X2
X2 Y1 OUT Y1
AND X3
OUT OUT Y2
END
X3 Y2
OUT
Parallel Elements
END
You may also have to join contacts in parallel. The OR instruction allows you to do this. The
following example shows two contacts in parallel and a single output coil. The instructions
would be STR X0, OR X1, followed by OUT Y0.
Combination Networks
You can combine the various types of series and parallel branches to solve most any
application problem. The following example shows a simple combination network.
X0 X2 X5 Y0
OUT
X1 X3 X4
X6
END
Comparative Boolean
Some PLC manufacturers make it really difficult to do a simple comparison of two numbers.
Some of them require you to move the data all over the place before you can actually perform
the comparison. The DL06 Micro PLCs provide Comparative Boolean instructions that allow
you to quickly and easily solve this problem. The Comparative Boolean provides evaluation of
two 4-digit values using boolean contacts. The valid evaluations are: equal to, not equal to,
equal to or greater than, and less than.
In the following example when the value in V-
V1400 K1234
memory location V1400 is equal to the constant
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
PLCs use an 8-level boolean stack to evaluate the various logic elements. The boolean stack is
a temporary storage area that solves the logic for the rung. Each time the program encounters
a STR instruction, the instruction is placed on the top of the stack. Any other STR
instructions already on the boolean stack are pushed down a level. The ANDSTR, and
ORSTR instructions combine levels of the boolean stack when they are encountered. An
error will occur during program compilation if the CPU encounters a rung that uses more
than the eight levels of the boolean stack.
The following example shows how the boolean stack is used to solve boolean logic.
X0 X1 ORSTR AND X4 Y0
STR
STR OUT Output
X2 AND X3
STR ANDSTR
X5 OR
8 8 8
ANDSTR
1 XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)}
2
3
.
.
Immediate Boolean
The DL06 Micro PLCs can usually complete an operation cycle in a matter of milliseconds.
However, in some applications you may not be able to wait a few milliseconds until the next
I/O update occurs. The DL06 PLCs offer Immediate input and outputs which are special
boolean instructions that allow reading directly from inputs and writing directly to outputs
during the program execution portion of the CPU cycle. You may recall that this is normally
done during the input or output update portion of the CPU cycle. The immediate
instructions take longer to execute because the program execution is interrupted while the
CPU reads or writes the I/O point. This function is not normally done until the read inputs
or the write outputs portion of the CPU cycle.
NOTE: Even though the immediate input instruction reads the most current status from the input point, it
only uses the results to solve that one instruction. It does not use the new status to update the image
register. Therefore, any regular instructions that follow will still use the image register values. Any
immediate instructions that follow will access the I/O again to update the status. The immediate output
instruction will write the status to the I/O and update the image register.
PWR
RUN
CPU
TX1
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
RX2
LOGIC 06
K oyo
TERM
CPU Scan
X11 ... X2 X1 X0
OFF ... ON OFF OFF OFF X0
Input Image Register,
OFF X1
ON X0
OFF X1
Write Outputs
Diagnostics
Boolean Instructions
Store (STR)
The Store instruction begins a new rung or an additional
Aaaa
branch in a rung with a normally open contact. Status of
the contact will be the same state as the associated image
register point or memory location.
Store Not (STRN)
The Store Not instruction begins a new rung or an Aaaa
additional branch in a rung with a normally closed
contact. Status of the contact will be opposite the state of
the associated image register point or memory location.
In the following Store example, when input X1 is on, output Y2 will energize.
X1 Y2 $ B ENT
STR 1
OUT
GX C ENT
OUT 2
In the following Store Not example, when input X1 is off output Y2 will energize.
Direct SOFT32 Handheld Programmer Keystrokes
X1 Y2 SP B ENT
OUT STRN 1
GX C ENT
OUT 2
In the following Store Bit-of-Word example, when bit 12 of V-memory location V1400 is on,
output Y2 will energize.
DirectSOFT32
B1400.12 Y2
OUT
STR SHFT B V 1 4 0 0
K 1 2 ENT
OUT 2 ENT
In the following Store Not Bit-of-Word example, when bit 12 of V-memory location V1400
is off, output Y2 will energize.
DirectSOFT32
B1400.12 Y2
OUT
STRN SHFT B V 1 4 0 0
K 1 2 ENT
OUT 2 ENT
Or (OR)
The Or instruction logically ors a normally open contact in
parallel with another contact in a rung. The status of the
Aaaa
contact will be the same state as the associated image register
point or memory location.
Or Not (ORN)
The Or Not instruction logically ors a normally closed contact
in parallel with another contact in a rung. The status of the Aaaa
contact will be opposite the state of the associated image
register point or memory location.
X1 Y5 $ B ENT
STR 1
OUT
Q C ENT
OR 2
X2
GX F ENT
OUT 5
X1 Y5 $ B ENT
OUT STR 1
R C ENT
ORN 2
X2
GX F ENT
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
Status of the contact will be the same state as the bit
referenced in the associated memory location.
Or Not Bit-of-Word (ORNB)
The Or Not Bit-of-Word instruction logically ors a
normally closed contact in parallel with another contact
in a rung. Status of the contact will be opposite the state Aaaa.bb
of the bit referenced in the associated memory location.
In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400 is on, output Y5
will energize.
DirectSOFT32
X1 Y7
OUT
B1400.7
STR 1 ENT
OR SHFT B V 1 4 0 0
K 7 ENT
OUT 7 ENT
DirectSOFT32
X1 Y7
OUT
B1400.7
STR 1 ENT
ORN SHFT B V 1 4 0 0
K 7 ENT
OUT 7 ENT
And (AND)
The And instruction logically ands a normally open Aaaa
contact in series with another contact in a rung. The
status of the contact will be the same state as the
associated image register point or memory location.
And Not (ANDN)
The And Not instruction logically ands a normally Aaaa
closed contact in series with another contact in a rung.
The status of the contact will be opposite the state of
the associated image register point or memory location.
In the following And example, when input X1 and X2 are on output Y5 will energize.
X1 X2 Y5 $ B ENT
STR 1
OUT
V C ENT
AND 2
GX F ENT
OUT 5
In the following And Not example, when input X1 is on and X2 is off output Y5 will
energize.
X1 X2 Y5 $ B ENT
OUT STR 1
W C ENT
ANDN 2
GX F ENT
OUT 5
In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on output
Y5 will energize.
DirectSOFT32
X1 B1400.4 Y5
OUT
STR 1 ENT
AND SHFT B V 1 4 0 0
K 4 ENT
OUT 5 ENT
In the following And Not Bit-of-Word example, when input X1 is on and bit 4 of V1400 is
off output Y5 will energize.
DirectSOFT32
X1 B1400.4 Y5
OUT
STR 1 ENT
ANDN SHFT B V 1 4 0 0
K 4 ENT
OUT 5 ENT
X1 X2 X3 Y5 $ B ENT
STR 1
OUT
$ C ENT
STR 2
X4
V D
ENT
AND 3
Q E
ENT
OR 4
L ENT
ANDST
GX F ENT
OUT 5
In the following Or Store example, the branch consisting of X1 and X2 have been ored with
the branch consisting of X3 and X4.
Direct SOFT32 Handheld Programmer Keystrokes
X1 X2 Y5 $ B ENT
STR 1
OUT
V C
ENT
AND 2
X3 X4
$ D ENT
STR 3
V E ENT
AND 4
M ENT
ORST
GX 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
point or memory location.
Multiple Out instructions referencing the same discrete location should not be used since
only the last Out instruction in the program will control the physical output point. Instead,
use the next instruction, the Or Out.
Operand Data Type DL06 Range
....................................A aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0–777
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0–777
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0–1777
In the following Out example, when input X1 is on, output Y2 and Y5 will energize.
Direct SOFT32 Handheld Programmer Keystrokes
X1 Y2 $ B ENT
STR 1
OUT
GX C ENT
OUT 2
Y5
GX F ENT
OUT OUT 5
X1 Y2
$ B ENT
OR OUT STR 1
O D F ENT ENT C ENT
INST# 3 5 2
$ E ENT
STR 4
X4 Y2 O D F C
ENT ENT ENT
INST# 3 5 2
OR OUT
X1 B1400.3
OUT
B1401.6
Handheld Programmer Keystrokes
OUT
STR 1 ENT
OUT SHFT B V 1 4 0 0
K 3 ENT
OUT SHFT B V 1 4 0 1
K 6 ENT
The following Out Bit-of-Word example contains two Out Bit-of-Word instructions using
the same bit in the same memory word. The final state bit 3 of V1400 is ultimately controlled
by the last rung of logic referencing it. X1 will override the logic state controlled by X0. To
avoid this situation, multiple outputs using the same location must not be used in
programming.
X0 B1400.3
OUT
X1 B1400.3
OUT
Not (NOT)
The Not instruction inverts the status of the rung
at the point of the instruction.
In the following example when X1 is off, Y2 will energize. This is because the Not instruction
inverts the status of the rung at the Not instruction.
DirectSOFT32 Handheld Programmer Keystrokes
X1 Y2 $ B ENT
STR 1
OUT
SHFT N O T ENT
TMR INST# MLR
GX C ENT
OUT 2
NOTE: DirectSOFT Release 1.1i and later supports the use of the NOT instruction. The above example rung
is merely intended to show the visual representation of the NOT instruction. The rung cannot be created or
displayed in DirectSOFT versions earlier than 1.1i.
In the following example, every time X1 makes an off to on transition, C0 will energize for
one scan.
X1 C0 $ B ENT
STR 1
PD
SHFT P SHFT D A
CV 3 0
In the following example, each time X1 is makes an Off-to-On transition, Y4 will energize for
one scan.
X1 $ SHFT P D B ENT
Y4 STR CV 3 1
OUT GX E ENT
OUT 4
In the following example, each time X1 is makes an On-to-Off transition, Y4 will energize for
one scan.
DirectSOFT32 Handheld Programmer Keystrokes
X1 $ SHFT N D B ENT
Y4 STR TMR 3 1
OUT GX E
ENT
OUT 4
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2
transitions from On to Off.
In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2
transitions from Off to On.
In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2
transitions from On to Off.
X2 $ B ENT
X1 Y5 STR 1
OUT Q N D C
SHFT ENT
OR TMR 3 2
GX F
ENT
OUT 5
X1 $ B
Y2 Y5 ENT
STR 1
SET
X C F ENT
SET 2 5
X2 $ B
Y2 Y5 ENT
STR 1
RST
S C F ENT
RST 2 5
In the following example when X1 turns on, bit 1 in V1400 is set to the on state.
DirectSOFT32
X1
B1400.1
SET
STR 1 ENT
SET SHFT B V 1 4 0 0
K 1 ENT
In the following example when X2 turns on, bit 1 in V1400 is reset to the off state.
DirectSOFT32
X2
B1400.1
RST
STR 2 ENT
RST SHFT B V 1 4 0 0
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
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.
In the following example, when X1 is ON, Y5–Y7 will be turned OFF. The execution of the
ladder program will not be affected.
DirectSOFT32
X1 Y5 Y7
PAUSE
Since the D2–HPP Handheld Programmer does not have a specific Pause key, you can use
the corresponding instruction number for entry (#960), or type each letter of the command.
$ B ENT
STR 1
O J G A ENT ENT D F ENT
INST# 9 6 0 3 5
In some cases, you may want certain output points in the specified pause range to operate
normally. In that case, use Aux 58 to over-ride the Pause instruction.
Comparative Boolean
Store If Equal (STRE)
The Store If Equal instruction begins a new rung or
additional branch in a rung with a normally open V aaa B bbb
comparative contact. The contact will be on when Vaaa
equals Bbbb .
Store If Not Equal (STRNE)
The Store If Not Equal instruction begins a new rung or V aaa B bbb
additional branch in a rung with a normally closed
comparative contact. The contact will be on when Vaaa
does not equal Bbbb.
Operand Data Type DL06 Range
....................................B aaa bbb
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 0–9999
In the following example, when the value in V memory location V2000 = 4933 , Y3 will
energize.
In the following example, when the value in V memory location V2000 =/ 5060, Y3 will
energize.
Y3 SP SHFT E C A A A
V2000 K5060
STRN 4 2 0 0 0
OUT
F A G A ENT
5 0 6 0
GX D ENT
OUT 3
Or If Equal (ORE)
The Or If Equal instruction connects a normally open
comparative contact in parallel with another contact. V aaa B bbb
The contact will be on when Vaaa = Bbbb.
Or If Not Equal (ORNE)
The Or If Not Equal instruction connects a normally
closed comparative contact in parallel with another
contact. The contact will be on when Vaaa does not V aaa B bbb
equal Bbbb.
In the following example, when the value in V memory location V2000 = 4500 or V2002 =/
2500, Y3 will energize.
$ SHFT E C A A A
V2000 K4500 Y3
STR 4 2 0 0 0
OUT
E F A A ENT
4 5 0 0
In the following example, when the value in V memory location V2000 = 3916 or V2002
050, Y3 will energize.
$ SHFT E C A A A
V2000 K3916 Y3 STR 4 2 0 0 0
OUT D J B G ENT
3 9 1 6
In the following example, when the value in V memory location V2000 = 5000 and V2002 =
2345, Y3 will energize.
In the following example, when the value in V memory location V2000 = 5000 and V2002 =/
2345, Y3 will energize.
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
contact. The contact will be on when Aaaa is equal to or greater
than Bbbb.
Store Not (STRN) A aaa B bbb
The Comparative Store Not instruction begins a new rung or
additional branch in a rung with a normally closed comparative
contact. The contact will be on when Aaaa < Bbbb.
Operand Data Type DL06 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p See memory map See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 0–9999
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0–377
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0–177
In the following example, when the value in V memory location V2000 욷 1000, Y3 will
energize.
In the following example, when the value in V memory location V2000 < 4050, Y3 will
energize.
Or (OR)
The Comparative Or instruction connects a normally
open comparative contact in parallel with another contact. A aaa B bbb
The contact will be on when Aaaa is equal to or greater
than Bbbb.
Or Not (ORN)
The Comparative Or Not instruction connects a
normally open comparative contact in parallel with A aaa B bbb
another contact. The contact will be on when Aaaa <
Bbbb.
In the following example, when the value in V memory location V2000 = 6045 or
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 ENT
6 0 4 5
In the following example when the value in V memory location V2000 = 1000 or
V2002 < 2500, Y3 will energize.
And (AND)
The Comparative And instruction connects a normally A aaa B bbb
open comparative contact in series with another
contact. The contact will be on when Aaaa is equal to or
greater than Bbbb.
And Not (ANDN) A aaa B bbb
The Comparative And Not instruction connects a normally
open comparative contact in parallel with another contact.
The contact will be on when Aaaa < Bbbb.
Operand Data Type DL06 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p See memory map See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K –– 0–9999
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0–377
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0–177
In the following example, when the value in V memory location V2000 = 5000, and
V2002 욷 2345, Y3 will energize.
In the following example, when the value in V memory location V2000 = 7000 and
V2002 < 2500, Y3 will energize.
$ SHFT E C A A A
V2000 K7000 V2002 K2500 Y3 STR 4 2 0 0 0
OUT H A A A ENT
7 0 0 0
W SHFT V C A A C
ANDN AND 2 0 0 2
C F A A ENT
2 5 0 0
GX SHFT Y D ENT
OUT AND 3
Immediate Instructions
Store Immediate (STRI)
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
associated input point at the time the instruction is
executed. The image register is not updated.
Store Not Immediate (STRNI)
The Store Not Immediate instruction begins a new
rung or additional branch in a rung. The status of X aaa
the contact will be opposite the status of the
associated input point at the time the instruction is
executed. The image register is not updated.
Operand Data Type DL06 Range
aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0–777
X1 Y2 $ SHFT I B ENT
STR 8 1
OUT
GX C ENT
OUT 2
Or Immediate (ORI)
The Or Immediate connects two contacts in parallel. The status
of the contact will be the same as the status of the associated X aaa
input point at the time the instruction is executed. The image
register is not updated.
Or Not Immediate (ORNI)
The Or Not Immediate connects two contacts in parallel. The
status of the contact will be opposite the status of the associated X aaa
X1 X2 Y5 $ B ENT
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
on. For instruction entry on the Handheld Programmer, you can use the instruction number
(#350) as shown, or type each letter of the command.
DirectSOFT32 Handheld Programmer Keystrokes
X1 Y2 $ B ENT
STR 1
OUTI
O D F A ENT ENT
INST# 3 5 0
C ENT
2
$ B ENT
X1 Y2
STR 1
OR OUTI O D F A ENT ENT
INST# 3 5 0
C ENT
X4 Y2 2
OR OUTI $ E ENT
STR 4
O D F A ENT ENT
INST# 3 5 0
C ENT
2
In the following example when C0 is on,the binary pattern for X10 –X17 is loaded into the
accumulator using the Load Immediate Formatted instruction. The binary pattern in the
accumulator is written to Y30–Y37 using the Out Immediate Formatted instruction. This
technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU
scan).
DirectSOFT32
CO
LDIF X10 Location Constant 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 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1
OUTIF Y30
K8
Copy the value in the lower Location Constant Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
8 bits of the accumulator to
Y30-Y37 Y30 K8 ON OFF ON ON OFF ON OFF ON
SHFT L D I F B A I ENT
ANDST 3 8 5 1 0 8
GX SHFT I F D A I ENT
OUT 8 5 3 0 8
$ B ENT
X1 Y2 Y5 STR 1
SETI X I C F
SHFT ENT
SET 8 2 5
In the following example, when X1 is on, Y5 through Y22 will be reset (off ) in the image
register and on the corresponding output module(s).
DirectSOFT32
Handheld Programmer Keystrokes
X1 Y5 Y22
$ B ENT
RSTI STR 1
S SHFT I F C C ENT
RST 8 5 2 2
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
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
full CPU scan to occur).
DirectSOFT32
C0 LDI Location
X17 X16 X15 X14 X13 X12 X11 X10 X7 X6 X5 X4 X3 X2 X1 X0
V40400 V40400 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
OUTI
V40502
SHFT L D I E A E A A ENT
ANDST 3 8 4 0 4 0 0
GX SHFT I NEXT E A F A C ENT
OUT 8 4 0 5 0 2
In the following example, when C0 is on, the binary pattern of X10–X17 will be loaded into
the accumulator using the Load Immediate Formatted instruction. The Out Immediate
Formatted instruction could be used to copy the specified number of bits in the accumulator
to the specified outputs on the output module, such as Y30–Y37. This technique is useful to
quickly copy an input pattern to outputs (without waiting for the CPU scan).
DirectSOFT32
C0 Location Constant
LDIF X10 X17 X16 X15 X14 X13 X12 X11 X10
K8 X10 K8 ON OFF ON ON OFF ON OFF ON
OUTIF Y30
K8
Location Constant Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
Copy the value of the lower
Y30 K8 ON OFF ON ON OFF ON OFF ON
8 bits of the accumulator to
Y30 - Y37
SHFT L D I F B A I ENT
ANDST 3 8 5 1 0 8
GX SHFT I F D A I ENT
OUT 8 5 3 0 8
Seconds
0 1 2 3 4 5 6 7 8 X1
TMR T1
X1 K30
Timer Preset
T1 Timer Preset
T1 Y0
OUT
Current 0 10 20 30 40 50 60 0
Value 1/10 Seconds
There are those applications that need an accumulating timer, meaning it has the ability to
time, stop, and then resume from where it previously stopped. The accumulating timer works
similarly to the regular timer, but two inputs are required. The enable input starts and stops
the timer. When the timer stops, the elapsed time is maintained. When the timer starts again,
the timing continues from the elapsed time. When the reset input is turned on, the elapsed
time is cleared and the timer will start at 0 when it is restarted. There is a tenth of a second
and a hundredth of a second timer available with a maximum time of 9999999.9 and
999999.99 seconds respectively. The timing diagram below shows the relationship between
the timer input, timer reset, associated discrete bit, current value, and timer preset.
Seconds
0 1 2 3 4 5 6 7 8 X1
TMRA T0
K30
X1 Enable
Enable
X2
X2
Reset
Reset Input
Input
T0
Current 0 10 10 20 30 40 50 0
Value 1/10 Seconds
1200–7377
Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P –– 7400–7577
10000-17777
Constants (preset only) . . . . . . . . . . . . . . . . . . K –– 0–9999
Timer discrete status bits . . . . . . . . . . . . . . . T/V 0–377 or V41100–41107
Timer current values . . . . . . . . . . . . . . . . . . V /T* 0–377
NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as “T2” for discrete status bit for Timer T2, and
“TA2” for the current value of Timer T2.
You can perform functions when the timer reaches the specified preset using the discrete
status bit. Or, use comparative contacts to perform functions at different time intervals, based
on one timer. The examples on the following page show these two methods of programming
timers.
X1
T2 Y0
OUT
T2
Y0
Handheld Programmer Keystrokes
Current 0 10 20 30 40 50 60 0
$ B ENT Value
STR 1
N C D A
TMR 2 3 0
ENT 1/10th Seconds
$ SHFT T C ENT
STR MLR 2
GX A ENT
OUT 0
Y3 X1
TA20 K10
OUT
Y3
TA20 K20 Y4 Y4
OUT
Y5
TA20 K30 Y5
T2
OUT
Current 0 10 20 30 40 50 60 0
Value
Current Value: Timer current values are accessed by referencing the associated V or T
memory location*. For example, the timer current value for T3 resides in V-memory location
V3.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated T memory
location. Operating as a “timer done bit,” it will be on if the current value is equal to or
greater than the preset value. For example the discrete status bit for timer 2 would be T2.
NOTE: The accumulating type timer uses two consecutive V-memory locations for the 8-digit value, and therefore
two consecutive timer locations. For example, if TMRA 1 is used, the next available timer number is TMRA 3.
NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as “T2” for discrete status bit for Timer T2, and
“TA2” for the current value of Timer T2.
The following examples show two methods of programming timers. One performs functions
when the timer reaches the preset value using the discrete status bit, or use comparative
contacts to perform functions at different time intervals.
X1
K30
C10
C10
Y7 T6
T6
OUT Current 0 10 10 20 30 40 50 0
Value
$ B ENT D A ENT
STR 1 3 0
$ SHFT C B A ENT $ SHFT T G ENT
STR 2 1 0 STR MLR 6
N SHFT A G GX B A ENT
TMR 0 6 OUT 1 0
K45 X1
C10
C10
TA20 K10 Y3 Y3
OUT
Y4
TA20 K20 Y4
Y5
OUT
T20
TA20 K30 Y5
Current 0 10 10 20 30 40 50 0
OUT Value
$ B GX E ENT
ENT OUT 4
STR 1
$ C B A $ SHFT T C A
SHFT ENT STR MLR 2 0
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 D ENT
OUT 3
$ SHFT T C A C A ENT
STR MLR 2 0 2 0
Using Counters
Counters are used to count events . The counters available are up counters, up/down
counters, and stage counters (used with RLLPLUS programming).
The up counter (CNT) has two inputs, a count input and a reset input. The maximum count
value is 9999. The timing diagram below shows the relationship between the counter input,
counter reset, associated discrete bit, current value, and counter preset.
X1
CNT CT1
X1
Up K3
X2
X2
Reset
CT1
Current 1 2 3 4 0 Counter preset
alue
Counts
The up down counter (UDC) has three inputs, a count up input, count down input and reset
input. The maximum count value is 99999999. The timing diagram below shows the
relationship between the counter up and down inputs, counter reset, associated discrete bit,
current value, and counter preset.
X1
X1 UDC CT2
Up K3
X2 X2
X3
Down
X3
CT2
Reset
Current 1 2 1 2 3 0
Value Counts
Counter Preset
The stage counter (SGCNT) has a count input and is reset by the RST instruction. This
instruction is useful when programming using the RLLPLUS structured programming. The
maximum count value is 9999. The timing diagram below shows the relationship between the
counter input, associated discrete bit, current value, counter preset and reset instruction.
X1 X1
SGCNT CT2
K3
CT2
Current 1 2 3 4 0
Value Counts Counter preset
RST
CT2
Counter (CNT)
The Counter is a two input counter that
increments when the count input logic transitions
from off to on. When the counter reset input is
on the counter resets to 0. When the current
value equals the preset value, the counter status
bit comes on and the counter continues to count Counter#
up to a maximum count of 9999. The maximum
value will be held until the counter is reset. Count CNT CT aaa
B bbb
Instruction Specifications
Counter Reference (CTaaa): Specifies the counter Reset
number.
Preset Value (Bbbb): Constant value (K) or a V Preset
memory location.
Current Values: Counter current values are
accessed by referencing the associated V or CT
memory locations*. The V-memory location is
the counter location + 1000. For example, the
counter current value for CT3 resides in V
memory location V1003.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT
memory location. It will be on if the value is equal to or greater than the preset value. For
example the discrete status bit for counter 2 would be CT2.
NOTE: Counter preset constants (K) may be changed by using a programming device, even when the CPU
is in Run Mode. Therefore, a V-memory preset is required only if the ladder program must change the
preset.
NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as “CT2” for discrete status bit for Counter CT2,
and “CTA2” for the current value of Counter CT2.
CT2 or
CT2 Y7 Y7
OUT Current Value 1 2 3 4 0
CTA2 K1 Y3 Y3
OUT
Y4
CTA2 K2 Y4
Y5
OUT
Current 1 2 3 4 0
Value
CTA2 K3 Y5
OUT
NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same
data reference. DirectSOFT uses separate references, such as “CT2” for discrete status bit for Counter CT2,
and “CTA2” for the current value of Counter CT2.
CT7 Y7 Y7
OUT Current 1 2 3 4 0
Value
C5 CT7 RST
RST CT7
$ B ENT GX B A ENT
STR 1 OUT 1 0
CT2 K1 Y3
Y3
OUT
Y4
CT2 K2 Y4
OUT
Y5
Y5 Current 1 2 3 4 0
CT2 K3
Value
OUT
RST
CT2
NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same
data reference. DirectSOFT32 uses separate references, such as “CT2” for discrete status bit for
Counter CT2, and “CTA2” for the current value of Counter CT2.
X2
X3
X3
CT2
CT2 Y7
Current 1 2 1 2 3 0
OUT Value
$ B ENT D ENT
STR 1 3
$ C ENT $ SHFT C SHFT T C ENT
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
X2
X3
X3
CTA2 K1 Y3 Y3
OUT
Y4
CTA2 K2 Y4 1 2 3 4 0
Current
Value
OUT
$ B ENT B ENT
STR 1 1
$ C ENT GX D ENT
STR 2 OUT 3
$ D ENT $ SHFT C SHFT T C
STR 3 STR 2 MLR 2
SHFT U D C C C ENT
ISG 3 2 2 2
X1 $ B ENT
Data Input SR STR 1
$ C ENT
STR 2
From C0
X2 $ D
Clock Input ENT
STR 3
OUT
V2010 8 9 3 5
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-
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
follows:
X1 V2001 V2000
LDD
V2000 6 7 3 9 5 0 2 6
Acc. 6 7 3 9 55 00 22 66
OUTD
V2010 6 7 3 9 5 0 2 6
Copy data from the accumulator to
V2010 and V2011 V2011 V2010
X1 LD Constant 4 9 3 5
K4935
Shifted out of
accumulator
SHFR 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
K4 Acc. 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1
OUT
V2010
0 4 9 3
Output the lower 16 bits of the ac-
cumulator to V2010 V2010
Some of the data manipulation instructions use 32 bits. They use two consecutive V memory
locations or an 8 digit BCD constant to manipulate data in the accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
V2001 V2000
X1 6 7 3 9 5 0 2 6
LDD
V2000
OUTD
V2010 8 7 3 9 9 0 7 2
6 3 6 3 Level 7 X X X X X X X X
LD Constant
Level 8 X X X X X X X X
K6363 Current Acc. value
Acc. 0 0 0 0 66 33 66 33
Load the value 6363 into the accumu- Bucket
lator, pushing the value 5151 to the 1st Previous Acc. value Accumulator Stack
stack location and the value 3245 to
the 2nd stack location Acc. 0 0 0 0 55 1 5 1 Level 1 0 0 0 0 5 1 5 1
Level 2 0 0 0 0 3 2 4 5
0 0 0 0
Level 3 X X X X X X X X
Level 4 X X X X X X X X
Level 5 X X X X X X X X
Level 6 X X X X X X X X
Level 7 X X X X X X X X
Level 8 X X X X X X X X
Bucket
The POP instruction rotates values upward through the stack into the accumulator. When a
POP is executed the value which was in the accumulator is cleared and the value that was on
top of the stack is in the accumulator. The values in the stack are shifted up one position in
the stack.
Acc. X X X X XX XX XX X
Acc. 0 0 0 0 44 55 44 55
Using Pointers
Many of the DL06 series instructions will allow V-memory pointers as a operand (commonly
known as indirect addressing). Pointers allow instructions to obtain data from V-memory
locations referenced by the pointer value.
NOTE: DL06 V-memory addressing is in octal. However, the pointers reference a V-memory location with
values viewed as HEX. Use the Load Address (LDA) instruction to move an address into the pointer
location. This instruction performs the Octal to Hexadecimal conversion automatically.
In the following simple example we are using a pointer operand in a Load instruction. V-
memory location 2000 is being used as the pointer location. V2000 contains the value 440
which the CPU views as the Hex equivalent of the Octal address V-memory location V2100.
The CPU will copy the data from V2100 which in this example contains the value 2635 into
the lower word of the accumulator.
X1 V2076 X X X X
LD
V2077 X X X X
P2000
V2100 2 6 3 5
V2000 (P2000) contains the value 440 V2101 X X X X
HEX. 440 HEX. = 2100 Octal which
contains the value 2635. V2102 X X X X
V2000 V2103 X X X X
Accumulator
0 4 4 0 V2104 X X X X
2 6 3 5
V2105 X X X X
OUT
V2200
The following example is identical to the one above with one exception. The LDA (Load
Address) instruction automatically converts the Octal address to Hex.
Acc. 0 0 0 0 00 44 44 00
V2076 X X X X
V2077 X X X X
Load (LD)
The Load instruction is a 16 bit instruction that loads the
LD
value (Aaaa), which is either a V memory location or a 4
A aaa
digit constant, into the lower 16 bits of the accumulator.
The upper 16 bits of the accumulator are set to 0.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–FFFF
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator and output to V2010.
Direct SOFT32
V2000
X1 LD 8 9 3 5
V2000
OUT
V2010
$ B X
STR 1 SET
SHFT L D
ANDST 3
C A A A ENT
2 0 0 0
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be
loaded into the accumulator and output to V2010 and V2011.
Direct SOFT32
X1 LDD V2001 V2000
V2000 6 7 3 9 5 0 2 6
6 7 3 9 5 0 2 6
OUTD
V2010 V2011 V2010
$ B ENT
STR 1
SHFT L D D
ANDST 3 3
C A A A ENT
2 0 0 0
GX SHFT D
OUT 3
C A B A ENT
2 0 1 0
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example, when C0 is on, the binary pattern of C10–C16 (7 bits) will be
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.
Direct SOFT32
C0 Location Constant
LDF C10 C16 C15 C14 C13 C12 C11 C10
K7 C10 K7 OFF OFF OFF ON ON ON OFF
OUTF Y0
K7
Location Constant Y6 Y5 Y4 Y3 Y2 Y1 Y0
Copy the value from the
specified number of bits in Y0 K7 OFF OFF OFF ON ON ON OFF
the accumulator to Y0 – Y6
Handheld Programmer Keystrokes
$ SHFT C A ENT
STR 2 0
SHFT L D F
ANDST 3 5
SHFT C B A H ENT
2 1 0 7
GX SHFT F
OUT 5
A H ENT
0 7
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example when X1 is on, the octal number 40400 will be converted to a HEX
4100 and loaded into the accumulator using the Load Address instruction. The value in the
lower 16 bits of the accumulator is copied to V2000 using the Out instruction.
Direct SOFT32
X1 LDA Octal Hexadecimal
O 40400 4 0 4 0 0 4 1 0 0
4 1 0 0
OUT
V2000 V2000
$ B ENT
STR 1
SHFT L D A
ANDST 3 0
E A E A A ENT
4 0 4 0 0
GX SHFT V C A A A ENT
OUT AND 2 0 0 0
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example when X1 is on, the HEX equivalent for octal 25 will be loaded into
the accumulator (this value will be placed on the stack when the Load Accumulator Indexed
instruction is executed). V memory location V1410 will be added to the value in the 1st. level
of the stack and the value in this location (V1435 = 2345) is loaded into the lower 16 bits of
the accumulator using the Load Accumulator Indexed instruction. The value in the lower 16
bits of the accumulator is output to V1500 using the Out instruction.
X1 LDA Octal Hexadecimal
O 25 2 5 0 0 1 5
Acc. 0 0 0 0 0 0 1 5
LDX
V1410
HEX Value in 1st
Octal stack location Octal Accumulator Stack
Move the offset to the stack.
Load the accumulator with V 1 4 1 0 + 1 5 = V 1 4 3 5 Level 1 0 0 0 0 0 0 1 5
the address to be offset Level 2 X X X X X X X X
The unused accumulator
Level 3 X X X X X X X X
bits are set to zero
OUT Level 4 X X X X X X X X
V1500 Acc. 0 0 0 0 2 3 4 5
Level 5 X X X X X X X X
The value in V1435 Level 6 X X X X X X X X
Copy the value in the lower is 2345
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
$ B ENT
STR 1
L D A C F ENT
SHFT
ANDST 3 0 2 5
SHFT L D X B E B A ENT
ANDST 3 SET 1 4 1 0
GX B F A A
PREV PREV PREV ENT
OUT 1 5 0 0
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example when X1 is on, the offset of 1 is loaded into the accumulator. This
value will be placed into the first level of the accumulator stack when the LDSX instruction is
executed. The LDSX instruction specifies the Data Label (DLBL K2) where the numerical
constant(s) are located in the program and loads the constant value, indicated by the offset in
the stack, into the lower 16 bits of the accumulator.
Hexadecimal
X1 Value in 1st. level of stack is
LD 0 0 0 1 used as offset. The value is 1
K1
The unused accumulator
bits are set to zero Accumulator Stack
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
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
OUT
Acc. 0 0 0 0 0 0 0 2
Level 8 X X X X X X X X
V2000
.
. Copy the value in the lower
16 bits of the accumulator
. The unused accumulator
to V2000
bits are set to zero
END
Acc. 0 0 0 0 2 3 2 3
DLBL
DLBL K2
2 3 2 3
NCON
Offset 0
K3333 V2000
NCON
Offset 1
K2323
NCON
Offset 2
K4549
SHFT L D S X C ENT
ANDST 3 RST SET 2
SHFT E N D ENT
4 TMR 3
SHFT D L B L C ENT
3 ANDST 1 ANDST 2
SHFT N C O N D D D D ENT
TMR 2 INST# TMR 3 3 3 3
SHFT N C O N C D C D ENT
TMR 2 INST# TMR 2 3 2 3
SHFT N C O N E F E J ENT
TMR 2 INST# TMR 4 5 4 9
GX SHFT V C A A A ENT
OUT AND 2 0 0 0
Out (OUT)
The Out instruction is a 16 bit instruction that copies the value OUT
in the lower 16 bits of the accumulator to a specified V A aaa
memory location (Aaaa).
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be
loaded into the accumulator using the Load Double instruction. The value in the
accumulator is output to V2010 and V2011 using the Out Double instruction.
Direct SOFT32 V2001 V2000 Handheld Programmer Keystrokes
6 7 3 9 5 0 2 6
X1 $ B ENT
LDD STR 1
V2000
SHFT L D D
Load the value in V2000 and ANDST 3 3
V2001 into the accumulator Acc. 6 7 3 9 55 00 22 66
C A A A ENT
2 0 0 0
OUTD
GX SHFT D
V2010 OUT 3
Copy the value in the 6 7 3 9 5 0 2 6 C A B A ENT
accumulator to V2010 and V2011 V2010 2 0 1 0
V2011
In the following example, when C0 is on, the binary pattern of C10–C16 (7 bits) will be
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.
Direct SOFT32
C0 Location Constant
LDF C10 C16 C15 C14 C13 C12 C11 C10
K7 C10 K7 OFF OFF OFF ON ON ON OFF
$ SHFT C A ENT
STR 2 0
SHFT L D F
ANDST 3 5
SHFT C B A H ENT
2 1 0 7
GX SHFT F
OUT 5
A H ENT
0 7
Pop (POP)
The Pop instruction moves the value from the first level of the
accumulator stack (32 bits) to the accumulator and shifts each
value in the stack up one level. POP
OUT Level 4 X X X X X X X X
V2000 Level 5 X X X X X X X X
V2000 4 5 4 5 Level 6 X X X X X X X X
Copy the value in the lower 16 bits of
the accumulator to V2000 Level 7 X X X X X X X X
Level 8 X X X X X X X X
POP
Previous Acc. value
Acc. 0 0 0 0 44 55 44 55
Pop the 1st. value on the stack into the
accumulator and move stack values Current Acc. value Accumulator Stack
up one location
Acc. 0 0 0 0 3 7 9 2 Level 1 0 0 0 0 7 9 3 0
Level 2 X X X X X X X X
OUT Level 3 X X X X X X X X
V2001
Level 4 X X X X X X X X
Pop the 1st. value on the stack into the Previous Acc. value
accumulator and move stack values
up one location Acc. 0 0 0 0 3 7 9 2
In the following example, when X1 is on, the constant value 3544 is loaded into the
accumulator. This is the value that will be output to the specified offset V memory location
(V1525). The value 3544 will be placed onto the stack when the Load Address instruction is
executed. Remember, two consecutive Load instructions places the value of the first load
instruction onto the stack. The Load Address instruction converts octal 25 to HEX 15 and
places the value in the accumulator. The Out Indexed instruction outputs the value 3544
which resides in the first level of the accumulator stack to V1525.
DirectSOFT32
Constant
X1 LD
3 5 4 4
K3544
The unused accumulator
Load the accumulator with
bits are set to zero
the value 3544
Acc. 0 0 0 0 3 5 4 4
Octal HEX
LDA
2 5 0 0 1 5
O25
Load the HEX equivalent to
The unused accumulator
octal 25 into the lower 16 bits
bits are set to zero
of the accumulator. This is the
offset for the Out Indexed 0 0 0 0 0 0 1 5
Acc.
instruction, which determines
the final destinaltion address
Octal Octal Octal
OUTX
V 1 5 0 0 + 2 5 = V 1 5 2 5
V1500 Accumulator Stack
The hex 15 converts
to 25 octal, which is 3 5 4 4 Level 1 0 0 0 0 3 5 4 4
Copy the value in the first
level of the stack to the added to the base Level 2 X X X X X X X X
address of V1500 to yield V1525
offset address 1525
(V1500+25) the final answer Level 3 X X X X X X X X
Level 4 X X X X X X X X
Handheld Programmer Keystrokes
Level 5 X X X X X X X X
$ B ENT
STR 1 Level 6 X X X X X X X X
Level 7 X X X X X X X X
SHFT L D PREV D F E E ENT
ANDST 3 3 5 4 4 Level 8 X X X X X X X X
L D A C F ENT
SHFT
ANDST 3 0 2 5
GX SHFT X B F A A ENT
OUT SET 1 5 0 0
$ B ENT
STR 1
0 0 3 5
SHFT L D B E A A ENT
ANDST 3 1 4 0 0 V1500
GX SHFT L B F A A ENT
OUT ANDST 1 5 0 0
In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16
bits of the accumulator using the Load instruction. The value in the upper 8 bits of the lower
16 bits of the accumulator are copied to V1500 using the Out Most instruction.
DirectSOFT32
X1 Load the value in V1400 into V1400
LD the lower 16 bits of the
V1400 accumulator 8 9 3 5
$ B ENT 8 9 0 0
STR 1
V1500
SHFT L D B E A A ENT
ANDST 3 1 4 0 0
GX SHFT M B F A A ENT
OUT ORST 1 5 0 0
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is anded with the value
in V2006 using the And instruction. The value in the lower 16 bits of the accumulator is
output to V2010 using the Out instruction.
Direct SOFT32
X1 V2000
LD
2 8 7 A
V2000
Load the value in V2000 into The upper 16 bits of the accumulator
the lower 16 bits of the will be set to 0
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
OUT
V2010
2 8 3 8
Copy the lower 16 bits of the
accumulator to V2010 V2010
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
V SHFT V C A A G ENT
AND AND 2 0 0 6
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.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is anded
with 36476A38 using the And Double instruction. The value in the accumulator is output to
V2010 and V2011 using the Out Double instruction.
V2000
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
OUTD
V2010 1 4 4 6 2 8 3 8
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
V SHFT D SHFT K D G E H G SHFT A SHFT D I ENT
AND 3 JMP 3 6 4 7 6 0 3 8
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.
In the following example, when X1 is on the Load Formatted instruction loads C10–C13 (4
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.
DirectSOFT32
X1 Location Constant
LDF C10 C13 C12 C11 C10
K4 C10 K4 ON ON ON OFF
K4 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
ndard RLL
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the binary value in the accumulator will be anded
with the binary value in the first level or the accumulator stack. The result resides in the
accumulator. The 32 bit value is then output to V1500 and V1501.
DirectSOFT32
X1 LDD V1401 V1400
5 4 7 E 2 8 7 A
V1400
Load the value in V1400 and
1401 into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
ANDS
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
36476A38
AND the value in the
accumulator with the AND (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
first level of the
accumulator stack Acc. 0 0 0 1
0 0 1 0 0 0 0
1 0 0 0 1
0 0
1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0
OUTD
V1500
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
V SHFT S ENT
AND RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
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 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.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is ored with V2006
using the Or instruction. The value in the lower 16 bits of the accumulator are output to
V2010 using the Out instruction.
Direct SOFT32
X1 V2000
LD
2 8 7 A
V2000
Load the value in V2000 into The upper 16 bits of the accumulator
the lower 16 bits of the will be set to 0
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
OR
V2006 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
6 A 7 A
Copy the value in the lower
16 bits of the accumulator to V2010
V2010
Handheld Programmer Keystrokes
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
Q SHFT V C A A G ENT
OR AND 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
Or Double (ORD)
The Or Double is a 32 bit instruction that ors the value in the
accumulator with the value (Aaaa), which is either two ORD
consecutive V memory locations or an 8 digit (max.) constant K aaa
value. The result resides in the accumulator. Discrete status flags
indicate if the result of the Or Double is zero or a negative
number (the most significant bit is on).
Operand Data Type DL06 Range
aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–FFFFFFFF
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the accumulator is
ored with 36476A38 using the Or Double instruction. The value in the accumulator is
output to V2010 and V2011 using the Out Double instruction.
Direct SOFT32
X1 V2001 V2000
LDD
5 4 7 E 2 8 7 A
V2000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
ORD
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
OUTD
V2010
7 6 7 F 6 A 7 A
Copy the value in the
accumulator to V2010 and V2011 V2010
V2011
$ B ENT
STR 1
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
OR 3 JMP 3 6 4 7 6 0 3 8
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
Or Formatted (ORF)
The Or Formatted instruction logically ORs the binary
value in the accumulator and a specified range of discrete ORF A aaa
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
(the most significant bit =1).
Operand Data Type DL06 Range
A/B aaa bbb
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0-777 --
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0-777 --
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0-1777 --
Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0-1777 --
Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0-377 --
Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0-177 --
Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP 0-777 --
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K - 1-32
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
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
accumulator’s lower four bits to C20–C23.
DirectSOFT32
X1 LDF C10 Location Constant C13 C12 C11 C10
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
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
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 Y23 Y22 Y21 Y20
OR (Y20-- Y23) ON OFF OFF OFF 1 0 0 0
OUTF C20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
K4
Copy the specified number
of bits from the accumulator
to C20-C23
Handheld Programmer Keystrokes
Location Constant C23 C22 C21 C20
$ B ENT
STR 1 C20 K4 ON ON ON OFF
In the following example when X1 is on, the binary value in the accumulator will be ored
with the binary value in the first level of the stack. The result resides in the accumulator.
DirectSOFT32
X1 V1401 V1400
LDD
5 4 7 E 2 8 7 A
V1400
Load the value in V1400 and
V1401 in the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 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
ORS
Acc. 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
OR the value in the 36476A38
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
OUTD
V1500
Copy the value in the 7 6 7 F 6 A 7 A
accumulator to V1500 and
V1501 V1501 V1500
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
Q SHFT S ENT
OR RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
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
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
zero.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is exclusive ored with
V2006 using the Exclusive Or instruction. The value in the lower 16 bits of the accumulator
are output to V2010 using the Out instruction.
Direct SOFT32
X1 V2000
LD
2 8 7 A
V2000
Load the value in V2000 into The upper 16 bits of the accumulator
the lower 16 bits of the will be set to 0
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
XOR
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
4 2 4 2
Copy the lower 16 bits of the
accumulator to V2010 V2010
$ SHFT X B ENT
STR SET 1
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is
exclusively ored with 36476A38 using the Exclusive Or Double instruction. The value in the
accumulator is output to V2010 and V2011 using the Out Double instruction.
V2000
OUTD Acc. 0 0
1 0
1 0 0 1
0 0
1 0 0 0 0
1 0
1 0
1 0 0 1
0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
V2010
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the binary pattern of C10–C13 (4 bits) will be
loaded into the accumulator using the Load Formatted instruction. The value in the
accumulator will be logically Exclusive Ored with the bit pattern from Y20–Y23 using the
Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator are
output to C20–C23 using the Out Formatted instruction.
DirectSOFT32
Location Constant C13 C12 C11 C10
X1
LDF C10 C10 K4 OFF ON ON OFF
K4
Load the status of 4 The unused accumulator bits are set to zero
consecutive bits (C10-C13)
into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
X0RF Y20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
K4 Accumulator
Exclusive OR the binary bit Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
pattern (Y20-Y23) with the
value in the accumulator Y23 Y22 Y21 Y20
XORF (Y20-Y23) ON OFF OFF OFF 1 0 0 0
OUTF C20
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
K4
Standard RLL
$ B ENT
STR 1
In the following example when X1 is on, the binary value in the accumulator will be exclusive
ored with the binary value in the first level of the accumulator stack. The result will reside in
the accumulator.
DirectSOFT32
X1 LDD V1401 V1400
5 4 7 E 2 8 7 A
V1400
Load the value in V1400 and
V1401 into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 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
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
Exclusive OR the value 36476A38
in the accumulator XOR (1st level of Stack) 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0
with the value in the
first level of the Acc. 0 0
1 0 0
1 0 1
0 0
1 0 0 0 0
1 0
1 0 0
1 0 0
1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
accumulator stack
OUTD
V1500
6 2 3 9 4 2 4 2
Copy the value in the
accumulator to V1500 and V1501 V1501 V1500
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
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
specified V memory location (Aaaa). The corresponding status A aaa
flag will be turned on indicating the result of the comparison.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example when X1 is on, the constant 4526 will be loaded into the lower 16
bits of the accumulator using the Load instruction. The value in the accumulator is compared
with the value in V2000 using the Compare instruction. The corresponding discrete status
flag will be turned on indicating the result of the comparison. In this example, if the value in
the accumulator is less than the value specified in the Compare instruction, SP60 will turn on
energizing C30.
Direct SOFT32
X1 LD CONSTANT
K4526 4 5 2 6
Acc. 0 0 0 0 44 55 22 66
Compared
with
CMP
V2000
8 9 4 5
Compare the value in the
accumulator with the value V2000
in V2000
SP60 C30
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is
compared with the value in V2010 and V2011 using the CMPD instruction. The
corresponding discrete status flag will be turned on indicating the result of the comparison. In
this example, if the value in the accumulator is less than the value specified in the Compare
instruction, SP60 will turn on energizing C30.
Direct SOFT32
X1 V2001 V2000
LDD
4 5 2 6 7 2 9 9
V2000
Acc. 4 5 2 6 77 72 9 9
Compared
CMPD with
V2010
6 7 3 9 5 0 2 6
Compare the value in the
accumulator with the value V2011 V2010
in V2010 and V2011
SP60 C30
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads the binary
value (6) from 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
accumulator is less than the value specified in the Compare instruction, SP60 will turn on
energizing C30.
DirectSOFT32
Location Constant
X1 Load the value of the C13 C12 C11 C10
LDF C10
specified discrete locations C10 K4 OFF ON ON OFF
K4 (C10-- C13) into the
accumulator The unused accumulator
bits are set to zero
Compare the value in the
CMPF Y20 accumulator with the value
K4 of the specified discrete Acc. 0 0 0 0 0 0 0 6
location (Y20-- Y23)
SP60 C30 Compared
Y23 Y22 Y21 Y20 with
OUT
ON ON ON OFF
E
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The value in V1410 and V1411 is loaded
into the accumulator using the Load Double instruction. The value that was loaded into the
accumulator from V1400 and V1401 is placed on top of the stack when the second Load
instruction is executed. The value in the accumulator is compared with the value in the first
level or the accumulator stack using the CMPS instruction. The corresponding discrete status
flag will be turned on indicating the result of the comparison. In this example, if the value in
the accumulator is less than the value in the stack, SP60 will turn on, energizing C30.
DirectSOFT32 V1401 V1400
X1 Load the value in V1400 and 6 5 0 0 3 5 4 4
LDD V1401 into the accumulator
V1400
SP60 C30
OUT Acc. 5 5 0 0 3 5 4 4
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT L D D B E B A ENT
ANDST 3 3 1 4 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the LDR instruction loads the real number
representation for 7 decimal into the accumulator. The CMPR instruction compares the
accumulator contents with the real representation for decimal 6. Since 7 > 6, the
corresponding discrete status flag is turned on (special relay SP60).
DirectSOFT32
X1 LDR
R7.0
Acc. 4 0 E 0 0 0 0 0
CMPR
R6.0
CMPR 4 0 D 0 0 0 0 0
SP60 C1
OUT
Math Instructions
Add (ADD)
ADD
Add is a 16 bit instruction that adds a BCD value in the
A aaa
accumulator with a BCD value in a V memory location (Aaaa).
The result resides in the accumulator.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the lower 16 bits of the accumulator are
added to the value in V2006 using the Add instruction. The value in the accumulator is
copied to V2010 using the Out instruction.
Direct SOFT32 V2000
X1 4 9 3 5
LD
V2000
OUT
V2010 7 4 3 5
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT A D D C A A G ENT
0 3 3 2 0 0 6
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.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
Direct SOFT32 V2000
X1 4 9 3 5
LD
V2000
OUT
V2010 7 4 3 5
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT A D D C A A G ENT
0 3 3 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT32
X1 4 0 E 0 0 0 0 0
LDR
R7.0
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
OUTD
Acc. 0 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V1400
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.
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
16 bits of the accumulator. The result resides in the accumulator.
Operand Data Type DL06Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in V2006 is subtracted from the value in
the accumulator using the Subtract instruction. The value in the accumulator is copied to
V2010 using the Out instruction.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in V2006 and V2007 is
subtracted from the value in the accumulator. The value in the accumulator is copied to
V2010 and V2011 using the Out Double instruction.
Direct SOFT32 V2001 V2000
0 1 0 6 3 2 7 4
X1 LDD
V2000
OUTD 0 0 3 9 0 8 9 9
V2010
V2011 V2010
Copy the value in the
accumulator to V2010 and
V2011
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT32
X1 4 1 B 0 0 0 0 0
LDR
R22.0
7 Acc. 4 0 E 0 0 0 0 0
SUBR
R15.0 V1401 V1400
Subtract the real number 4 0 E 0 0 0 0 0 (Hex number)
15.0 from the accululator
contents, which is in real
number format.
Real Value
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
OUTD
Acc. 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V1400
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
Multiply (MUL)
Multiply is a 16 bit instruction that multiplies the BCD
MUL
value (Aaaa), which is either a V memory location or a
A aaa
4–digit (max.) constant, by the BCD value in the lower 16
bits of the accumulator The result can be up to 8 digits
and resides in the accumulator.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–9999
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in V2006 is multiplied by the value in the
accumulator. The value in the accumulator is copied to V2010 and V2011 using the Out
Double instruction.
Direct SOFT32 V2000
X1 1 0 0 0
LD
V2000
The unused accumulator
Load the value in V2000 into bits are set to zero
the lower 16 bits of the
accumulator 0 0 0 0 1 0 0 0 (Accumulator)
(V2006)
X 2 5
MUL
V2006 Acc. 0 0 0 2 5 0 0 0
0 0 0 2 5 0 0 0
OUTD
V2011 V2010
V2010
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT M U L C A A G ENT
ORST ISG ANDST 2 0 0 6
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.
In the following example, when X1 is on, the constant Kbc614e hex will be loaded into the
accumulator. When converted to BCD the number is ”12345678”. That numbers stored in
V1400 and V1401. After loading the constant K2 into the accumulator, we multiply it times
12345678, which is 24691356.
Direct SOFT32 Display
1 2 3 4 5 6 7 8 (Accumulator)
X1 LDD Load the hex equivalent
of 12345678 decimal into
Kbc614e the accumulator.
2 4 6 9 1 3 5 6
MULD Multiply the accumulator
contents (2) by the
V1400 V1403 V1402
8-digit number in V1400
and V1401.
$ B ENT
STR 1
SHFT B C D ENT
1 2 3
GX SHFT D B E A A ENT
OUT 3 1 4 0 0
SHFT M U L D B E A A ENT
ORST ISG ANDST 3 1 4 0 0
GX SHFT D B E A C ENT
OUT 3 1 4 0 2
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT32 Display
X1 4 0 E 0 0 0 0 0
LDR
R 7.0
1 0 5 Acc. 4 2 D 2 0 0 0 0
MULR
R 15.0 V1401 V1400
Multiply the accumulator 4 2 D 2 0 0 0 0 (Hex number)
contents by the real number
15.0
Real 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
OUTD
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
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
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
first stack location.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–9999
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator will be divided by the
value in V2006 using the Divide instruction. The value in the accumulator is copied to
V2010 using the Out instruction.
Direct SOFT32 V2000
5 0 0 0
X1 LD
V2000
OUT 1 0 2
V2010 V2010
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT D I V C A A G ENT
3 8 AND 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is divided
by the value in V1420 and V1421 using the Divide Double instruction. The first part of the
quotient resides in the accumulator an the remainder resides in the first stack location. The
value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.
Direct SOFT32 V1401 V1400
X1 LDD 0 1 5 0 0 0 0 0
V1400
OUTD
V1500 0 0 0 3 0 0 0 0
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT D I V C A A G ENT
3 8 AND 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT32 Display
X1 4 1 7 0 0 0 0 0
LDR
R15.0
Real 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
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
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.
Increment (INC)
The Increment instruction increments a BCD value in a INC
specified V memory location by “1” each time the instruction A aaa
is executed.
Decrement (DEC)
The Decrement instruction decrements a BCD value in a DEC
specified V memory location by “1” each time the instruction is
A aaa
executed.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following increment example, when C5 is on the value in V1400 increases by one.
Direct SOFT32 V1400
C5 8 9 3 5
INC
V1400
SHFT I N C B E A A ENT
8 TMR 2 1 4 0 0
In the following decrement example, when C5 is on the value in V1400 is decreased by one.
Direct SOFT32 V1400
C5 8 9 3 5
DEC
V1400
SHFT D E C B E A A ENT
3 4 2 1 4 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator will be added to
the binary value in V1420 using the Add Binary instruction. The value in the accumulator is
copied to V1500 and V1501 using the Out instruction.
DirectS OF T 32 Dis play V1400
0 A 0 5
X1 LD
V1400
OU T D 1 C C 9
V1500
V1500
C opy the value in the lower
16 bits of the accumulator to
V1500 and V1501
STR X(IN) 1 E NT
S HF T L D V 1 4 0 0 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
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The binary value in the accumulator is
added with the binary value in V1420 and V1421 using the Add Binary Double instruction.
The value in the accumulator is copied to V1500 and V1501 using the Out Double
instruction.
DirectS OF T 32 Dis play V1401 V1400
X1 0 0 0 0 0 A 0 1
LDD
V1400
1 0 0 0 C A 1 1
OU T D
V1500 V1501 V1500
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT A D D B D B E C A ENT
0 3 3 1 3 1 4 2 0
GX D B F A A ENT
SHFT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is subtracted from the
binary value in the accumulator using the Subtract Binary instruction. The value in the
accumulator is copied to V1500 using the Out instruction.
DirectS OF T 32 Dis play V1400
1 0 2 4
X1 LD
V1400
OU T 0 6 1 9
V1500
V1500
C opy the value in the lower 16
bits of the accumulator to V1500
STR X(IN) 1 E NT
S HF T L D V 1 4 0 0 E NT
S HF T S S HF T U B B
V 1 4 2 0 E NT
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.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The binary value in V1420 and V1421 is
subtracted from the binary value in the accumulator using the Subtract Binary Double
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
DirectS OF T 32 Dis play V1401 V1400
0 0 0 6 0 0 F F
X1
LDD
V1400
0 0 0 5 E 6 F E
OU T D
V1501 V1500
V1500
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT S U B B D B E C A ENT
SHFT
RST ISG 1 1 3 1 4 2 0
GX D B F A A ENT
SHFT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is multiplied by the
binary value in the accumulator using the Multiply Binary instruction. The value in the
accumulator is copied to V1500 using the Out instruction.
OU T D 0 0 0 1 C C 2 E
V1500
V1501 V1500
C opy the value in the lower
16 bits of the accumulator to
V1500 and V1501
STR X 1 E NT
S HF T L D V 1 4 0 0 E NT
S HF T M U L B V 1 4 2 0 E NT
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.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator is divided by
the binary value in V1420 using the Divide Binary instruction. The value in the accumulator
is copied to V1500 using the Out instruction.
DirectS OF T32 Dis play V1400
F A 0 1
X1 LD
V1400
OUT 0 3 2 0
V1500
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
S HF T L D V 1 4 0 0 E NT
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
In the following example when C5 is on, the binary value in V2000 is increased by 1.
Direct SOFT32 V2000 Handheld Programmer Keystrokes
C5 4 A 3 C
INCB $ SHFT C F ENT
STR 2 5
V2000
SHFT I N C B C A A A ENT
Increment the binary value 8 TMR 2 1 2 0 0 0
in the accumulator by“1” V2000
4 A 3 D
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X6 is on, the value formed by discrete locations 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
instruction. The value in the lower four bits of the accumulator is copied to Y10–Y13 using
the Out Formatted instruction.
Direct SOFT32 Display
X3 X2 X1 Z0
X6 LDF X0 Load the value represented ON OFF OFF OFF
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
accumulator with the value
K4 represented by discrete + 3 (C0-C3) OFF OFF ON ON
location C0–C3
Acc. 0 0 0 1 0 0 0 1
SHFT L D F A E ENT
ANDST 3 5 0 4
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
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
Formatted instruction. The value in the lower four bits of the accumulator is copied to
DirectSOFT32 Display X3 X2 X1 X0
X6 Load the value represented ON OFF OFF ON
LDF X0
by discrete locations X0-- X3
K4 into the accumulator
The unused accumulator
bits are set to zero
SHFT L D F A E ENT
ANDST 3 5 0 4
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value formed by
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
Y10–Y13 using the Out Formatted instruction.
DirectSOFT32 Display
X3 X2 X1 X0
X6 Load the value represented OFF OFF ON ON
LDF X0
by discrete locations X0-- X3
K4 into the accumulator
The unused accumulator
bits are set to zero
Multiply the value in the 0 0 0 0 0 0 0 3 (Accumulator) C3 C2 C1 C0
MULF C0
accumulator with the value
K4 represented by discrete ¢ 2 (C0-- C3) OFF OFF ON OFF
locations C0-- C3
Acc. 0 0 0 0 0 0 0 6
Copy the lower 4 bits of the
OUTF Y10 accumulator to discrete
K4 locations Y10-- Y13
SHFT L D F A E ENT
ANDST 3 5 0 4
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X6 is on, the value formed by discrete locations X0–X3 is
loaded into the accumulator using the Load Formatted instruction. The value in the
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
Y10–Y13 using the Out Formatted instruction.
DirectSOFT32 Display X3 X2 X1 X0
X6 Load the value represented ON OFF OFF OFF
LDF X0 by discrete locations X0-- X3
K4 into the accumulator
The unused accumulator
bits are set to zero
Divide the value in the 0 0 0 0 0 0 0 8 (Accumulator) C3 C2 C1 C0
DIVF C0
accumulator with the value
K4 - 2 (C0-- C3) OFF OFF ON OFF
represented by discrete
location C0-- C3
Acc. 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0
SHFT L D F A E ENT
ANDST 3 5 0 4
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded in the accumulator onto the accumulator stack. The value in the first level of the
accumulator stack is added with the value in the accumulator using the Add Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
DirectS OF T 32 Dis play V1401 V1400
L D D B E A A Level 7 X X X X X X X X
SHFT ENT
ANDST 3 3 1 4 0 0 X X X X X X X X
Level 8
SHFT L D D B E C A ENT
ANDST 3 3 1 4 2 0
SHFT A D D S ENT
0 3 3 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded into the accumulator onto the accumulator stack. The BCD value in the first level of
the accumulator stack is subtracted from the BCD value in the accumulator using the
Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501
using the Out Double instruction.
DirectSOFT32 Display V1401 V1400
X1 Load the value in V1400 and 0 0 1 7 2 0 5 6 Accumulator stack
LDD after 1st LDD
V1401 into the accumulator
V1400
Level 1 X X X X X X X X
Acc. 0 0 1 7 2 0 5 6 Level 2 X X X X X X X X
Level 3 X X X X X X X X
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 Level 5 X X X X X X X X
$ B Level 6 X X X X X X X X
ENT
STR 1 Level 7 X X X X X X X X
SHFT L D D B E A A ENT Level 8 X X X X X X X X
ANDST 3 3 1 4 0 0
SHFT L D D B E C A ENT
ANDST 3 3 1 4 2 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The value in V1420 is loaded into the accumulator
using the Load instruction, pushing the value previously loaded in the accumulator onto the
accumulator stack. The BCD value in the first level of the accumulator stack is multiplied by
the BCD value in the accumulator using the Multiply Stack instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.
ANDST 3 1 4 0 0
SHFT L D B E C A
ENT
ANDST 3 1 4 2 0
SHFT M U L S ENT
ORST ISG ANDST RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the Load instruction loads the value in V1400 into
the accumulator. The value in V1420 is loaded into the accumulator using the Load Double
instruction, pushing the value previously loaded in the accumulator onto the accumulator
stack. The BCD value in the accumulator is divided by the BCD value in the first level of the
accumulator stack using the Divide Stack instruction. The Out Double instruction copies the
value in the accumulator to V1500 and V1501.
Accumulator stack
after 2nd LDD
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
Level 4 X X X X X X X X
Copy the value in the
OUTD Level 5 X X X X X X X X
accumulator to V1500
V1500 and V1501 0 0 0 2 5 0 0 0
Level 6 X X X X X X X X
V1501 V1500 Level 7 X X X X X X X X
Level 8 X X X X X X X X
D I V S Level 5 X X X X X X X X
SHFT ENT
3 8 AND RST Level 6 X X X X X X X X
GX SHFT D B F A A ENT Level 7 X X X X X X X X
OUT 3 1 5 0 0
Level 8 X X X X X X X X
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded in the accumulator onto the accumulator stack. The binary value in the first level of
the accumulator stack is added with the binary value in the accumulator using the Add Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
Level 1 0 0 3 A 5 0 C 6
OU T D C opy the value in the
accumulator to V1500 Level 2 X X X X X X X X
V1500 and V1501 0 0 5 2 0 1 2 5
Level 3 X X X X X X X X
S tandard R LL
Level 4 X X X X X X X X
Handheld Programmer Keystrokes
Level 5 X X X X X X X X
$ B Level 6 X X X X X X X X
ENT
STR 1
Level 7 X X X X X X X X
SHFT L D D B E A A ENT Level 8 X X X X X X X X
ANDST 3 3 1 4 0 0
SHFT L D D B E C A ENT
ANDST 3 3 1 4 2 0
SHFT A D D B S ENT
0 3 3 1 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is
loaded into the accumulator using the Load Double instruction, pushing the value previously
loaded in the accumulator onto the accumulator stack. The binary value in the first level of
the accumulator stack is subtracted from the binary value in the accumulator using the
Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501
using the Out Double instruction.
X1 0 0 1 A 2 0 5 B Accumulator stack
LDD Load the value in V1400 and
V1401 into the accumulator after 1st LDD
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
V1421 V1420 Level 4 X X X X X X X X
Load the value in V1420 and 0 0 3 A 5 0 C 6 Level 5 X X X X X X X X
LDD
V1421 into the accumulator
V1420 Level 6 X X X X X X X X
Level 7 X X X X X X X X
Acc. 0 0 3 A 5 0 C 6
Level 8 X X X X X X X X
SHFT L D D B E C A ENT
ANDST 3 3 1 4 2 0
SHFT S U B B S ENT
SHFT
RST ISG 1 1 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the Load instruction moves the value in V1400 into
the accumulator. The value in V1420 is loaded into the accumulator using the Load
instruction, pushing the value previously loaded in the accumulator onto the stack. The
binary value in the accumulator stack’s first level is multiplied by the binary value in the
accumulator using the Multiply Binary Stack instruction. The Out Double instruction copies
the value in the accumulator to V1500 and V1501.
DirectSOFT32 Display V1400 Accumulator stack
C 3 5 0 after 1st LDD
X1 Load the value in V1400 into
LD The unused accumulator
the accumulator Level 1 X X X X X X X X
V1400 bits are set to zero
Level 2 X X X X X X X X
Acc. 0 0 0 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 Level 6 X X X X X X X X
LD Load the value in V1420 into The unused accumulator
the accumulator bits are set to zero 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 0 0 1 4
Level 1 0 0 0 0 C 3 5 0
Level 2 X X X X X X X X
OUTD Copy the value in the
Level 3 X X X X X X X X
accumulator to V1500
V1500 0 0 0 F 4 2 4 0
and V1501 Level 4 X X X X X X X X
V1501 V1500 Level 5 X X X X X X X X
Standard RLL
Instructions
Level 6 X X X X X X X X
Handheld Programmer Keystrokes
Level 7 X X X X X X X X
$ B ENT
STR 1 Level 8 X X X X X X X X
SHFT L D B E A A ENT
ANDST 3 1 4 0 0
SHFT L D B E C A
ENT
ANDST 3 1 4 2 0
SHFT M U L B S ENT
ORST ISG ANDST 1 RST
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The value in V1420 and V1421 is loaded into the
accumulator using the Load Double instruction also, pushing the value previously loaded in
the accumulator onto the accumulator stack. The binary value in the accumulator is divided
by the binary value in the first level of the accumulator stack using the Divide Binary Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
L D D B E C A Level 3 X X X X X X X X
SHFT ENT
ANDST 3 3 1 4 2 0 Level 4 X X X X X X X X
Transcendental Functions
The DL06 CPU features special numerical functions to complement its real number
capability. The transcendental functions include the trigonometric sine, cosine, and tangent,
and also their inverses (arc sine, arc cosine, and arc tangent). The square root function is also
grouped with these other functions.
The transcendental math instructions operate on a real number in the accumulator (it cannot
be BCD or binary). The real number result resides in the accumulator. The square root
function operates on the full range of positive real numbers. The sine, cosine and tangent
functions require numbers expressed in radians. You can work with angles expressed in
degrees by first converting them to radians with the Radian (RAD) instruction, then
performing the trig function. All transcendental functions utilize the following flag bits.
The following example takes the sine of 45 degrees. Since these transcendental functions
operate only on real numbers, we do a LDR (load real) 45. The trig functions operate only in
radians, so we must convert the degrees to radians by using the RADR command. After using
the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the
result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out
Double to move it.
Accumula tor contents
DirectS OF T 32 Dis play (viewed a s rea l number)
X1 Load the real number 45 into
LDR
R 45
the accumulator. 45. 000000
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use DirectSOFT32 for entering real numbers, using the LDR (Load Real) instruction.
In the following example, when X1 is on, the value formed by discrete locations X10–X17 is
loaded into the accumulator using the Load Formatted instruction. The number of bits in the
accumulator set to “1” is counted using the Sum instruction. The value in the accumulator is
copied to V1500 using the Out instruction.
Acc. 0 0 0 0 0 0 0 5
SUM
OUT 0 0 0 5
V1500
V1500
Copy the value in the lower
16 bits of the accumulator
to V1500
Handheld Programmer Keystrokes
$ B ENT
STR 1
SHFT L D F B A I ENT
ANDST 3 5 1 0 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 bit pattern in the accumulator is
shifted 2 bits to the left using the Shift Left instruction. The value in the accumulator is
copied to V2010 and V2011 using the Out Double instruction.
Direct SOFT32
V2001 V2000
X1 LDD 6 7 0 5 33 31 10 01
V2000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SHFL Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
K2
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
Copy the value in the Acc. 0
1 0 0 0
1 0
1 1 0 0 0 0 0 0
1 0 0
1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0
accumulator to V2010 and
V2011
9 C 1 4 C 4 0 4
V2011 V2010
Handheld Programmer Keystrokes
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The bit pattern in the accumulator is
shifted 2 bits to the right using the Shift Right instruction. The value in the accumulator is
copied to V2010 and V2011 using the Out Double instruction.
... .
The bit pattern in the
accumulator is shifted 2 bit
positions to the right Shifted out of the
accumulator
OUTD
V2010 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 9 C 1 4 C 4 0
V2011 V2010
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The bit pattern in the accumulator is
rotated 2 bit positions to the left using the Rotate Left instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.
DirectSOFT32 Display
V1401 V1400
X1
LDD 6 7 0 5 3 1 0 1
V1400
ROTL 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
K2 Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
OUTD
V1500
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Copy the value in the
accumulator to V1500 Acc. 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1
and V1501
9 C 1 4 C 4 0 5
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT R O T L C ENT
ORN INST# MLR ANDST 2
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into
the accumulator using the Load Double instruction. The bit pattern in the accumulator is
rotated 2 bit positions to the right using the Rotate Right instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.
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
ROTR
Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
K2
OUTD
V1500
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Copy the value in the 0 0
1 0 0
1 0
1 1
0 0 0
1 0
1 0
1 0 0 0 0 0 0
1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0
Acc.
accumulator to V1500
and V1501
5 9 C 1 4 C 4 0
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT R O T R C ENT
ORN INST# MLR ORN 2
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
Encode (ENCO)
The Encode instruction encodes the bit position in the
accumulator having a value of 1, and returns the
appropriate binary representation. If the most significant ENCO
bit is set to 1 (Bit 31), the Encode instruction would place
the value HEX 1F (decimal 31) in the accumulator. If the
value to be encoded is 0000 or 0001, the instruction will
place a zero in the accumulator. If the value to be encoded
has more than one bit position set to a “1”, the least
significant “1” will be encoded and SP53 will be set on.
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
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.
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, The value in V2000 is loaded into the accumulator
using the Load instruction. The bit position set to a “1” in the accumulator is encoded to the
corresponding 5 bit binary value using the Encode instruction. The value in the lower 16 bits
of the accumulator is copied to V2010 using the Out instruction.
Direct SOFT32 V2000
1 0 0 0
X1 LD
V2000
Bit postion 12 is
converted
to binary
ENCO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Encode the bit position set
to “1” in the accumulator to a Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
5 bit binary value
OUT
V2010
$ B ENT
STR 1
SHFT L D C A A A ENT
ANDST 3 2 0 0 0
SHFT E N C O ENT
4 TMR 2 INST#
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
(0–1F HEX) in the accumulator by setting the appropriate bit DECO
position to a 1. If the accumulator contains the value F (HEX),
bit 15 will be set in the accumulator. If the value to be decoded
is greater than 31, the number is divided by 32 until the value
is less than 32 and then the value is decoded.
In the following example when X1 is on, the value formed by discrete locations X10–X14 is
loaded into the accumulator using the Load Formatted instruction. The five bit binary
pattern in the accumulator is decoded by setting the corresponding bit position to a “1” using
the Decode instruction.
Direct SOFT32
X14 X13 X12 X11 X10
X1 LDF X10 OFF ON OFF ON ON
K5
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
Decode the five bit binary Acc. 0 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
pattern in the accumulator
and set the corresponding
bit position to a “1”
$ B ENT
STR 1
SHFT L D F B A F ENT
ANDST 3 5 1 0 5
SHFT D E C O ENT
3 4 2 INST#
In the following example, when X1 is on, the value in V2000 and V2001 is loaded into the
accumulator using the Load Double instruction. The BCD value in the accumulator is
converted to the binary (HEX) equivalent using the BIN instruction. The binary value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction. (The
handheld programmer will display the binary value in V2010 and V2011 as a HEX value.)
X1 0 0 0 2 8 5 2 9
LDD
V2000
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1
BCD Value
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Convert the BCD value in Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1
the accumulator to the
binary equivalent value 2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1 5 2 1 6 3 1 8 4 2 1
1 0 3 6 3 7 3 6 3 1 0 0 2 6 3 5 2 6 1 0 0 0 1 5 2 4 2 6
4 7 6 8 4 1 5 7 8 9 9 4 4 2 1 5 7 3 9 9 4 2 2 6 8
7 3 8 4 2 0 5 7 8 4 7 8 2 1 0 3 6 8 2 6 8 4
4 7 7 3 1 8 4 7 6 3 1 5 8 4 7 6 8 4
4 4 0 5 7 8 4 2 0 0 5 7 8 4 2
8 1 9 4 7 6 3 1 8 4 2 6
3 8 1 5 2 4 2 6
6 2 2 6 8
4 4
8
OU T D
V2010 The Binary (HEX)
0 0 0 0 6 F 7 1 value copied to
Copy the binary data in the
V2010
accumulator to V2010 and V2011 V2011 V2010
S tandard R LL
Ins tructions
$ B
E NT
STR 1
L D D C A A A
S HF T E NT
ANDS T 3 3 2 0 0 0
S HF T B I N E NT
1 8 T MR
GX D C A B A
S HF T E NT
OU T 3 2 0 1 0
In the following example, when X1 is on, the binary (HEX) value in V2000 and V2001 is
loaded into the accumulator using the Load Double instruction. The binary value in the
accumulator is converted to the BCD equivalent value using the BCD instruction. The BCD
value in the accumulator is copied to V2010 and V2011 using the Out Double instruction.
X1 0 0 0 0 6 F 7 1
LDD
V2000 Binary Value
BC D
16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 = 28529
OU T D
V2010
$ B E NT
STR 1
L D D C A A A
S HF T E NT
ANDS T 3 3 2 0 0 0
B C D
S HF T E NT
1 2 3
GX S HF T D C A B A E NT
OU T 3 2 0 1 0
Invert (INV)
The Invert instruction inverts or takes the one’s INV
complement of the 32 bit value in the accumulator. The
result resides in the accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is inverted
using the Invert instruction. The value in the accumulator is copied to V2010 and V2011
using the Out Double instruction.
X1 0 4 0 5 00 22 55 00
LDD
V2000
INV
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. 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 1
Invert the binary bit pattern
in the accumulator
OUTD F B F A F D A F
V2010 V2011 V2010
Copy the value in the
accumulator to V2010 and
V2011
$ B ENT
STR 1
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 SHFT D C A B A ENT
OUT 3 2 0 1 0
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
Complement instruction. The value in the accumulator is copied to V2010 and V2011 using
the Out Double instruction.
BC DC PL 9 9 9 9 9 9 1 3
Acc.
OU T D
9 9 9 9 9 9 1 3
V2010
V2011 V2010
C opy the value in the
accumulator to V2010 and
V2011
$ B E NT
STR 1
L D D C A A A
S HF T E NT
ANDS T 3 3 2 0 0 0
B C D C P L
S HF T E NT
1 2 3 2 CV ANDS T
GX D C A B A
S HF T E NT
OU T 3 2 0 1 0
In the following example, when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The BTOR instruction converts the binary
value in the accumulator the equivalent real number format. The binary weight of the MSB is
converted to the real number exponent by adding it to 127 (decimal). Then the remaining
bits are copied to the mantissa as shown. The value in the accumulator is copied to V1500
and V1501 using the Out Double instruction. The handheld programmer would display the
binary value in V1500 and V1501 as a HEX value.
DirectSOFT32 Display V1401 V1400
X1 0 0 0 5 7 2 4 1
LDD
V1400
Binary Value
2 (exp 18)
127 + 18 = 145
145 = 128 + 16 + 1
BTOR
OUTD
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
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT B T O R ENT
1 MLR INST# ORN
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
In the following example, when X1 is on, the value in V1400 and V1401 is loaded into the
accumulator using the Load Double instruction. The RTOB instruction converts the real
value in the accumulator the equivalent binary number format. The value in the accumulator
is copied to V1500 and V1501 using the Out Double instruction. The handheld programmer
would display the binary value in V1500 and V1501 as a HEX value.
DirectSOFT32 Display
Acc. 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0
RTOB
OUTD
V1500
$ B ENT
STR 1
SHFT L D D B E A A ENT
ANDST 3 3 1 4 0 0
SHFT R T O B ENT
ORN MLR INST# 1
GX SHFT D B F A A ENT
OUT 3 1 5 0 0
NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE
format. You must use DirectSOFT32 for entering real numbers, using the LDR (Load Real) instruction.
The following example takes the sine of 45 degrees. Since transcendental functions operate
only on real numbers, we do a LDR (load real) 45. The trig functions operate only in radians,
so we must convert the degrees to radians by using the RADR command. After using the
SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the result
from the accumulator to V-memory. The result is 32-bits wide, requiring the Out Double to
move it.
Accumulator contents
DirectSOFT32 Display
(viewed as real number)
X1 Load the real number 45 into
LDR
R45
the accumulator. 45.000000
O 1400
300 and load the value into
the accumulator
1234 V1600
V1401 31 32
ATH V1600 is the starting
location for the HEX table
V1600
$
STR
B
1
ENT V1402 37 38
L D E
SHFT
ANDST 3
PREV
4
ENT 5678 V1601
L D A B E A A
SHFT
ANDST 3 0 1 4 0 0
ENT
V1403 35 36
SHFT A T H B G A A ENT
0 MLR 7 1 6 0 0
HTA 37 38 V1402
V1400
$ B ENT
STR 1
SHFT L D A B F A A ENT
ANDST 3 0 1 5 0 0
SHFT H T A B E A A ENT
7 MLR 0 1 4 0 0
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.
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
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.
X1 6 F 7 1
LD
V1400
SEG
OUTF Y20
K32
- g f e d c b a - g f e d c b a - g f e d c b a - g f e d c b a Segment
Labels
a
f b
Segment Y57 Y56 Y55 Y54 Y53 Y24 Y23 Y22 Y21 Y20
Labels g
OFF ON ON ON ON OFF OFF ON ON OFF
e c
$ B ENT
STR 1
L D B E A A ENT
ANDST 3 1 4 0 0
S E G ENT
SHFT SHFT
RST 4 6
GX F C A D C
SHFT ENT
OUT 5 2 0 3 2
Direct SOFT32
X27 X26 X25 X12 X11 X10
X1 LDF K16 OFF OFF OFF ON OFF ON
X10
GX V C A B A 0000000100 0007
SHFT ENT
OUT AND 2 0 1 0
1000000001 1022
1000000000 1023
Bit Positions 8 7 6 5 4 3 2 1
B C E F 0 D A 9
Result (accumulator)
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.
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
order.
Example B shows how the shuffle digits works when a 0 or 9–F is used when specifying the
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”.
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,
the most significant duplicate number in the order specified is used in the result.
Direct SOFT32
A B C
X1 LDD V2001 V2000 V2001 V2000 V2001 V2000
V2000 9 A B C D E F 0 0 F E D C B A 9 9 A B C D E F 0
New bit 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
SFLDGT Positions
B C E F 0 D A 9 Acc. 0 0 0 0 E D A 9 Acc. 0 0 0 0 9 A B C Acc.
OUTD
B C E F 0 D A 9 0 0 0 0 E D A 9 0 0 0 0 9 A B C
V2010
V2011 V2010 V2011 V2010 V2011 V2010
Copy the value in the
accumulator to V2010 and
V2011
$ B ENT
STR 1
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
SHFT L D D C A A G ENT
ANDST 3 3 2 0 0 6
Table Instructions
Move (MOV)
The Move instruction moves the values from a V
memory table to another V memory table the same
MOV
length. The function parameters are loaded into the first
V aaa
level of the accumulator stack and the accumulator by
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
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.
This parameter is a HEX value.
• Step 3 Insert the MOVE instruction which specifies starting V memory location (Vaaa) for the
destination table.
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.
Operand Data Type DL06 Range
aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Direct SOFT32
SHFT L D A C A A A ENT
ANDST 3 0 2 0 0 0
SHFT M O V C A D A ENT
ORST INST# AND 2 0 3 0
Direct SOFT32
Data label area X1
programmed after LD
the END instruction K4
.
DLBL K1 . Load the value 4 into the
accumulator specifying the
N C O N 1 2 3 4 V2000 number of locations to be
copied.
K 1 2 3 4
N C O N 4 5 3 2 V2001 LD
K 4 5 3 2 K0
SHFT L D L B L B ENT
ANDST 3 ANDST 1 ANDST 1
SHFT M O V M C C A A A ENT
ORST INST# AND ORST 2 2 0 0 0
SETBIT
The Set Bit instruction sets a single bit to one SETBIT
within a range of V-memory locations. A aaa
RSTBIT RSTBIT
The Reset Bit instruction resets a single bit to zero A aaa
within a range of V-memory locations.
The following description applies to both the Set Bit and Reset Bit table instructions.
Step 1: Load the length of the table (number of V memory locations) into the first level of the
accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V memory location for the table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert an octal
address to hex.
Step 3: Insert the Set Bit or Reset Bit instruction. This specifies the reference for the bit
number of the bit you want to set or reset. The bit number is in octal, and the first bit
in the table is number “0”.
Helpful hint: — Remember that each V memory location contains 16 bits. So, the bits of the
first word of the table are numbered from 0 to 17 octal. For example, if the table length is six
words, then 6 words = (6 x 16) bits, = 96 bits (decimal), or 140 octal. The permissible range
of bit reference numbers would be 0 to 137 octal. SP 53 will be set if the bit specified is
outside the range of the table.
NOTE: Status flags are only valid until the end of the scan or until another instruction that uses the same
flag is executed.
In this ladder example, we will use input X0 to trigger the Set Bit operation. First, we will
load the table length (2 words) into the accumulator stack. Next, we load the starting address
into the accumulator. Since V3000 is an octal number we have to convert it to hex by using
the LDA command. Finally, we use the Set Bit (or Reset Bit) instruction and specify the octal
address of the bit (bit 34), referenced from the table.
$ A ENT
STR 0
L D C ENT
SHFT PREV
ANDST 3 2
SHFT L D A D A A A ENT
ANDST 3 0 3 0 0 0
X B I T D E
SHFT NEXT ENT
SET 1 8 MLR 3 4
Fill (FILL)
The Fill instruction fills a table of up to 255 V memory locations with
F ILL
a value (Aaaa), which is either a V memory location or a 4-digit
A aaa
constant. The function parameters are loaded into the first level of the
accumulator stack and the accumulator by two additional instructions.
Listed below are the steps necessary to program the Fill function.
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.
Step 2:— Load the starting V memory location for the table into the accumulator. This
parameter must be a HEX value.
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
value into the accumulator.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–FF
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
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
(V1400) is specified in the Fill instruction.
DirectS OF T 32 Dis play
X X X X V1576
SHFT L D A B G A A ENT
ANDST 3 0 1 6 0 0
SHFT F I L L B E A A ENT
5 8 ANDST ANDST 1 4 0 0
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
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
the Find function.
Step 1: Load the length of the table (number of V memory locations) into the second level of
the accumulator stack. This parameter must be a HEX value, 0–FF.
Step 2: Load the starting V memory location for the table into the first level of the
accumulator stack. This parameter must be a HEX value.
Step 3: Load the offset from the starting location to begin the search. This parameter must be
a HEX value.
Step 4: Insert the Find instruction which specifies the first value to be found in the table.
Results:— The offset from the starting address to the first V memory location which contains
the search value is returned to the accumulator. SP53 will be set on if an address 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.
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.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0–FFFF
NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The pointer
for this instruction starts at 0 and resides in the accumulator.
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
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
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
location of the table) where the value is located will reside in the accumulator.
$ B
Load the cons tant value ENT
STR 1
2 into the lower 16 bits
of the accumulator L D G
SHFT PREV ENT
ANDST 3 6
L D A B E A
F IND SHFT
ANDST 3 0 1 4 0
K8989
L D C ENT
SHFT PREV
F ind the location in the table ANDST 3 2
where the value 8989 res ides
SHFT F I N D I J I J ENT
NEXT
5 8 TMR 3 8 9 8 9
NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The pointer
for this instruction starts at 0 and resides in the accumulator.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the table and is loaded into the accumulator.
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
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.
X1
LD
K6
S
F ind the value in the table
greater than the s pecified value S
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT F D G T I J I J
NEXT ENT
5 3 6 MLR 8 9 8 9
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
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
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
instruction. The table pointer (V1400 in this case) will be increased by “1” after each
execution of the TTD instruction.
DirectSOFT32
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT T T D B F A A ENT
MLR MLR 3 1 5 0 0
Also, our example uses a normal input contact DirectSOFT32 (optional latch example using SP56)
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
instead of 0. Also, notice how SP56 is only on until the end of the scan.
V1402 9 9 9 9 1 V1402 9 9 9 9 1
Destination Destination
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
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
S S
S S
S
S
S
V1402 9 9 9 9 1 V1402 9 9 9 9 1
Destination Destination
V1403 3 0 7 4 2 V1403 3 0 7 4 2
2 0 4 6 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
V1406 2 0 4 6 5 SP56 V1406 2 0 4 6 5 SP56
V1407 X X X X SP56 = OFF V1407 X X X X SP56 = OFF
S S
S S
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed, or the
end of the scan The pointer for this instruction can be set to start anywhere in the table. It is not set
automatically. You have to load a value into the pointer somewhere in your program.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the
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
RFB instruction.
DirectSOFT32
X1 LD
K6
LDA
0 1400
RFB
V1500
Copy the specified value from
the table to the specified
destination (V1500)
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT R F B B F A A ENT
ORN 5 1 1 5 0 0
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.
Example of Execution
Scan N Before RFB Execution After RFB Execution
V1405 1 0 1 0 5 V1405 1 0 1 0 5
SP56 SP56
V1406 2 0 4 6 6 V1406 2 0 4 6 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
S S
S S
S
S
S
V1402 9 9 9 9 2 V1402 9 9 9 9 2
Destination Destination
V1403 3 0 7 4 3 V1403 3 0 7 4 3
9 9 9 9 V1500 0 5 0 0 V1500
V1404 8 9 8 9 4 V1404 8 9 8 9 4
V1405 1 0 1 0 5 V1405 1 0 1 0 5
NOTE: Status flags (SPs) are only valid until: — another instruction that uses the same flag is executed, or
— the end of the scan The pointer for this instruction starts at 0 and resets to 1 automatically when
the table length is reached.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400), which is the starting location for the destination table and table
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
instruction is executed.
DirectS OF T 32
X1 LD
K6
LDA
0 1400
STT
V1500
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT S T T B F A A
SHFT ENT
RST MLR MLR 1 5 0 0
one-shot (PD) to move one value each time the input LDA
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
instead of 0. Also, notice how SP56 is affected by the execution. Although our example does
not show it, we are assuming that there is another part of the program that changes the value
in V1500 (data source) prior to the execution of the STT instruction. This is not required,
but it makes it easier to see how the data source is copied into the table.
V1402 X X X X 1 V1402 X X X X 1
Source Source
V1403 X X X X 2 V1403 X X X X 2
0 5 0 0 V1500 0 5 0 0 V1500
V1404 X X X X 3 V1404 X X X X 3
V1405 X X X X 4 V1405 X X X X 4
SP56 SP56
V1406 X X X X 5 V1406 X X X X 5
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
S S
S S
S
S
S
V1402 9 9 9 9 1 V1402 9 9 9 9 1
Source Source
V1403 3 0 7 4 2 V1403 3 0 7 4 2
1 2 3 4 V1500 1 2 3 4 V1500
V1404 8 9 8 9 3 V1404 8 9 8 9 3
V1405 1 0 1 0 4 V1405 1 0 1 0 4
V1406 2 0 4 6 5 SP56 V1406 2 0 4 6 5 SP56
V1407 SP56 = OFF SP56 = OFF
X X X X V1407 X X X X
S S
S S
NOTE: Status flags (SPs) are only valid until another instruction that uses the same flag is executed, or the
end of the scan The pointer for this instruction can be set to start anywhere in the table. It is not set
automatically. You have to load a value into the pointer somewhere in your program.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the source table and is loaded into the
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.
DirectSOFT32 Display
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT R F T B F A A ENT
ORN 5 MLR 1 5 0 0
Since the table counter specifies the range of data Table Table C ounter
that will be removed from the table, it is important 0 5 0 0 1 0 0 0 6 V1400
V1401
to understand how the table locations are V1402 9 9 9 9 2
numbered. If you examine the example table, you’ll V1403 3 0 7 4 3
Des tination
notice that the data locations are numbered from 8 9 8 9 4
X X X X V1500
V1404
the top of the table. For example, if the table V1405 1 0 1 0 5
counter started at 6, then all six of the locations V1406 2 0 4 6 6
would be affected during the instruction execution. X X X X
V1407
S
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
(HEX) into the lower 16 bits
table very quickly. If this is a problem for your of the accumulator
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
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.
Scan N
Before RFT Execution After RFT Execution
Table Counter
Table Table Counter Table (Automatically d ecremented)
NOTE: Status flags (SPs) are only valid until: — another instruction that uses the same flag is executed, or
— the end of the scan The pointer for this instruction can be set to start anywhere in the table. It is not set
automatically. You have to load a value into the pointer somewhere in your program.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400), which is the starting location for the destination table and table
counter, is loaded into the accumulator. The source location (V1500) is specified in the Add
to Top instruction. The table counter will be increased by “1” after the instruction is
executed.
DirectSOFT32 Display
X1 LD
K6
LDA
O 1400
ATT
V1500
$ B ENT
STR 1
SHFT L D A B E A A ENT
ANDST 3 0 1 4 0 0
SHFT A T T B F A A ENT
0 MLR MLR 1 5 0 0
For the ATT instruction, the table counter Table Table Counter
determines the number of additions that can be V1401 0 5 0 0 1 0 0 0 2 V1400
made before the instruction will stop executing. So, V1402 9 9 9 9 2
it is helpful to understand how the system uses this V1403 3 0 7 4 3
Data Source
counter to control the execution. V1404 8 9 8 9 4
X X X X V1500
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
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
that there is another part of the program that changes the value in V1500 (data source) prior
to the execution of the ATT instruction.
Example of Execution
Scan N Before ATT Execution After ATT Execution
Table counter
Table Table counter Table (Automatically Incremented)
V1405 1 0 1 0 5 V1405 8 9 8 9 5
SP56 SP56
V1406 2 0 4 6 6 V1406 1 0 1 0 6
SP56 = OFF SP56 = OFF
V1407 X X X X V1407 X X X X
Discard Bucket
2046
Discard Bucket
1010
Scan N+2 Before ATT Execution After ATT Execution Table counter
Table counter Table (Automatically Incremented)
Table
V1401 5 6 7 8 1 0 0 0 4 V1400 V1401 4 3 4 3 1 4 0 0 0 5 V1400
3
V1402 1 2 3 4 2 V1402 5 6 7 8 2 4
3 Data Source
Data Source
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
V1406 8 9 8 9 6 SP56 V1406 3 0 7 4 6 SP56
X X X X SP56 = OFF X X X X SP56 = OFF
V1407 V1407
Discard Bucket
8989
Scan N+3 Before ATT Execution After ATT Execution Table counter
Table Table counter Table (Automatically Incremented)
V - xxxx + 1
V - xxxx + 2
Step 1: Load the length of the table (number of V memory locations) into the first
level of the accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V memory location for the table into the accumulator. This
parameter must be a HEX value. You can use the LDA instruction to convert
an octal address to hex.
Step 3: Insert the Table Shift Left or Table shift Right instruction. This specifies the
number of bit positions you wish to shift the entire table. The number of bit
positions must be in octal.
Helpful hint: — Remember that each V memory location contains 16 bits. So, the bits of the
first word of the table are numbered from 0 to 17 octal. If you want to shift the entire table
by 20 bits, that is 24 octal. SP 53 will be set if the number of bits to be shifted is larger than
the total bits contained within the table. Flag 67 will be set if the last bit shifted (just before it
is discarded) is a “1”.
Operand Data Type DL06 Range
aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
DirectSOFT 32
$ A ENT
STR 0
SHFT L D A D A A A ENT
ANDST 3 0 3 0 0 0
SHFT T S H F R B E
SHFT NEXT ENT
MLR RST 7 5 ORN 1 4
DirectSOFT 32
V SHFT M O V D B A A ENT
AND ORST INST# AND 3 1 0 0 Load the constant value
LD 6666 (Hex.) into the lower
K6666 16 bits of the accumulator.
ORMOV command, we specify the table destination, Load the constant value 2
(Hex) into the lower 16 bits
V3100. of the accumulator.
ORMOV
0 3100
The example to the right shows a table of two words
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.
XOR operation for each word.
The ladder program example for the XORMOV is V 3000 V 3100
similar to the one above for the ORMOV. Just use X OR MOV
1 1 1 1 2 2 2 2
the XORMOV instruction. On the handheld K 3333
programmer, you must use the SHFT key and spell
1 1 1 1 2 2 2 2
“XORMOV” explicitly.
S tart Addr.
Number
Table 1
of words
Table 2 S tart Addr.
Table 3
Number
Block
of bytes
Table n
E nd Addr.
Swap (SWAP)
S WAP
The Swap instruction exchanges the A aaa
data in two tables of equal length.
The following description applies to both the Set Bit and Reset Bit table instructions.
Step 1: Load the length of the tables (number of V memory locations) into the first level of
the accumulator stack. This parameter must be a HEX value, 0 to FF. Remember that
the tables must be of equal length.
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
address to hex.
Step 3: Insert the Swap instruction. This specifies the starting address of the second table.
This parameter must be a HEX value. You can use the LDA instruction to convert an
octal address to hex.
Helpful hint: — The data swap occurs within a single scan. If the instruction executes on
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.
Operand Data Type DL06 Range
aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
The example program below uses a PD contact (triggers for one scan for off-to-on transition).
First, we load the length of the tables (two words) into the accumulator. Then we load the
address of the first table (V3000) into the accumulator using the LDA instruction, converting
the octal address to hex. Note that it does not matter which table we declare “first”, because
the swap results will be the same.
DirectSOFT 32
X0 Load the constant value 2
LD (Hex.) into the lower 16 bits
K2 of the accumulator.
Handheld Programmer Keystrokes
$ P D A ENT
SHFT
Convert octal 3000 to HEX STR CV 3 0
LDA and load the value into the
SHFT L D PREV C ENT
0 3000 accumulator. This is the ANDST 3 2
table beginning. L D A D A A A
SHFT ENT
ANDST 3 0 3 0 0 0
V2000
SHFT D A T E C A A A ENT
3 0 MLR 4 2 0 0 0
Time (TIME)
The Time instruction can be used to set the time (24 hour
clock) in the CPU. The instruction requires two consecutive T IME
V memory locations (Vaaa) which are used to set the time. If V aaa
the values in the specified locations are not valid, the time
will not be set. The current time can be read from memory
locations V7747 and V7766–V7770.
In the following example, when C0 is on, the constant value (K73000) is loaded into the
accumulator using the Load Double instruction (C0 should be a contact from a one shot
(PD) instruction). The value in the accumulator is output to V2000 using the Out Double
instruction. The Time instruction uses the value in V2000 to set the time in the CPU.
C0
0 0 0 7 3 0 0 0 The TIME instruction uses the
LDD
value set in V2000 and V2001 to
K7300
set the time in the appropriate V
Acc. 0 0 0 7 3 0 0 0
memory locations (V7766-V7770)
OUTD Acc. 0 0 0 7 3 0 0 0
V2000
0 0 0 7 3 0 0 0
SHFT N O P ENT
NOP TMR INST# CV
End (END)
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
and the CPU will not enter the Run Mode. Data labels, subroutines
and interrupt routines are placed after the End instruction. The End instruction is not
conditional; therefore, no input contact is allowed.
Direct SOFT32 Handheld Programmer Keystrokes
SHFT E N D ENT
4 TMR 3
END
Stop (STOP)
The Stop instruction changes the operational mode of the CPU
from Run to Program (Stop) mode. This instruction is typically STOP
used to stop PLC operation in an error condition.
In the following example, when C0 turns on, the CPU will stop
operation and switch to the program mode.
C0 $ SHFT C A ENT
STR 2 0
STOP S T O P
SHFT SHFT ENT
RST MLR INST# CV
SHFT R S T W T ENT
ORN RST MLR ANDN MLR
RSTWT
In the following example, when C7 is on, all the program logic between the GOTO and the
corresponding LBL instruction (designated with the same constant Kaaa value) will be
skipped. The instructions being skipped will not be executed by the CPU.
$ C H
C7 K5 S HF T E NT
S TR 2 7
GOTO G O T O F
S HF T E NT
6 INS T# MLR INS T# 5
$ B E NT
S TR 1
X1 C2 GX C C
S HF T E NT
OUT 2 2
OUT
L B L F
S HF T E NT
ANDS T 1 ANDS T 5
LBL K5 $ F E NT
S TR 5
GX C E NT
OUT 2
X5 Y2
OUT
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.
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.
Direct SOFT32
X1 1 2 3
K3
FOR
RSTWT
X20 Y5
OUT
NEXT
$ B ENT
STR 1
SHFT F O R D ENT
5 INST# ORN 3
SHFT R S T W T ENT
ORN RST MLR ANDN MLR
$ SHFT I C A ENT
STR 8 2 0
GX F ENT
OUT 5
SHFT N E X T ENT
TMR 4 SET MLR
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
to the Subroutine Label K3 and the ladder logic in the subroutine will be executed. If X35 is
on the CPU will return to the main program at the RTC instruction. If X35 is not on
Y0–Y17 will be reset to off and then the CPU will return to the main body of the program.
Direct SOFT32 Display X1 K3
GTS
C0
LD
K10
END
SBR K3
X20 Y5
OUTI
X21 Y10
OUTI
X35
RT C
X35 Y0 Y17
RSTI
RT
$ B ENT
STR 1
SHFT G T S D ENT
6 MLR RST 3
SHFT E N D ENT
4 TMR 3
SHFT R T C ENT
ORN MLR 2
SP SHFT I D F ENT
STRN 8 3 5
S SHFT I A B H ENT
RST 8 0 1 7
SHFT R T ENT
ORN MLR
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
to the Subroutine Label K3 and the ladder logic in the subroutine will be executed. The CPU
will return to the main body of the program after the RT instruction is executed.
Direct SOFT32
X1 K3
GTS
END
SBR K3
X20 Y5
OUT
X21 Y10
OUT
RT
$ B ENT
STR 1
SHFT G T S D ENT
6 MLR RST 3
SHFT E N D ENT
4 TMR 3
SHFT R T ENT
ORN MLR
X0 MLS
When contact XO is on, logic under the first MLS
K1 will be executed .
X1 Y7
OUT
X2 MLS
When contacts X2 and X0 are on, logic
K2 under the second MLS will be
executed.
X3
MLR MLR
The MLR instructions note the end of the Master Control area.
K0 K1 (They will be entered in adjacent addresses.)
X10
MLS/MLR Example
In the following MLS/MLR example logic between the first MLS K1 (A) and MLR K0 (B)
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
MLS coils.
Direct SOFT 32 Handheld Programmer Keystrokes
X0 K1
A $ A ENT
MLS STR 0
Y B ENT
X1 C0 MLS 1
OUT $ B ENT
STR 1
X2 C1 GX SHFT C A ENT
OUT 2 0
OUT
$ C ENT
STR 2
X3 Y0
GX SHFT C B ENT
OUT OUT 2 1
$ D ENT
X10 K2 STR 3
C
GX A ENT
MLS
OUT 0
X5 $ B A ENT
Y1
STR 1 0
OUT Y C ENT
MLS 2
X4 Y2 $ F ENT
STR 5
OUT
GX B ENT
OUT 1
K1 D
$ E ENT
MLR STR 4
GX C ENT
X5 C2 OUT 2
OUT T B ENT
MLR 1
X6 Y3 $ F ENT
STR 5
OUT
GX SHFT C C ENT
OUT 2 2
K0
B
$ G ENT
MLR STR 6
GX D ENT
X7 Y4 OUT 3
OUT T A ENT
MLR 0
$ H ENT
STR 7
GX E C ENT
OUT 4 2
Interrupt Instructions
Interrupt (INT)
The Interrupt instruction allows a section of ladder logic INT O aaa
to be placed below the main body of the program and
executed only when needed. High-Speed I/O Modes 10,
20, and 40 can generate an interrupt. With Mode 40,
you may select an external interrupt (input X0), or a
time-based interrupt (3–999 ms).
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
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
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
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
with the hardware input signal (e.g. X1 will initiate INT 1).
SHFT D I S I ENT
3 8 RST 8
SHFT E N D ENT
END 4 TMR 3
SHFT I N T A ENT
8 TMR MLR 0
INT O0
$ SHFT I B ENT
STR 8 1
X1 Y5
X SHFT I F ENT
SETI SET 8 5
$ SHFT I D ENT
X3 Y7 STR 8 3
SETI
X SHFT I H ENT
SET 8 7
X4
DISI
SHFT E N D ENT
4 TMR 3
SHFT I N T A ENT
8 TMR MLR 0
END
$ SHFT I C ENT
STR 8 2
INT O0
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
SET 8 0 7
SHFT I R T ENT
X3 Y0 Y7 8 ORN MLR
RSTI
IRT
Message Instructions
Fault (FAULT)
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
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
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.
Operand Data Type DL06 Range
....................................A aaa
V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 1-FFFF
Fault Example
In the following example when X1 is on, the message SW 146 will display on the handheld
programmer. The NCONs use the HEX ASCII equivalent of the text to be displayed. (The
HEX ASCII for a blank is 20, a 1 is 31, 4 is 34 ...)
FAULT :
*SW 146
X1 FAULT $ B ENT
K1 STR 1
SHFT F A U L T B ENT
5 0 ISG ANDST MLR 1
END
DLBL E N D
K1 SHFT ENT
4 TMR 3
SHFT D L B L B ENT
ACON
3 ANDST 1 ANDST 1
A SW
SHFT A C O N S W ENT
0 2 INST# TMR RST ANDN
SHFT N C O N C A D B ENT
NCON TMR 2 INST# TMR 2 0 3 1
K 2031
SHFT N C O N D E D G ENT
TMR 2 INST# TMR 3 4 3 6
NCON
K 3436
Direct SOFT32
END
DLBL
K1
ACON
A SW
NCON
K 2031
NCON
K 3436
SHFT E N D ENT
4 TMR 3
SHFT D L B L B ENT
3 ANDST 1 ANDST 1
SHFT A C O N S W ENT
0 2 INST# TMR RST ANDN
SHFT N C O N C A D B ENT
TMR 2 INST# TMR 2 0 3 1
SHFT N C O N D E D G ENT
TMR 2 INST# TMR 3 4 3 6
You may recall from the CPU specifications in Chapter 3 that the DL06’s ports are capable of
several protocols. Port 1 cannot be configured for the non-sequence protocol. To configure
port 2 using the Handheld Programmer, use AUX 56 and follow the prompts, making the
same choices as indicated below on this page. To configure a port in DirectSOFT32, choose
the PLC menu, then Setup, then Setup Secondary Comm Port.
• Port: From the port number list box at the top, choose “Port 2”.
• Protocol: Click the check box to the left of “Non-sequence”, and then you’ll see the dialog box
shown below.
• Baud Rate: Choose the baud rate that matches your printer.
• Stop Bits, Parity: Choose number of stop bits and parity setting to match your printer.
• Memory Address: Choose a V-memory address for DirectSOFT32 to use to store the port setup
information. You will need to reserve 9 words in V-memory for this purpose. Select “Always use for
printing” if it applies.
Then click the button indicated to send the Port 2 configuration to the CPU,
and click Close. Then see Chapter 3 for port wiring information, in order to
connect your printer to the DL06.
Port 2 on the DL06 has standard RS232 levels, and should work with most printer serial
input connections.
Text element – this is used for printing character strings. The character strings are defined as
the character (more than 0) ranged by the double quotation marks. Two hex numbers
preceded by the dollar sign means an 8-bit ASCII character code. Also, two characters
preceded by the dollar sign is interpreted according to the following table:
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.
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.
Example:
V2000 Print binary data in V2000 for decimal number
V2000 : B Print BCD data in V2000
V2000 : D Print binary number in V2000 and V2001 for decimal number
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
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.
V-memory text element ¨This is used for printing text stored in V-memory. Use the %
followed by the number of characters after V-memory number for representing the text. If
you assign “0” as the number of characters, the print function will read the character count
from the first location. Then it will start at the next V-memory location and read that number
of ASCII codes for the text from memory.
Example:
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 printed.
Bit element
This is used for printing the state of the designated bit in V-memory or a relay bit. The bit
element can be assigned by the designating point (.) and bit number preceded by the V-
memory number or relay number. The output type is described as shown in the table below.
# Data Format Description
1 none Print 1 for an ON state, and 0 for an
OFF state
2 :BOOL 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
Example:
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format
C100 : BOOL Prints the status of C100 in TRUE/FALSE format
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
The maximum numbers of characters you can print is 128. The number of characters for
each element is listed in the table below:
Element Type Maximum Characters
Text, 1 character 1
16 bit binary 6
32 bit binary 11
4 digit BCD 4
8 digit BCD 8
Floating point (real number) 12
Floating point (real with exponent) 12
V-memory/text 2
Bit (1/0 format) 1
Bit (TRUE/FALSE format) 5
Bit (ON/OFF format) 3
NOTE: You must use the appropriate special relay in conjunction with the PRINT command to ensure the
ladder program does not try to PRINT to a port that is still busy from a previous PRINT or WX or
RX instruction.
In the following example, when X1 is on and the port busy relay SP116 (see special relays) is
not on, the RX instruction will access port 2 operating as a master. Ten consecutive bytes of
data (V2000 – V2004) will be read from a CPU at station address 5 and copied into V
memory locations V2300–V2304 in the CPU with the master port.
Direct SOFT32
X1 SP116 LD
KF205
LD
K10
V2277 X X X X X X X X V1777
The constant value K10 V2300 3 4 5 7 3 4 5 7 V2000
specifies the number of
bytes to be read V2301 8 5 3 4 8 5 3 4 V2001
V2302 1 9 3 6 1 9 3 6 V2002
LDA
V2303 9 5 7 1 9 5 7 1 V2003
O 2300
V2304 1 4 2 3 1 4 2 3 V2004
Octal address 2300 is
converted to 4C0 HEX and V2305 X X X X X X X X V2005
loaded into the accumulator.
V2300 is the starting
location for the Master CPU
where the specified data will
be read into
RX
V2000
$ B ENT
STR 1
W SHFT SP B B G ENT
ANDN STRN 1 1 6
SHFT L D A C D A A ENT
ANDST 3 0 2 3 0 0
SHFT R X C A A A ENT
ORN SET 2 0 0 0
In the following example when X1 is on and the module busy relay SP116 (see special relays)
is not on, the WX instruction will access port 2 operating as a master. Ten consecutive bytes
of data is read from the Master CPU and copied to V memory locations V2000–V2004 in
the slave CPU at station address 5.
Direct SOFT32
X1 SP116 LD
KF205
LD
K10
V2277 X X X X X X X X V1777
The constant value K10 V2300 3 4 5 7 3 4 5 7 V2000
specifies the number of
bytes to be written V2301 8 5 3 4 8 5 3 4 V2001
V2302 1 9 3 6 1 9 3 6 V2002
LDA
V2303 9 5 7 1 9 5 7 1 V2003
O 2300
V2304 1 4 2 3 1 4 2 3 V2004
Octal address 2300 is
converted to 4C0 HEX and V2305 X X X X X X X X V2005
loaded into the accumulator.
V2300 is the starting
location for the Master CPU
where the specified data will
be read from.
WX
V2000
$ B ENT
STR 1
W SHFT SP B C E ENT
ANDN STRN 1 1 6
SHFT L D A C D A A ENT
ANDST 3 0 2 3 0 0
SHFT W X C A A A ENT
ANDN SET 2 0 0 0
LCD
When enabled, the LCD instruction causes a user-defined
LCD
text message to be displayed on the LCD Display Panel.
Line Number: Kn
The display is 16 characters wide by 2 rows high so a total "text message"
of 32 characters can be displayed. Each row is addressed
separately; the maximum number of characters the
instruction will accept is 16.
The text message can be entered directly into the message field of the instruction set-up
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.
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,
as shown in the examples. The LCD instruction is inserted into the ladder program via this
set-up dialog box.
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.
LCD
Line Number: K2
"Effluent Overflo"
S l u d g e P i t A l a r m
E f f l u e n t O v e r f l o
LCD
Line Number: K1
"Alarm 1 " _time:12
LCD
Line Number: K2
_date:us
A l a r m 1 1 1 : 2 1 P M
0 5 - 0 8 - 0 2
Embedding V-memory data
Any V-memory data can be displayed in
any one of six available data formats. An
example appears to the right. A list of data
formats and modifiers is on the next page.
Note that different data formats require
differing numbers of character positions
on the display.
LCD
Line Number: K1
"Count = " V2500:B
C o u n t = 0 4 1 2
The S, C0, and 0 modifiers alter the presentation of leading zeros and spaces. S removes
leading spaces and left justifies the result. C0 replaces leading spaces with leading zeros.
0 is a modification of C0. 0 eliminates any leading zeros in the C0 format version and
converts them to spaces.
V10000 d A
V10001 i m
LCD V10002 n
Line Number: K1 V10003 f O
Starting V Memory Address: V10000 V10004 i f
Number of Characters: K16
V10005 e c
V10006
LCD
V10007
Line Number: K2
V10010 i H
V10011 h g
Starting V Memory Address: V10010
V10012 T
Number of Characters: K16
V10013 m e
V10014 p
V10015 l A
V10016 r a
A d m i n O f f i c e V10017 m
H i g h T e m p A l a r m
Number of Elements
Operand Data Type DL06 Range
V–memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V all
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Bits: 1–2000 Registers: 1–125
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
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
optional. When used, it should be ahead of any network instruction boxes since the error bit
is reset when an MRX or MWX instruction is executed. Typically network communications
will last longer than 1 CPU scan. The program must wait for the communications to finish
before starting the next transaction.
This rung does a MODBUS read from the first 32 coils of slave address number one.
It will place the values into 32 bits of the master starting at C0.
MWX Example
DL06 port 2 has two Special Relay contacts associated with it (see Appendix D for comm
port special relays). One indicates “Port busy”(SP116), and the other indicates ”Port
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
optional. When used, it should be ahead of any network instruction boxes since the error bit
is reset when an MRX or MWX instruction is executed.
Typically network communications will last longer than 1 CPU scan. The program must wait
for the communications to finish before starting the next transaction.
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.
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.
ASCII Instructions
The DL06 CPU supports several instructions and methods that allow ASCII strings to be
read into and written from the PLC communications ports. Specifically, port 2 on the DL06
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
(K–Sequence, DirectNet, Modbus) via the CPU port.
Reading ASCII Input Strings
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
parameters such as fixed and variable length ASCII strings, termination characters, byte
swapping options, and instruction control bits. Use barcode scanners, weight scales, etc. to
write raw ASCII input strings into port 2 based on the (AIN) instruction’s parameters.
2) Write embedded ASCII strings directly to V–memory from an external HMI or similar
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
device via a supported communications protocol using port 2. The RX instruction places
the data directly into V–memory.
Writing ASCII Output Strings
The following instructions can be used to write ASCII output strings:
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
V–memory address, string length, byte swapping options, etc. When the instruction’s
permissive bit is enabled, the string is written to port 2.
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)
instruction may be used to write the pre–coded ASCII string out of port 2. American,
European and Asian Time/Date stamps are supported.
Additionally, if a DL06 PLC is a master on a network, the Network Write instruction (WX)
can be used to write embedded ASCII data to an HMI or slave device directly from
V–memory via a supported communications protocol using port 2.
Parameter
Data Destination All V–memory
Fixed Length K1–128
Bits: Busy, Complete,
Timeout Error, Overflow C0–3777
Fixed Length example when the PLC is reading the port continuously and timing is not critical
AIN Complete
Parameter
Data Destination All V–memory
Fixed Length K1–128
Bits: Busy, Complete,
Timeout Error, Overflow C0–3777
AIN variable length example used to read barcodes on boxes (PE = photoelectric sensor)
Box present PE
Scan code
C5 C6
9
SET
Firstcharacter Timeout
C3
NOTE: Quotation marks are not required around the Search String
item. Quotes are valid characters that the AFIND can search for.
ASCII Characters
HEX Equivalent
CMPV Example
The CMPV instruction executes when the AIN instruction is complete. If the compared
V–memory tables are equal, SP61 will turn ON.
AIN Complete
C1
CMPV
VPRINT Time / Date Stamping– the codes in the table below can be used in the VPRINT
ASCII string message to “print to V–memory” the current time and/or date.
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
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
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
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
and read that number of ASCII codes for the text from memory.
Example:
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
printed.
VPRINT Bit element – the following is used for “printing to V–memory” the state of the
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.
The output type is described as shown in the table below.
# Data format Description
1 none Print 1 for an ON state, and 0 for an OFF state
2 : BOOL 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
Example:
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format
C100 : BOOL Prints the status of C100 in TRUE/FALSE format
C100 : ON/OFF Prints the status of C00 in ON/OFF format
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
required for each element, regardless of whether the :S, :C0 or :0 modifiers are used, is listed
in the table below.
Maximum
Element type Characters
Text, 1 character 1
16 bit binary 6
32 bit binary 11
4 digit BCD 4
8 digit BCD 8
Floating point (real number) 3
Floating point (real with exponent) 13
V-memory/text 2
Bit (1/0 format) 1
Bit (TRUE/FALSE format) 5
Bit (ON/OFF format) 3
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.
Also, two characters preceded by the dollar sign is interpreted according to the following
table:
The following examples show various syntax conventions and the length of the output to the
printer.
”” Length 0 without character
”A” Length 1 with character A
”” Length 1 with blank
” $” ” Length 1 with double quotation mark
”$R$L” Length 2 with one CR and one LF
”$0D$0A” Length 2 with one CR and one LF
”$$” Length 1 with one $ mark
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
contains invalid text or no quotations. It is important to test your VPRINT instruction data
during the application development.
The VPRINT instruction is used to create a string in V–memory. The PRINTV is used to print the string out
of port 2.
"STX" V3000:B"$0D"
SWAPB Example
The AIN Complete bit is used to trigger the SWAPB instruction. Use a one–shot so the
SWAPB only executes once.
AIN complete
SWAPB
C1
21
Starting Address: V2001
Number of Bytes: K32
Byte Swap: All
ACRB Example
The AIN Complete bit or the AIN diagnostic bits are used to clear the ASCII buffer.
Ain Complete
ACRB
C1
33 K2
Intercharacter timeout
C2
Firstcharacter timeout
C3