Beruflich Dokumente
Kultur Dokumente
INTELLIGENT BOX
INSTRUCTIONS 5
In This Chapter:
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Using Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525
Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531
Timer, Counter and Shift Register Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535
Accumulator/Stack Load and Output Data Instructions . . . . . . . . . . . . . . . . . . . . . . .548
Logical Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .568
Bit Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
Number Conversion Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .596
CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .599
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5101
Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5108
Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5111
Intelligent I/O Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5118
Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5120
Intelligent Box (IBox) Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-124
Chapter 5: Standard RLL Instructions
1 IntroductionDL05 Micro PLCs offer a wide variety of instructions to perform many different types of
operations. This chapter shows you how to use each standard Relay Ladder Logic (RLL)
2 instruction. In addition to these instructions, you may also need to refer to the Drum
instruction in Chapter 6, or the Stage programming instructions in Chapter 7.
3 There are two ways to quickly find the instruction you need.
If you know the instruction category (Boolean, Comparative Boolean, etc.) just use the title at the
4 top of the page to find the pages that discuss the instructions in that category.
If you know the individual instruction name, use the following table to find the page(s) that
5 discusses the instruction.
8 The following paragraphs show how these instructions are used to build simple ladder
programs.
9 END Statement
All DL05 programs require an END statement as the last instruction. This tells the CPU that
10 this is the end of the program. Normally, any instructions placed after the END statement
will not be executed. There are exceptions to this such as interrupt routines, etc.. This chapter
will discuss the instruction set in detail.
11
X0 Y0
12 All programs must have
OUT
an END statement
13 END
14 Simple Rungs
You use a contact to start rungs that contain both contacts and coils. The boolean instruction
A 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.
B
DirectSOFT5
DirectSOFT Example Handheld Mnemonics
C X0 Y0 STR X0
OUT Y0
OUT END
D
END
Contacts in Series 5
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 6
X1, followed by OUT Y0.
DirectSOFT5
7
Direct SOFT32 Example Handheld Mnemonics
X0 X1 Y0 STR X0
AND X1
8
OUT OUT Y0
END 9
END
Midline Outputs
10
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
11
continue a rung with more conditional outputs.
DirectSOFT5
Direct SOFT32 Example Handheld Mnemonics
12
X0 X1 Y0 STR X0
AND X1
13
OUT OUT Y0
X2 Y1
AND X2
OUT Y1 14
AND X3
OUT
X3 Y2
OUT Y2
END A
OUT
B
END C
D
Parallel Elements
1 You 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
2 would be STR X0, OR X1, followed by OUT Y0.
DirectSOFT 5 Handheld Mnemonics
3 X0 X1 Y0
OUT
STR X0
AND X1
STR X2
4 X2 X3 AND X3
ORSTR
OUT Y0
END
5 END
10 END
11
Joining Parallel Branches in Series
12 You can also join one or more parallel branches in series. The And Store (ANDSTR)
instruction allows this operation. The following example shows a simple network with contact
branches in series with parallel contacts.
13 DirectSOFT 5 Handheld Mnemonics
X0 X1 Y0 STR X0
14 OUT STR X1
OR X2
X2 ANDSTR
A OUT Y0
END
B X0 X2
END
X5 Y0
Combination Networks
C You can combine the various types of
series and parallel branches to solve most X1 X3 X4
OUT
network.
END
Comparative Boolean
Some PLC manufacturers make it really difficult to do a simple comparison of two numbers. 1
Some of them require you to move the data all over the place before you can actually perform
the comparison. The DL05 Micro PLCs provide Comparative Boolean instructions that allow
you to quickly and easily solve this problem. The Comparative Boolean provides evaluation of
2
two 4-digit values using boolean contacts. The valid
evaluations are: equal to, not equal to, equal to or V1400 K1234 Y3
3
greater than, and less than. OUT
STR
X0
STR
X1 ORSTR AND X4 Y0
OUT Output
10
STR
X2 AND X3
ANDSTR 11
X5 OR
12
STR X0 STR X1 STR X2 AND X3
1
2
3
STR X0 1
2
3
STR X1
STR X0
1
2
3
STR X2
STR X1
STR X0
1
2
3
X2 AND X3
STR X1
STR X0
13
4 4 4 4
5
6
5
6
5
6
5
6
14
7 7 7 7
8
ORSTR
8
AND X4
8
ORNOT X5
8
A
1 X1 or (X2 AND X3) 1 X4 AND {X1 or (X2 AND X3)} 1 NOT X5 OR X4 AND {X1 OR (X2 AND X3)}
2
3
STR X0 2
3
STR X0 2
3
STR X0 B
. . .
. . .
8 8 8
C
ANDSTR
1
2
3
XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)}
D
.
.
Immediate Boolean
1 The DL05 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
2 I/O update occurs. The DL05 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
3 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
4 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.
5 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
6 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.
7
8
9
10
CPU Scan
11 The CPU reads the inputs from the local
base and stores the status in an input
Read Inputs image register.
12 X11 ... X2 X1 X0
OFF ... ON OFF OFF ON X0
Input Image Register
OFF
13 X1
14
A Solve the Application Program
X0 Y0
Immediate instruction does not use the
input image register, but instead reads
the status from the module immediately.
I I/O Point X0 Changes
B ON X0
OFF
C Write Outputs
X1
Diagnostics
Boolean Instructions 1
Store (STR)
DS5 Implied The Store instruction begins a new rung or an additional
Aaaa
2
HPP Used branch in a rung with a normally open contact. Status of
the contact will be the same state as the associated image 3
register point or memory location.
Store Not (STRN) 4
DS5 Implied The Store Not instruction begins a new rung or an Aaaa
HPP Used additional branch in a rung with a normally closed
contact. Status of the contact will be opposite the state of
5
the associated image register point or memory location.
6
Operand Data Type DL05 Range
....................................A aaa 7
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0377
Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0377
0777
8
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0377
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0177 9
Counter C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0177
Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP
In the following Store example, when input X1 is on, output Y2 will energize.
0777
10
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
11
X1 Y2
OUT
$
STR
B
1
ENT
12
GX C ENT
OUT 2
13
14
In the following Store Not example, when input X1 is off output Y2 will energize.
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
A
X1 Y2
OUT
SP
STRN
B
1
ENT
B
GX C ENT
OUT 2
C
D
B1400.12
9 Y2
OUT
10
Handheld Programmer Keystrokes
11 STR SHFT B V 1 4 0 0
12 OUT
K 1
2 ENT
2 ENT
13 In the following Store Not Bit-of-Word example, when bit 12 of V-memory location V1400
is off, output Y2 will energize.
14
DirectSOFT 5
DirectSOFT32
A B1400.12 Y2
OUT
B
C Handheld Programmer Keystrokes
STRN SHFT B V 1 4 0 0
D K 1 2 ENT
OUT 2 ENT
Or (OR)
DS5 Implied The Or instruction logically ors a normally open contact in 1
HPP Used 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.
2
Or Not (ORN) 3
DS5 Implied The Or Not instruction logically ors a normally closed
HPP Used contact in parallel with another contact in a rung. The status
of the contact will be opposite the state of the associated
Aaaa 4
image register point or memory location.
5
Operand Data Type DL05 Range
....................................A
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
aaa
0377
6
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0377
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0777 7
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0377
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0177
0177
8
Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP 0777
OUT
$
STR
B
1
ENT 11
Q C ENT
X2
GX
OR
F
2
ENT
12
OUT 5
13
In the following Or Not example, when input X1 is on or X2 is off, output Y5 will
energize. 14
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes A
X1 Y5 $ B ENT
OUT
R
STR
C
1
ENT
B
ORN 2
X2
GX
OUT
F
5
ENT C
D
1 Or Bit-of-Word (ORB)
DS5 Implied The Or Bit-of-Word instruction logically ors a normally
2 HPP Used open contact in parallel with another contact in a rung.
Status of the contact will be the same state as the bit
Aaaa.bb
8 In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400 is on, output Y7
will energize.
DirectSOFT 5
9 DirectSOFT32
X1 Y7
10 OUT
B1400.7
STR 1 ENT
12 OR SHFT B V 1 4 0 0
K 7 ENT
13 OUT 7 ENT
X1 Y7
B OUT
B1400.7
STR 1 ENT
D ORN SHFT
K
B
7 ENT
V 1 4 0 0
OUT 7 ENT
And (AND)
DS5 Implied The And instruction logically ands a normally open Aaaa
1
HPP Used 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.
2
And Not (ANDN) 3
DS5 Implied
The And Not instruction logically ands a normally Aaaa
HPP Used
closed contact in series with another contact in a rung.
The status of the contact will be opposite the state of
4
the associated image register point or memory location.
5
Operand Data Type DL05 Range
....................................A
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
aaa
0377
6
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0377
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0777 7
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0377
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0177
0177
8
Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP 0777
In the following And example, when input X1 and X2 are on output Y5 will energize.
9
10
DirectSOFT 5
Direct SOFT32
X1 X2 Y5
Handheld Programmer Keystrokes
$ B
11
ENT
STR 1
OUT
V
AND
C
2
ENT 12
GX F
OUT 5
ENT
13
In the following And Not example, when input X1 is on and X2 is off output Y5 will
energize.
14
DirectSOFT 5
A
Direct SOFT32 Handheld Programmer Keystrokes
X1 X2 Y5 $
STR
B
1
ENT
B
OUT
W
ANDN
C
2
ENT C
GX F ENT
OUT 5
D
In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on output
8 Y5 will energize.
DirectSOFT 5
9 X1 B1400.4 Y5
OUT
10
11 Handheld Programmer Keystrokes
STR 1 ENT
12 AND SHFT
K
B
4 ENT
V 1 4 0 0
13 OUT 5 ENT
14 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.
A DirectSOFT 5
X1 B1400.4 Y5
B OUT
STR 1 ENT
D ANDN SHFT
K
B
4 ENT
V 1 4 0 0
OUT 5 ENT
5
In the following And Store example, the branch
consisting of contacts X2, X3, and X4 have been anded with the branch consisting of contact
X1.
6
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
7
X1 X2 X3 Y5
OUT
$
STR
B
1
ENT 8
$ C
X4
V
STR
D
2
ENT
9
ENT
AND 3
Q
OR
E
4
ENT 10
L
ANDST
GX
ENT
F
11
ENT
OUT 5
12
In the following Or Store example, the branch consisting of X1 and X2 have been ored with
the branch consisting of X3 and X4. 13
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
X1 X2 Y5 $ B ENT
14
STR 1
OUT
X3 X4
V
AND
C
2
ENT A
$ D
V
STR
E
3
ENT
B
ENT
AND 4
M
ORST
ENT C
GX F
OUT 5
ENT
D
Out (OUT)
1 DS5 Used The Out instruction reflects the status of the rung (on/off ) and Aaaa
outputs the discrete (on/off ) state to the specified image OUT
HPP Used
2 register point or memory location.
Multiple Out instructions referencing the same discrete location should not be used since
3 only the last Out instruction in the program will control the physical output point. Instead,
use the next instruction, the Or Out.
4 Operand Data Type
....................................A
DL05 Range
aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0377
5 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0377
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0777
6 In the following Out example, when input X1 is on, output Y2 and Y5 will energize.
DirectSOFT 5
7 Direct SOFT32
X1 Y2
Handheld Programmer Keystrokes
$ B ENT
STR 1
8 OUT
Y5
GX
OUT
C
2
ENT
GX F
9 OUT OUT 5
ENT
Or Out (OROUT)
10 DS5 Used
The Or Out instruction allows more than one rung of discrete
A aaa
HPP Used
logic to control a single output. Multiple Or Out instructions
11 referencing the same output coil may be used, since all
contacts controlling the output are logically ORed together. If
OR OUT
the status of any rung is on, the output will also be on.
12 Operand Data Type DL05 Range
....................................A aaa
13 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0177
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y 0177
14 Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C 0777
B X1 Y2
OR OUT
$
STR
B
1
ENT
C INST#
$
STR
3
E
5
4
ENT
2
X4 Y2
D OR OUT
O
INST#
D
3
F
5
ENT ENT C
2
ENT
OUT
8
B1401.6
OUT
9
Handheld Programmer Keystrokes
STR 1 ENT
10
OUT SHFT
K
B
3 ENT
V 1 4 0 0
11
OUT SHFT B V 1 4 0 1
K 6 ENT
12
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 13
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 14
programming.
location must not be used in programming.
X0
A
B1400.3
OUT
B
C
X1 B1400.3
OUT D
Not (NOT)
1 DS5 Used The Not instruction inverts the status of the rung at
HPP Used the point of the instruction.
2 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.
DirectSOFT 5
3 DirectSOFT32 Handheld Programmer Keystrokes
X1 Y2 $ B ENT
4 OUT
SHFT
STR
N O
1
T ENT
TMR INST# MLR
5 GX
OUT
C
2
ENT
6 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.
7
Positive Differential (PD)
8 DS5 Used
The Positive Differential instruction is typically
A aaa
known as a one shot. When the input logic
9 HPP Used
produces an off to on transition, the output will
energize for one CPU scan.
PD
10
Operand Data Type DL05 Range
11 ....................................A aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0377
12 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0377
0777
13 In the following example, every time X1 makes an off to on transition, C0 will energize for
one scan.
14
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
A X1 C0 $
STR
B
1
ENT
PD
B SHFT P
CV
SHFT D
3
A
0
ENT
C
D
X1 Y4
OUT
$
GX
STR
SHFT P
CV
D
3
B
1
ENT
A
E ENT
OUT 4
In the following example, each time X1 is makes an On-to-Off transition, Y4 will energize for
B
one scan.
DirectSOFT 5
C
DirectSOFT32 Handheld Programmer Keystrokes
X1
OUT
Y4
$
GX
STR
SHFT N
E
TMR
D
3
B
1
ENT
D
ENT
OUT 4
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2
11 transitions from Off to On.
DirectSOFT 5
12 DirectSOFT32
X1 Y5
Handheld Programmer Keystrokes
$ B ENT
STR 1
13 OUT Q
OR
SHFT P
CV
D
3
C
2
ENT
X2 GX F
ENT
OUT 5
14
A In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2
transitions from On to Off.
B
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
C X1 Y5
$
STR
B
1
ENT
OUT Q N D C
D X2 GX
OR
SHFT
F
TMR
ENT
3 2
ENT
OUT 5
X1 X2 Y5
Handheld Programmer Keystrokes
$
STR
B
1
ENT
12
OUT Q P D C
GX
OR
SHFT
F
CV
ENT
3 2
ENT
13
OUT 5
14
In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2
transitions from On to Off. A
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
B
X1 X2 Y5
OUT
$
Q
STR
B
N
1
ENT
D C
C
SHFT ENT
OR TMR 3 2
GX
OUT
F
5
ENT D
Set (SET)
1 DS5 Used The Set instruction sets or turns on an image register
Optional
memory range
12 X1
Y2
SET
Y5 $
STR
B
1
ENT
X C F ENT
SET 2 5
13
14
In the following example when X1 is on, Y2 through Y5 will be reset or deenergized.
A
DirectSOFT 5
B DirectSOFT32
X2
Handheld Programmer Keystrokes
$ B
Y2 Y5 ENT
STR 1
C RST
S
RST
C
2
F
5
ENT
In the following example when X1 turns on, bit 1 in V1400 is set to the on state.
7
DirectSOFT 5
DirectSOFT32 8
X1
B1400.1
SET 9
10
Handheld Programmer Keystrokes
STR 1 ENT 11
SET SHFT B V 1 4 0 0
K 1 ENT 12
In the following example when X2 turns on, bit 1 in V1400 is reset to the off state. 13
DirectSOFT 5
DirectSOFT32
X2
14
B1400.1
RST
A
Handheld Programmer Keystrokes
B
STR 2 ENT C
RST SHFT B V 1 4 0 0
K 1 ENT D
Pause (PAUSE)
1 DS5 Used The Pause instruction disables the output update on a
HPP Used range of outputs. The ladder program will continue to Y aaa aaa
2 run and update the image register. However, the outputs
in the range specified in the Pause instruction will be
PAUSE
7 X1 Y5 Y7
PAUSE
8
9 Since the D2HPP Handheld Programmer does not have a specific Pause key, you can use
the corresponding instruction number for entry (#960), or type each letter of the command.
10 Handheld Programmer Keystrokes
11 $
STR
B
1
ENT
O J G A D F
12 INST# 9 6 0
ENT ENT
3 5
ENT
13 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.
14
A
B
C
D
Comparative Boolean 1
Store If Equal (STRE)
DS5 Used The Store If Equal instruction begins a new rung or 2
additional branch in a rung with a normally open V aaa B bbb
HPP Used
comparative contact. The contact will be on when 3
Vaaa is equal toBbbb .
Store If Not Equal (STRNE) 4
DS5 Used
The Store If Not Equal instruction begins a new rung V aaa B bbb
HPP Used or additional branch in a rung with a normally closed
comparative contact. The contact will be on when
5
Vaaa does not equal Bbbb.
Operand Data Type DL05 Range
6
....................................B aaa bbb
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V All (See page 328) All (See page 328) 7
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P All (See page 328) All (See page 328)
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 09999 8
In the following example, when the value in V-memory location V2000 = 4933, Y3 will
energize. 9
DirectSOFT 5 10
DirectSOFT32 Handheld Programmer Keystrokes
OUT
STR
E
4
J
4
9
D
3
D
2
3
ENT
0 0 0
11
GX
OUT
D
3
ENT
12
In the following example, when the value in V-memory location V2000 is not equal to 5060,
Y3 will energize.
13
14
DirectSOFT 5 Handheld Programmer Keystrokes
DirectSOFT32
V2000 K5060 Y3
OUT
SP
STRN
SHFT E
4
C
2
A
0
A
0
A
0 A
F A G A ENT
GX
OUT
5
D
0
3
ENT
6 0
B
C
D
Or If Equal (ORE)
1 DS5 Implied
The Or If Equal instruction connects a normally open
HPP Used
comparative contact in parallel with another contact. V aaa B bbb
2 The contact will be on when Vaaa is equal to Bbbb.
Or If Not Equal (ORNE)
3 DS5 Implied
The Or If Not Equal instruction connects a normally
HPP Used
closed comparative contact in parallel with another V aaa B bbb
4 contact. The contact will be on when Vaaa does not
equal Bbbb.
7 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 09999
In the following example, when the value in V-memory location V2000 = 4500 or
8 V2002 = 2345 , Y3 will energize.
DirectSOFT 5
9 DirectSOFT32 Handheld Programmer Keystrokes
$ E C A A A
V2000 K4500 Y3 SHFT
STR 4 2 0 0 0
10 OUT
E
4
F
5
A
0
A
0
ENT
11 C
2
D
3
E
4
F
5
ENT
GX D ENT
12 OUT 3
In the following example, when the value in V-memory location V2000 = 3916 or
13 V2002 is not equal to 2500, Y3 will energize.
14 DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
$ E C A A A
A V2000 K3916 Y3
OUT D
STR
3
SHFT
J
9
B
4
1
G
6
ENT
2 0 0 0
B V2002 K2500 R
C
ORN
SHFT
F
E
A
4
A
C
ENT
2
A
0
A
0
C
2
2 5 0 0
C GX
OUT
D
3
ENT
F
STR
SHFT
A
E
A
4
A
C
2
ENT
A
0
A
0
A
0 10
5 0 0 0
V
C
AND
SHFT
D
E
E
4
F
C
2
A
0
A
0
C
2 11
ENT
2 3 4 5
GX
OUT
D
3
ENT 12
In the following example, when the value in V-memory location V2000 = 2550 and V2002 13
does not equal 2345, Y3 will energize.
F
STR
SHFT
A
E
A
4
A
C
ENT
2
A
0
A
0
A
0
A
5 0 0 0
V
C
AND
SHFT
D
E
E
4
F
C
2
A
0
A
0
C
2 B
ENT
2 3 4 5
GX
OUT
D
3
ENT C
D
Store (STR)
1 DS5 Used The Comparative Store instruction begins a new rung or A aaa B bbb
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0177
8
In the following example, when the value in V-memory location V2000 1000, Y3 will
9 energize.
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
10 V2000 K1000 Y3
OUT
$
STR
SHFT V
AND
C
2
A
0
A
0
A
0
B A A A ENT
1 0 0 0
11 GX
OUT
D
3
ENT
12
13 In the following example, when the value in V-memory location V2000 < 4050, Y3 will
energize.
14
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
A V2000 K4050 Y3 SP
STRN
SHFT V
AND
C
2
A
0
A
0
A
0
OUT
B GX
E
4
A
D
0
F
ENT
5
A
0
ENT
OUT 3
C
D
Or (OR)
DS5 Implied The Comparative Or instruction connects a normally 1
open comparative contact in parallel with another A aaa B bbb
HPP Used
contact. The contact will be on when Aaaa is equal to
or greater than Bbbb.
2
Or Not (ORN) 3
DS5 Implied
The Comparative Or Not instruction connects a A aaa B bbb
HPP Used
normally open comparative contact in parallel with
another contact. The contact will be on when
4
Aaaa is less than Bbbb.
Operand Data Type DL05 Range
5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
All (See page 328)
bbb
All (See page 328)
6
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p All (See page 328) All (See page 328)
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 09999 7
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0177
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0177
8
In the following example, when the value in V-memory location V2000 = 6045 or
V2002 2345, Y3 will energize. 9
DirectSOFT 5
DirectSOFT32
V2000 K6045 Y3
Handheld Programmer Keystrokes
$
STR
SHFT E
4
C
2
A
0
A
0
A
0
10
OUT
V2002 K2345
G
Q
6
A
0
E
SHFT
4
F
V
5
ENT
C A A C
11
OR AND 2 0 0 2
C
GX
2
D
3
E
D
4
F
5
ENT
12
ENT
OUT 3
13
In the following example when the value in V-memory location V2000 = 1000 or
V2002 < 2500, Y3 will energize.
14
A
DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32
V2000 K1000 Y3
$
STR
SHFT E
4
C
2
A
0
A
0
A
0
B
OUT B A A A ENT
V2002 K2500
R
ORN
1 0 0
SHFT V
AND
0
C
2
A
0
A
0
C
2
C
C F A A
GX
OUT
2 5
D
0
3
0
ENT
ENT
D
And (AND)
1 DS5 Implied The Comparative And instruction connects a normally A aaa B bbb
HPP Used open comparative contact in series with another contact.
2 The contact will be on when Aaaa is equal to or greater
than Bbbb.
3 And Not (ANDN) A aaa B bbb
DS5 Implied
The Comparative And Not instruction connects a
4 HPP Used
normally open comparative contact in parallel with
another contact. The contact will be on when
Aaaa is less than Bbbb.
5 Operand Data Type DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb
6 V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V All (See page 328) All (See page 328)
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p All (See page 328) All (See page 328)
7 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T
0177
09999
8 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT 0177
In the following example, when the value in V-memory location V2000 = 5000, and
9 V2002 2345, Y3 will energize.
DirectSOFT 5
10 DirectSOFT32
$ SHFT E C A A A
STR 4 2 0 0 0
OUT
11 F
V
5
A
0
A
0
A
V
0
C
ENT
A A C
SHFT
AND AND 2 0 0 2
12 C
2
D
3
E
4
F
5
ENT
GX D ENT
OUT 3
13
14 In the following example, when the value in V-memory location V2000 = 7000 and
V2002 < 050, Y3 will energize.
A
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
C W
ANDN
7 0
SHFT
0
V
AND
0
C
2
A
0
A
0
C
2
D C
GX
2
F
5
A
D
0
A
ENT
0
ENT
OUT 3
Immediate Instructions 1
Store Immediate (STRI)
DS5 Used The Store Immediate instruction begins a new rung 2
HPP Used or additional branch in a rung. The status of the X aaa
contact will be the same as the status of the 3
associated input point at the time the instruction is
executed. The image register is not updated.
4
Store Not Immediate (STRNI)
DS5 Used The Store Not Immediate instruction begins a new
rung or additional branch in a rung. The status of X aaa
5
HPP Used
the contact will be opposite the status of the
associated input point at the time the instruction is 6
executed. The image register is not updated.
Operand Data Type DL05 Range 7
aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X 0377 8
In the following example when X1 is on, Y2 will energize.
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
9
$ I B
X1 Y2
OUT
GX
STR
SHFT
C
8
ENT
1
ENT
10
OUT 2
4 OUT
Q
STR
OR
SHFT I
1
8
ENT
C
2
ENT
X2
5 GX
OUT
F
5
ENT
X1 Y5 $ B
7 X2
OUT
R
ORN
STR
SHFT I
1
8
ENT
C
2
ENT
GX F
8 OUT 5
ENT
B V
AND
GX
SHFT I
F
8
C
2
ENT
ENT
OUT 5
D X1 X2 Y5
OUT
$
STR
B
1
ENT
W SHFT I C ENT
ANDN 8 2
GX F ENT
OUT 5
X1 Y2 $
STR
B
1
ENT
12
OUTI
O
INST#
D
3
F
5
A
0
ENT ENT
13
C ENT
2
14
In the following example, when X1 or X4 is on, Y2 will energize.
DirectSOFT 5
DirectSOFT32 Handheld Programmer Keystrokes
A
$ B
X1 Y2
OR OUTI O
STR
D F
1
ENT
A ENT ENT
B
INST# 3 5 0
X4 Y2
C
2
ENT C
OR OUTI $ E ENT
O
STR
INST#
D
3
F
4
5
A
0
ENT ENT
D
C ENT
2
DirectSOFT 5
10 DirectSOFT32 Handheld Programmer Keystrokes
$ B ENT
X1 Y2 Y5
11 SETI X
STR
SHFT I
1
C F ENT
SET 8 2 5
12
13
In the following example, when X1 is on, Y5 through Y22 will be reset (off ) in the image
14 register and on the corresponding output module(s).
DirectSOFT 5
A DirectSOFT32
Handheld Programmer Keystrokes
X1 Y5 Y22
B RSTI
$
S
STR
SHFT
B
I
1
ENT
F C C ENT
RST 8 5 2 2
C
D
Timer Preset
K30
7
T1
T1 Y0
OUT
8
Current 0 10 20 30 40 50 60 0
Value 1/10 Seconds
9
There are those applications that need an accumulating timer, meaning it has the ability to 10
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 start/stop input starts and
stops the timer. When the timer stops, the elapsed time is maintained. When the timer starts
11
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 12
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.
13
14
Seconds
0 1 2 3 4 5 6 7 8 X1
TMRA
K30
T0 A
X1 Enable
X2 B
X2
T0
Reset Input
C
Current
Value
0 10 10 20
1/10 Seconds
30 40 50 0
D
enabled if the input logic is true (on) and will be reset to 0 if Preset Timer#
3 the input logic is false (off ).
Instruction Specifications
4 Timer Reference (Taaa): Specifies the timer number. TMRF
B bbb
T aaa
T2 Y0
X1
4
OUT
T2
5
Y0
Handheld Programmer Keystrokes
Current
$
N
STR
B
C
1
ENT
D A
Value 0 10 20 30 40 50 60 0
6
ENT
TMR 2 3 0
$
GX
STR
SHFT
A
T
MLR
C
2
ENT 7
ENT
OUT 0
8
Timer Example Using Comparative Contacts
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energize Y3, Y4, and Y5 at one second intervals respectively.
9
When X1 is turned off the timer will be reset to 0 and the comparative contacts will turn off
Y3, Y4, and Y5. 10
DirectSOFT
Direct SOFT32 5
X1
TMR T20
0 1 2 3
Timing Diagram
Seconds
4 5 6 7 8
11
K45
TA20 K10 Y3
OUT
X1
Y3
12
TA20 K20 Y4
OUT
Y4
Y5
13
TA20 K30 Y5
OUT
Current
T2
0 10 20 30 40 50 60 0
14
Value
$ B ENT
A
STR 1
N
$
TMR
STR
C
SHFT
2
A
T
MLR
0
C
2
E
A
4
0
F
5
B
ENT
1
A
0
ENT
B
GX
$
OUT
STR
D
SHFT
3
ENT
T
MLR
C
2
A
0
C
2
A
0
ENT
C
GX E
$
OUT
STR
SHFT
4
ENT
T
MLR
C
2
A
0
D
3
A
0
ENT
D
GX F ENT
OUT 5
Instruction Specifications
6 Timer Reference (Taaa): Specifies the timer number.
Preset Timer#
Preset Value (Bbbb): Constant value (K) or a V-memory
7 location.
Current Value: Timer current values (BCD) are accessed by The timer discrete status bit
8 referencing the associated V or T memory location*. For and the current value are not
specified in the timer
example, the timer current value for T3 resides in V-memory
instruction
9 location V3 as a BCD value.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated T memory
10 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.
11 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 TMR 1 is used, the next available timer
number is TMR 3.
12
Operand Data Type DL05 Range
13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B aaa bbb
Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0176
14 V-memory for preset values . . . . . . . . . . . . . . . V
Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P
12007377/74007577*
12007377/74007577
Constants (preset only) . . . . . . . . . . . . . . . . . . K 099999999
A Timer discrete status bits . . . . . . . . . . . . . . . T/V 0176 or V4110041107
Timer current values . . . . . . . . . . . . . . . . . V /T** 0176
B NOTE: * May be non-volatile if MOV instruction is used.
** With the HPP, both the Timer discrete status bits and current value are accessed with the same
C data reference. DirectSOFT 5 uses separate references, such as T2 for discrete status bit for Timer
T2, and TA2 for the current value of Timer T2.
D The following examples show two methods of programming timers. One performs functions
when the timer reaches the preset value using the discrete status bit, or use comparative
contacts to perform functions at different time intervals.
X1
0 1 2 3
Seconds
4 5 6 7 8
4
K30
C10
C10
5
Y7 T6
T6
OUT Current
Value
0 10 10 20 30 40 50 0
6
Handheld Programmer Keystrokes Handheld Programmer Keystrokes (cont)
$
STR
B
1
ENT D
3
A
0
ENT 7
$ SHFT C B A ENT $ SHFT T G ENT
STR 2 1 0 STR MLR 6
N
TMR
SHFT A
0
G
6
GX
OUT
B
1
A
0
ENT 8
Accumulator Timer Example Using Comparative Contacts
9
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energized Y3, Y4, and Y5 at one second intervals 10
respectively. The comparative contacts will turn off when the timer is reset.
Contacts
DirectSOFT
X1
Timing Diagram
11
Seconds
TMRA T20 0 1 2 3 4 5 6 7 8
C10
K45 X1 12
C10
OUT
Y3
Y4
13
TA21 K1
T20
14
OUT
TA21 K1
Current
Value
0 10 10 20
1/10 Seconds
30 40 50 0
A
TA20 K30 TA21 K1 Y5
OUT
B
Handheld Programmer Keystrokes Handheld Programmer Keystrokes (contd)
$
STR
STR
B
SHFT
1
ENT
C
2
B
1
A
0
ENT
$
V
STR
AND
SHFT
SHFT
E
4
T
MLR
C
SHFT
2
A
T
MLR
0
C
2
B
C
2
1
A
0
ENT
A
0
ENT
C
E
D
N A C A E F Q SHFT SHFT T C B B ENT
SHFT ENT 4
TMR 0 2 0 4 5 OR MLR 2 1 1
$ SHFT T C A B A ENT GX E ENT
STR MLR 2 0 1 0 OUT 4
V E T C B A $ T C A D A
SHFT SHFT ENT SHFT ENT
AND 4 MLR 2 1 0 STR MLR 2 0 3 0
Q E T C B B V E T C B B
SHFT SHFT ENT SHFT SHFT ENT
OR 4 MLR 2 1 1 AND 4 MLR 2 1 1
GX D ENT GX F ENT
OUT 3 OUT 5
Using Counters
1 Counters are used to count events. The counters available are up counters, up/down counters,
and stage counters (used with RLLPLUS programming).
2 The up counter 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
3 reset, associated discrete bit, current value, and counter preset.
X1
4 X1
Up
CNT
K3
CT1
X2
X2
5 CT1
Reset
6 Current
alue
1 2
Counts
3 4 0 Counter preset
7 The up down counter 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
8 between the counter input, counter reset, associated discrete bit, current value, and counter
preset.
9
X1
UDC CT2
10 X1
X2
Up K3
X2
11 X3
X3
Down
CT2
12 Current
Value
1 2 1
Counts
2 3 0
Reset
Counter Preset
13 The stage counter 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
14 value is 9999. The timing diagram below shows the relationship between the counter input,
associated discrete bit, current value, counter preset and reset instruction.
A
B X1 X1
SGCNT CT2
K3
C CT2
Current 1 2 3 4 0
Value Counts Counter preset
D RST
CT2
Counter (CNT)
DS5 Used
The Counter is a two input counter that increments Counter# 1
when the count input logic transitions from off to on.
HPP Used
When the counter reset input is on the counter resets
to 0. When the current value equals the preset value,
Count CNT
B bbb
CT aaa 2
the counter status bit comes on and the counter
continues to count up to a maximum count of 9999.
Reset 3
The maximum value will be held until the counter is
reset. Preset 4
Instruction Specifications The counter discrete status bit and the
Counter Reference (CTaaa): Specifies the counter current value are not specified in the
counter instruction.
5
number.
Preset Value (Bbbb): Constant value (K) or a 6
V-memory location as a BCD value.
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
7
counter current value for CT3 resides in V-memory location V1003 as a BCD value.
Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT
8
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. 9
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
10
change the preset.
11
Operand Data Type DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B
Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
aaa
0177
bbb
12
12007377
V-memory (preset only) . . . . . . . . . . . . . . . . . . V 74007577*
12007377
13
Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P 74007577
Constants (preset only) . . . . . . . . . . . . . . . . . . K
Counter discrete status bits . . . . . . . . . . . . CT/V
0177 or V4114041147
09999 14
Counter current values . . . . . . . . . . . . . . V /CT** 0177
A
NOTE: * May be non-volatile if MOV instruction is used.
** With the HPP, both the Counter discrete status bits and current value are accessed with the same
data reference. DirectSOFT 5 uses separate references, such as CT2 for discrete status bit for
B
Counter CT2, and CTA2 for the current value of Counter CT2.
C
D
4 X1
CNT CT2
X1
5 C10
K3
C10
CT2 or
6 CT2 Y7
OUT
Y7
Current Value 1 2 3 4 0
$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)
$
STR
SHFT C
2
SHFT T
MLR
C
2
ENT
8 $
GY
CNT
STR
SHFT
C
2
C
2
B
D
1
3
A
ENT
0
ENT GX
OUT
B
1
A
0
ENT
12 DirectSOFT32
X1
CNT CT2
Counting diagram
X1
13 C10
K3
C10
CTA2 K1 Y3 Y3
14 OUT
Y4
CTA2 K2 Y4
Y5
A CTA2 K3
OUT
Y5
Current
Value
1 2 3 4 0
OUT
C $
GY
STR
SHFT
C
C
2
B
D
1
A
0
ENT
GX
C
2
ENT
E
ENT ENT
CNT 2 3 OUT 4
D $
STR
B
1
SHFT
ENT
C
2
SHFT T
MLR
C
2
$
STR
D
3
SHFT
ENT
C
2
SHFT T
MLR
C
2
GX D ENT GX F ENT
OUT 3 OUT 5
4 DirectSOFT 5
DirectSOFT32 Counting diagram
X1
SGCNT CT7
5 CT7
K3
Y7
X1
Y7
OUT Current 1 2 3 4 0
6 C5 CT7
RST
Value
RST
CT7
$
STR
B
1
ENT
Handheld Programmer Keystrokes (cont)
GX
OUT
B
1
A
0
ENT
S G GY $ C F
8 SHFT
H
7
RST
SHFT
D
3
6
ENT
SHFT
CNT
S
RST
STR
SHFT
SHFT C
2
2
SHFT
5
ENT
T
MLR
H
7
ENT
9 STR 2 MLR 7
13 X1
SGCNT
K10
CT2
X1
CT2 K1 Y3
14 OUT
Y3
Y4
CT2 K2 Y4
A CT2 K3
OUT
Y5
Y5
Current
Value
1 2 3 4 0
OUT
$ B $ C T C
C SHFT
STR
S
RST
G
1
6
ENT
SHFT GY
CNT
STR
C
2
SHFT
ENT
2
SHFT
MLR 2
C B A ENT GX E ENT
D $
2
STR
SHFT
1
C
0
2
SHFT T
MLR
C
2
$
OUT
STR
SHFT
4
C
2
SHFT T
MLR
C
2
B ENT D ENT
1 3
GX D ENT GX F ENT
OUT 3 OUT 5
4 X1
UDC
K3
CT2
X1
X2
5 X3
X2
X3
6 CT2 Y7
CT2
Current 1 2 1 2 3 0
OUT Value
$ B
Handheld Programmer Keystrokes (cont)
D
ENT ENT
STR 1 3
8 $
$
STR
C
D
2
ENT
ENT
$
GX
STR
SHFT
B
C
A
2
SHFT
ENT
T
MLR
C
2
ENT
STR 3 OUT 1 0
9 SHFT U
ISG
D
3
C
2
C
2
13 X1
X2
UDC
V2000
CT2
X1
14
X2
X3
X3
A CTA2 K1 Y3
OUT
Y3
Y4
Y4
B
CTA2 K2 Current 1 2 3 4 0
Value
OUT
C $
$
STR
B
C
1
ENT
ENT GX
B
1
ENT
D ENT
STR 2 OUT 3
D $
STR
SHFT U
ISG
D
D
3
3
ENT
C
2
C
2
$
STR
C
2
SHFT
ENT
C
2
SHFT T
MLR
C
2
X1
Data Input SR
$
STR
B
1
ENT 11
$ C ENT
X2
Clock Input
From C0
$
STR
STR
D
2
3
ENT
12
X3
Reset Input
To C17 SHFT S
B
RST
SHFT
H
R
ORN
SHFT A
0 13
ENT
1 7
7 X1 LD
V2000
8 9 3 5
Acc. 0 0 0 0 88 99 33 55
9
OUT
10 V2010
V2010
5
11 Since the accumulator is 32 bits and V-memory locations are 16 bits the Load Double and
Out Double (or variations thereof ) use two consecutive V-memory locations or 8 digit BCD
12 constants to copy data either to the accumulator from a V-memory address or from a
V-memory address to the accumulator. For example if you wanted to copy data from V2000
and V2001 to V2010 and V2011 the most efficient way to perform this function would be as
13 follows:
14 X1
LDD
V2000 6
V2001
7 3 9 5
V2000
0 2 6
Acc. 6 7 3 9 55 00 22 66
B
OUTD
C V2010 6 7 3 9 5 0 2 6
Copy data from the accumulator to
V2010 and V2011 V2011 V2010
D
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0
8
1
7
0
6 5
0 1
4 3
1 0
2
1
1
0
0
1
5
The upper 16 bits of the accumulator
will be set to 0
Shifted out of
accumulator
6
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
7
K4 Acc. 0 0 0 0 0 0
1 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
ADDD
V2006
+ 2
6 7
0
3
0
9
0
5
4
0
0
2
4
6
6
(Accumulator)
(V2006&V2007)
B
Acc. 8 7 3 9 9 0 7 2
Add the value in the
accumulator with the value
in V2006 and V2007 C
OUTD
V2010
V2011
9 9 0
V2010
7 2
D
accumulator to V2010 and
V2011
7 K3245
Acc. 0 0 0 0 3 2 4 5
Level 1 X
Accumulator Stack
X X X X X X X
Previous Acc. value X X X X X X X
8 Acc. X X X X X
X X X X
Level 2
Level 3
Level 4
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Level 5 X X X X X X X X
9 LD
Constant 5 1 5 1
Level 6
Level 7
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
K5151 Level 8 X X X X X X X X
Current Acc. value
Acc. 0 0 0 0 33 22 44 55 Level 1 0 0 0 0 3 2 4 5
11 Level 2
Level 3
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Level 4 X X X X X X X X
12 Level 5
Level 6
Level 7
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Constant 6 3 6 3
LD
Level 8 X X X X X X X X
13 K6363
Acc. 0 0 0 0 66 33 66 33
Bucket
accumulator, pushing the value Previous Acc. value Accumulator Stack
Level 3
A Level 4
Level 5
Level 6
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Level 7 X X X X X X X X
B Level 8 X X X X X X X X
Bucket
C
The POP instruction rotates values upward through the stack into the accumulator. When a
D 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. 0 0 0 0 44 55 4 5 Level 1 0
Accumulator Stack
0 0 0 3 7 9 2
2
Level 2 0 0 0 0 7 9 3 0
Level 3
Level 4
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
3
Level 5 X X X X X X X X
OUT
V2000
Acc. 0 0 0 0 33 77 99 22 Level 1 0
Accumulator Stack
0 0 0 7 9 3 0
6
Level 2 X X X X X X X X
Level 3
Level 4
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X 7
Level 5 X X X X X X X X
OUT
V2001
POP
Previous Acc. value
Acc. 0 0 0 0 33 47 69 02
9
Accumulator Stack
POP the 1st value on the stack into the
accumulator and move stack values
up one location
Current Acc. value
Acc. X X X X 77 99 33 00 Level 1
Level 2
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
10
Level 3 X X X X X X X X
Level 4
Level 5
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
11
OUT V2002 7 9 3 0 Level 6 X X X X X X X X
V2002
In the following simple example we are using a pointer operand in a Load instruction. C
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
D
the lower word of the accumulator.
1
X1 V2076 X X X X
LD
V2077 X X X X
P2000
2 V2000 (P2000) contains the value 440
V2100 2 6 3 5
V2101 X X X X
HEX. 440 HEX. = 2100 Octal which
contains the value 2635. V2102 X X X X
3 V2000 V2103 X X X X
Accumulator
0 4 4 0 V2104 X X X X
2 6 3 5
V2105 X X X X
4 OUT
V2200
6
7 The following example is identical to the one above with one exception. The LDA (Load
Address) instruction automatically converts the Octal address to Hex.
8
9
10 X1 LDA
O 2100
Load the lower 16 bits of the
accumulator with Hexadecimal
equivalent to Octal 2100 (440) 2 1 0 0
Acc. 0 0 0 0 00 44 44 00
13 V2000
14 V2076
V2077
X
X
X
X
X
X
X
X
A LD
P 2000
Hex. 440 Hex. = 2100 Octal which
contains the value 2635
V2101
V2102
X
X
X
X
X
X
X
X
V2100 V2103 X X X X
B 0 4 4 0 V2104
V2105
X
X
X
X
X
X
X
X 0 0
Accumulator
0 0 22 66 33 55
C OUT
V 2200
Copy the data from the lower 16 bits of
the accumulator to V2200 V2200 2 6 3 5
V2201 X X X X
Load (LD)
DS5 Used
The Load instruction is a 16 bit instruction that loads the
LD
1
HPP Used
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.
2
Operand Data Type DL05 Range 3
....................................A aaa
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
See memory map
See memory map
4
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0FFFF
OUT
V2010
12
Copy the value in the lower
16 bits of the accumulator to
V2010
8 9 3
V2010
5
13
Handheld Programmer Keystrokes 14
$ B X
STR 1 SET
SHFT L
ANDST
D
3
A
C
2
A
0
A
0
A
0
ENT
B
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
C
D
6 SP70
SP76
On anytime the value in the accumulator is negative.
On when the value loaded into the accumulator by any instruction is zero.
7 NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
8 In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be
loaded into the accumulator and output to V2010 and V2011.
9 DirectSOFT 5
Direct SOFT32
10 X1 LDD
V2000 6
V2001
7 3 9 5
V2000
0 2 6
12
6 7 3 9 5 0 2 6
13 OUTD
V2010 V2011 V2010
A $
STR
B
1
ENT
L D D
B C
SHFT
ANDST
A A
3
A
3
ENT
2 0 0 0
C GX
OUT
SHFT D
3
C A B A ENT
2 0 1 0
D
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 1
2
1
1
1
0
0
14
OUTF
K7
Y0
A
Location Constant Y6 Y5 Y4 Y3 Y2 Y1 Y0
Copy the value from the
B
$ SHFT C A ENT
SHFT
STR
L
ANDST
D
3
F
2
5
0
C
SHFT C B A H ENT
2 1 0 7
GX
A
OUT
SHFT F
H
5 D
ENT
0 7
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
7 accumulator stack.
In the following example when X1 is on, the octal number 40400 will be converted to a HEX
8 4100 and loaded into the accumulator using the Load Address instruction. The value in the
lower 16 bits of the accumulator is copied to V2000 using the Out instruction.
9
DirectSOFT 5
10 Direct SOFT32
X1 LDA Octal Hexadecimal
O 40400 4 0 4 0 0 4 1 0 0
12 accumulator
Acc. 0 0 0 0 4 1 0 0
13 4 1 0 0
OUT
14 V2000 V2000
C SHFT L
ANDST
D
3
A
0
E A E A A ENT
4 0 4 0 0
D GX
OUT
SHFT V
AND
C
2
A
0
A
0
A
0
ENT
Out (OUT)
DS5 Used
The Out instruction is a 16 bit instruction that copies the OUT 1
HPP Used
value in the lower 16 bits of the accumulator to a specified A aaa
V-memory location (Aaaa). 2
Operand Data Type DL05 Range
....................................A aaa 3
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
4
Discrete Bit Flags Description
SP53 On when the pointer is outside of the available range. 5
In the following example, when X1 is on, the value in V2000 will be loaded into the lower 16
bits of the accumulator using the Load instruction. The value in the lower 16 bits of the 6
accumulator are copied to V2010 using the Out instruction.V2000
DirectSOFT
Direct SOFT32 5
X1 LD V2000
Handheld Programmer Keystrokes
$ B ENT
7
8 9 3 5 STR 1
V2000
C
L
ANDST
A
D
A
3
A ENT
8
2 0 0 0
Acc. 0 0 0 0 88 99 33 55
OUT
V2010
GX
OUT
SHFT V
AND
C
2
A
0
B
1
A
0
ENT
9
Copy the value in the lower
16 bits of the accumulator to 8 9 3 5
X1 LDD
6
V2001
7 3 9 5
V2000
0 2 6
Handheld Programmer Keystrokes
$
STR
B
1
ENT
C
V2000
L D D
Load the value in V2000 and
V2001 into the accumulator Acc. 6 7 3 9 55 00 22 66
C
SHFT
2
ANDST
A
0
A
3
0
A
3
0
ENT
D
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 C10C16 (7 bits) will be
6 loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the
accumulator are output to Y0Y6 using the Out Formatted instruction.
7 DirectSOFT 5
Location Constant
8 C0 LDF
K7
consecutive bits (C10C16) The unused accumulator bits are set to zero
10 K7
$ SHFT C A ENT
12 STR
SHFT L
ANDST
D
3
F
2
5
0
SHFT C B A H ENT
2 1 0 7
13 GX
OUT
SHFT F
5
A H ENT
0 7
14
A POP
The POP instruction moves the value from the first level of the
B DS5
HPP
Used
Used
accumulator stack (32 bits) to the accumulator and shifts each POP
value in the stack up one level.
C
D Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
Acc. 0 0 0 0 44 55 44 55 Level 1 0
Accumulator Stack
0 0 0 3 7 9 2
5
accumulator and move stack values
up one location Level 2 0
0 0
0 0 0 7 9 3 0
OUT
Level 3
Level 4
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
6
V2000 Level 5 X X X X X X X X
POP
Previous Acc. value
8
Acc. 0 0 0 0 44 55 44 55
Pop the 1st. value on the stack into the
accumulator and move stack values
up one location
Current Acc. value
Acc. 0 0 0 0 3 7 9 2 Level 1 0
Accumulator Stack
0 0 0 7 9 3 0
9
Level 2 X X X X X X X X
OUT
V2001
Level 3
Level 4
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
10
Copy the value in the lower 16 bits of Level 5 X X X X X X X X
the accumulator to V2001 V2001 3 7 9 2 Level 6
Level 7
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
11
POP Level 8 X X X X X X X X
Pop the 1st. value on the stack into the Previous Acc. value
12
accumulator and move stack values
Acc. 0 0 0 0 3 7 9 2
up one location
OUT
Current Acc. value
Acc. 0 0 0 0 7 9 3 0 Level 1 X
Accumulator Stack
X X X X X X X
13
V2002 Level 2 X X X X X X X X
SHFT
STR
P
CV
SHFT O
2
INST#
P
0
CV
ENT
B
GX V C A A A
OUT
SHFT P
CV
SHFT
SHFT O
AND
INST#
P
2
CV
ENT
0 0 0
ENT
C
GX
OUT
SHFT P
SHFT
SHFT
V
O
AND
C
P
2
A
ENT
0
A
0
B
1
ENT
D
CV INST# CV
GX SHFT V C A A C ENT
OUT AND 2 0 0 2
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
13 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
6A38
Acc.
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
1
1
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
A OUT
V2010
2 8 3 8
Copy the lower 16 bits of the
accumulator to V2010
$ B ENT
STR 1
C SHFT L
ANDST
D
3
C
2
A
0
A
0
A
0
ENT
V SHFT V C A A G ENT
AND AND 2 0 0 6
D GX
OUT
SHFT V
AND
C
2
A
0
B
1
A
0
ENT
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0
8
0
7
0
6 5
1 1
4 3
1 1
2
0
1
1
0
0
12
ANDD
K36476A38
V2011
4 6 2 8
V2010
3 8 A
accumulator to V2010 and
V2011
B
Handheld Programmer Keystrokes
$
STR
L
B
D
1
D
ENT
C A A A
C
SHFT ENT
ANDST 3 3 2 0 0 0
V
AND
GX
SHFT D
D
3
SHFT
C
K
A
JMP
D
B
3
G
A
6
E
4
H
7
G
6
SHFT A
0
SHFT D
3
I
8
ENT
D
SHFT ENT
OUT 3 2 0 1 0
Or (OR)
1 DS5 Used
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
2 HPP Used
memory location (Aaaa). The result resides in the accumulator.
The discrete status flag indicates if the result of the Or is zero.
A aaa
11 V2000
12 OR
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
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
Acc. 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0
14 OUT
V2010
V2010
7 A
B $
SHFT
STR
L
B
D
1
ENT
C A A A ENT
ANDST 3 2 0 0 0
C Q
GX
OR
SHFT V
V
AND
C
C
2
A
A
0
A
B
0
G
A
6
ENT
SHFT ENT
OUT AND 2 0 1 0
Or Double (ORD)
DS5 Used
The Or Double is a 32 bit instruction that ors the value in 1
HPP Used
the accumulator with the value (Aaaa), which is either two ORD
consecutive V-memory locations or an 8 digit (max.)
constant value. The result resides in the accumulator.
K aaa 2
Discrete status flags indicate if the result of the Or Double is
zero or a negative number (the most significant bit is on). 3
Operand Data Type DL05 Range
aaa
4
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map 5
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0FFFFFFFF
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0
8
0
7
0
6 5
1 1
4 3
1 1
2
0
1
1
0
0
13
ORD
K36476A38
OR 36476A38
0
0
1
0
0
1
1
1
0
0
1
1
0
1
0
0
0
0
1
1
1
0
1
0
1
0
1
1
1
1
0
1
0
0
0
1 1
1 0
0
1
1
0
0
0
1
0
0
0
0
1
0
1
1
1
1
1
1
0
0
1
0
0
0
14
the constant value
36476A38 Acc. 0 0
1 0
1 0
1 0 1 0
1 0 0 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0
OUTD
V2010
A
7 6 7 F 6 A 7 A
Copy the value in the
accumulator to V2010 and
V2011
V2011 V2010 B
Handheld Programmer Keystrokes
$
STR
L
B
D
1
D
ENT
C A A A
C
SHFT ENT
ANDST 3 3 2 0 0 0
Q
GX
OR
SHFT
SHFT
D
D
3
SHFT
C
K
A
JMP
D
B
3
G
A
6
E
ENT
4
H
7
G
6
SHFT A
0
SHFT D
3
I
8
ENT
D
OUT 3 2 0 1 0
Exclusive Or (XOR)
1 DS5 Used
The Exclusive Or instruction is a 16 bit instruction that
HPP Used
performs an exclusive or of the value in the lower 16 bits of XOR
2 the accumulator and a specified V-memory location (Aaaa).
The result resides in the in the accumulator. The discrete
A aaa
7 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
8 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
9 are output to V2010 using the Out instruction.
10
DirectSOFT
Direct SOFT32 5
11 X1 LD
V2000
2
V2000
8 7 A
Load the value in V2000 into The upper 16 bits of the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0
13 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
14 accumulator with
the value in V2006
XOR (V2006)
Acc.
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
1
0
0
0
1
1
0
0
0
0
0
1
1
0
1
0
1
0
0
0
0
1
0
OUT
A V2010
$ X B
SHFT ENT
STR SET 1
C SHFT L
ANDST
X
D
3
Q
SHFT V
AND
C
V
2
A
C
0
A
A
0
A
A
0
ENT
G
SHFT SHFT SHFT ENT
SET OR AND 2 0 0 6
D GX
OUT
SHFT V
AND
C
2
A
0
B
1
A
0
ENT
XORD Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0
8
0
7
0
6 5
1 1
4 3
1 1
2
0
1
1
0
0
12
K36476A38
OUTD
V2010
Acc. 0 0
1 0
1 0 0 1
0 0
1 0 0 0 1
0 1
0 1
0 0 0 1
0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0
14
Copy the value in the
accumulator to V2010
and V2011 6 2
V2011
3 9 4 2
V2010
4 2 A
Handheld Programmer Keystrokes
$
SHFT
STR
L
B
D
1
D
ENT
C A A A ENT
B
ANDST 3 3 2 0 0 0
SHFT
D
X
G
SET
Q
E
OR
SHFT
H
D
G
3
SHFT
SHFT
A
K
JMP
SHFT D I ENT
C
3 6 4 7 6 0 3 8
GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
D
Compare (CMP)
1 DS5 Used
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
HPP Used
2 specified V-memory location (Aaaa). The corresponding status flag
will be turned on indicating the result of the comparison.
A aaa
7 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
8 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
9 flag will be turned on indicating the result of the comparison. In this example, if the value in
the accumulator is less than the value specified in the Compare instruction, SP60 will turn on
10 energizing C30.
DirectSOFT
Direct SOFT32 5
11 X1 LD
K4526 4
CONSTANT
5 ?
2 ?
6
Acc. 0 0 0 0 44 55 2?
2 66
?
13 Compared
with
CMP
14 V2000
C SHFT
STR
L
ANDST
D
1
3
SHFT K
JMP
E
4
F
5
C
2
G
6
ENT
SHFT
ORST
SP
STRN
G
CV
6
A
0
ENT
2 0 0 0
GX SHFT C D A ENT
OUT 2 3 0
Acc. 4 5 ?
2 6 77 72 9 9
13
Compared
CMPD with
V2010
SP60 C30
A
OUT
SHFT L
B
D
1
D
ENT
C A A A ENT
C
ANDST 3 3 2 0 0 0
$
SHFT C
2
SHFT
SHFT
M
ORST
SP
P
G
CV
D
A
3
ENT
C
2
A
0
B
1
A
0
ENT
D
STR STRN 6 0
GX SHFT C D A ENT
OUT 2 3 0
1 Math Instructions
Add (ADD)
2 Add is a 16 bit instruction that adds a BCD value in the ADD
DS5 Used A aaa
accumulator with a BCD value in a V-memory location (Aaaa).
3 HPP Used
The result resides in the accumulator.
Operand Data Type DL05 Range
4 ....................................A aaa
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
5 Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
12 V2000
13 ADD
+
0 0 0 0 4
2
9
5 0
3 5
0
(Accumulator)
(V2006)
V2006
A OUT
V2010 7 4 3 5
C $
STR
L
B
D
1
ENT
C A A A
SHFT ENT
ANDST 3 2 0 0 0
D SHFT A
0
D
3
D
3
C
2
A
0
A
0
G
6
ENT
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
9
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the 10
accumulator is copied to V2010 and V2011 using the Out Double instruction.
Direct SOFT V2001 V2000
11
X1 6 7 3 9 5 0 2 6
LDD
V2000
ADDD
+ 2
6 7
0
3
0
9
0
5
4
0
0
2
4
6
6
(Accumulator)
(V2006 and V2007)
13
V2006
SHFT
ANDST
A
0
D
3
3
D
3
3
D
3
2
C
0
2
A
0
0
A
0
0
G
6
ENT
D
GX SHFT D SHFT V C A B A ENT
OUT 3 AND 2 0 1 0
Subtract (SUB)
1 DS5 Used
Subtract is a 16 bit instruction that subtracts the BCD value (Aaaa) SUB
in a V-memory location from the BCD value in the lower 16 bits of A aaa
2 HPP Used
the accumulator. The result resides in the accumulator.
Operand Data Type DL05 Range
3 ....................................A aaa
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
4 Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
X1 LD
2
V2000
4 7 5
V2000
13 SUB
V2006
_
1 5 9 2 (V2006)
Acc. 0 8 8 3
A OUT
V2010
0 8 8 3
V2010
Copy the value in the lower
B 16 bits of the accumulator to
V2010
Handheld Programmer Keystrokes
C $
STR
B
1
ENT
SHFT L D C A A A ENT
D SHFT
ANDST
S U
3
B
2
SHFT
0
V
0
C
0
A A G ENT
RST ISG 1 AND 2 0 0 6
GX SHFT V C A B A ENT
OUT AND 2 0 1 0
X1 LDD
V2000
0 1 0 6 3 2 7 4
11
Load the value in V2000 and
V2001 into the accumulator
0 1 0 6 3 2 7 4 (Accumulator)
12
_ 6 7 2 3 7 5 (V2006 and V2007)
SUBD
V2006 ACC. 0 0 3 9 0 8 9 9 13
The in V2006 and V2007 is
subtracted from the value in
the accumulator 14
OUTD 0 0 3 9 0 8 9 9
V2010
V2011 V2010 A
Copy the value in the
accumulator to V2010 and
V2011
B
Handheld Programmer Keystrokes
$
STR
B
1
ENT C
SHFT L D D C A A A ENT
SHFT
ANDST
S SHFT
3
U
3
B D
2 0
C
0
A
0
A G ENT
D
RST ISG 1 3 2 0 0 6
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
Multiply (MUL)
1 DS5 Used
Multiply is a 16 bit instruction that multiplies the BCD
MUL
A aaa
value (Aaaa), which is either a V-memory location or a
2 HPP Used
4digit (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.
3 Operand Data Type DL05 Range
....................................A aaa
4 V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
5 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 09999
8 NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
9 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
10 Double instruction.
DirectSOFT 5
Direct SOFT32 V2000
1 0 0 0
11 X1 LD
V2000
The unused accumulator
Load the value in V2000 into
13 V2006
14 accumulator
0 0 0 2 5 0 0 0
OUTD
A V2010
B V2011
C $
STR
B
1
ENT
SHFT L D C A A A ENT
D SHFT
ANDST
M
ORST
U
ISG
3
L
ANDST
2
C
0
2
A
0
0
A
0
0
G
6
ENT
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
OUTD
BCD format. It will
occupy eight BCD digits
(32 bits).
Output the number to
1
X
2 3 4 5 6 7 8
2 (Accumulator)
12
V1400 and V1401 using
V1400
LD
the OUTD instruction.
MULD
V1400
Multiply the accumulator
contents (2) by the
8-digit number in V1400
2 4 6
V1403
9 1 3
V1402
5 6
14
and V1401.
OUTD
V1402
Move the result in the
accumulator to V1402
and V1403 using the
OUTD instruction.
A
Handheld Programmer Keystrokes
$
STR
B
1
ENT B
SHFT L D D PREV SHFT B C SHFT G B E SHFT E ENT
SHFT
ANDST
B
1
C
3
2
D
3
3
ENT
1 2 6 1 4 4
C
GX SHFT D B E A A ENT
OUT 3 1 4 0 0
SHFT L
ANDST
D
3
PREV C
2
ENT D
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
Divide (DIV)
1 DS5 Used
Divide is a 16 bit instruction that divides the BCD value
HPP Used
in the accumulator by a BCD value (Aaaa), which is
2 either a V-memory location or a 4-digit (max.) constant.
The first part of the quotient resides in the accumulator
DIV
A aaa
and the remainder resides in the first stack location.
3
Operand Data Type DL05 Range
4 ....................................A aaa
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
5 Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See memory map
09999
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
9 In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator will be divided by the
10 value in V2006 using the Divide instruction. The value in the accumulator is copied to
V2010 using the Out instruction.
11 DirectSOFT
Direct SOFT32 5 V2000
5 0 0 0
12 X1 LD
V2000
DIV
bits are set to zero
0 0 0 0 5 0 0 0 (Accumulater)
4 9 V2006
V2006
A OUT 1 0 2
V2010 V2010
C $
STR
B
1
ENT
L D C A A A
D SHFT
SHFT
ANDST
D
3
I
3
8
V
AND
2
C
0
2
A
0
0
A
0
0
G
ENT
6
ENT
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.
8
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into 9
the accumulator using the Load Double instruction. The value in the accumulator is divided
by the value in V1420 and V1421 using the Divide Double instruction. The first part of the
quotient resides in the accumulator an the remainder resides in the first stack location. The
10
value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.
DirectSOFT 5 V1401 V1400
11
X1 LDD 0 1 5 0 0 0 0 0
V1400
DIVD v
0
0
1
0
5
0
0
0
0
0
0
0
0
5
0
0
(Accumulator)
$
STR
B
1
ENT SHFT L
ANDST
D
3
D
3
C
B E A A D I V
1
B
4
E
0
C
0
ENT
A
SHFT
ENT GX
3
SHFT
8
D
AND
D
1 4 2 0 OUT 3
B F A A ENT
1 5 0 0
Increment (INC)
1 DS5 Used The Increment instruction increments a BCD value in a INC
specified V-memory location by 1 each time the instruction A aaa
HPP Used
2 is executed.
Decrement (DEC)
3 DS5 Used
The Decrement instruction decrements a BCD value in a DEC
specified V-memory location by 1 each time the instruction
HPP Used A aaa
4 is executed.
10 C5 INC
8 9 3 5
V1400
$ F
NEXT NEXT NEXT NEXT ENT
STR 5
13 SHFT I
8
N
TMR
C
2
B
1
E
4
A
0
A
0
ENT
14 In the following increment example, when C5 is on the value in V1400 increases by one.
DirectSOFT 5
A Direct SOFT32
C5 DEC
8
V1400
9 3 5
B V1400
D $
STR
D E
NEXT NEXT
C
NEXT NEXT
B
F
E
5
ENT
A A
SHFT ENT
3 4 2 1 4 0 0
SHFT I
8
SHFT
N
TMR
C
C
2
2
F
B
5
1
ENT
C
2
A
0
A
0
A
0
ENT
7
in the accumulator by1 V2000
4 A 3 D
8
Decrement Binary (DECB)
DS5 Used
The Decrement Binary instruction decrements a binary
value in a specified V-memory location by 1 each time
DECB 9
HPP Used A aaa
the instruction is executed.
10
Operand Data Type DL05 Range
....................................A
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
11
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
12
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero. 13
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
14
In the following example when C5 is on, the value in V2000 is decreased by 1.
DirectSOFT
Direct SOFT32
5 V2000
Handheld Programmer Keystrokes
A
4 A 3 C
C5 DECB $ C F
B
SHFT ENT
STR 2 5
V2000
SHFT D E C B C A A A ENT
Decrement the binary value 3 4 2 1 2 0 0 0
in the accumulator by1 V2000
4 A 3 B
C
D
accumulator.
3
Operand Data Type DL05 Range
4 ....................................A
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
5 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0FFFF
NOTE: Status flags are valid only until another instruction uses the same flag.
9 In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator will be added to
10 the binary value in V1420 using the Add Binary instruction. The value in the accumulator is
copied to V1500 and V1501 using the Out Double instruction.
11 DirectSOFT 5 Use either OR Constant
V-memory
V1400
12 X1 LD
V1400
LD
K2565
0 A 0 5
14 ADDB
V1420
+
Acc.
1
1
2
C
C
C
4
9
(V1420)
OUTD 1 C C 9
V1500
V1500
D SHFT
SHFT
L
A
D
D
V
D B
1 4 0
V
0
1
ENT
4 2 0 ENT
X1
11
LD LD
K1024
V1400
0
0 2
A 0
4
B
(Accumulator)
(V1420)
14
Acc. 0 6 1 9
OUT
V1500 A
Copy the value in the lower 16
bits of the accumulator to V1500
0 6 1
V1500
9
B
Handheld Programmer Keystrokes
STR
L
X(IN)
D
1
V
ENT
1 4 0 0 ENT
C
SHFT
SHFT
V
S
1
SHFT
4 2
U B
0
B
ENT
D
OUT SHFT D V 1 5 0 0 ENT
7 NOTE: Status flags are valid only until another instruction uses the same flag.
8 In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is multiplied by the
binary value in the accumulator using the Multiply Binary instruction. The value in the
9 accumulator is copied to V1500 and V1501 using the Out Double instruction.
10 DirectSOFT
DirectSOFT325 Display
Use either
V-memory
OR Constant
11 X1 LD
V1400
LD
K2561
0
V1400
A 0 1
Acc. 0 0 0 1 C C 2 E
OUTD
A V1500 0 0 0 1 C C 2 E
C STR X 1 ENT
SHFT L D V 1 4 0 0 ENT
D SHFT M U L B V 1 4 2 0 ENT
0
0
3
5
2
0
0
(V1420)
0 0 0 0 0 0 0 0
14
accumulator is divided by
First stack location contains
the binary value in V1420
OUT
the remainder
A
V1500 0 3 2 0
SHFT L D V 1 4 0 0 ENT D
SHFT D I V B V 1 4 2 0 ENT
In the following example, when X1 is on, the value formed by discrete locations X10X17 is
5 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
6 copied to V1500 using the Out instruction.
7 DirectSOFT 5
Direct SOFT32 Display
X17 X16 X15 X14 X13 X12 X11 X10
X1 ON ON OFF OFF ON OFF ON ON
LDF X10
8 K8
9 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
1
6 5
1 0
4 3
0 1
2
0
1
1
0
1
10 SUM
Acc. 0 0 0 0 0 0 0 5
12 OUT
V1500
0 0 0
V1500
5
$ B
14 SHFT
STR
L
ANDST
D
1
3
F
ENT
5
B
1
A
0
I
8
ENT
A SHFT
GX
S
RST
SHFT
PREV
U
ISG
PREV
M
ORST
PREV B
ENT
F A A ENT
OUT 1 5 0 0
B
C
D
SHFL Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0
8
1
7
0
6 5
0 0
4 3
0 0
2
0
1
0
0
1
10
K2
$
STR
B
1
ENT A
SHFT L D D C A A A ENT
ANDST 3 3 2 0 0 0
SHFT S
RST
SHFT H
7
F
5
L
ANDST
C
2
ENT B
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
C
D
10 V2000
11 SHFR
K2
Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
OUTD
13 V2010
V2011
14
A 1 9
V2011
C 1 4 C
V2010
4 0
B $
STR
B
1
ENT
SHFT L D D C A A A ENT
C SHFT
ANDST
S
RST
SHFT
3
H
3
7
F
5
R
ORN
2 0
C
0
2
0
ENT
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
Encode (ENCO)
DS5 Used
The Encode instruction encodes the bit position in the 1
HPP Used
accumulator having a value of 1, and returns the appropriate
binary representation. If the most significant bit is set to 1 (Bit
31), the Encode instruction would place the value HEX 1F
ENCO 2
(decimal 31) in the accumulator. If the value to be encoded is
0000 or 0001, the instruction will place a zero in the 3
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.
4
Discrete Bit Flags Description 5
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
6
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
7
In the following example, when X1 is on, The value in V2000 is loaded into the accumulator
using the Load instruction. The bit position set to a 1 in the accumulator is encoded to the
corresponding 5 bit binary value using the Encode instruction. The value in the lower 16 bits
8
of the accumulator is copied to V2010 using the Out instruction.
9
DirectSOFT
Direct SOFT32 5
X1 LD
1
V2000
0 0 0
10
V2000
Bit postion 12 is
converted
12
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
13
Encode the bit position set
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
to 1 in the accumulator to a
5 bit binary value
14
OUT
V2010
0 0 0 C
A
Copy the value in the lower 16 bits
of the accumulator to V2010
SHFT
STR
L
ANDST
D
1
3
ENT
C
2
A
0
A
0
A
0
ENT
C
E N C O
SHFT
GX
OUT
4 TMR
SHFT V
AND
2 INST#
C
2
ENT
A
0
B
1
A
0
ENT
D
Decode (DECO)
1 DS5 Used
The Decode instruction decodes a 5 bit binary value of 031
HPP Used
(01F HEX) in the accumulator by setting the appropriate bit DECO
2 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
3 is less than 32 and then the value is decoded.
In the following example when X1 is on, the value formed by discrete locations X10X14 is
4 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
5 the Decode instruction.
6 DirectSOFT
Direct SOFT32 5
X14 X13 X12 X11 X10
7 X1 LDF
K5
X10 OFF ON OFF ON ON
8 represented by discrete
locations X10X14 into the
accumulator
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 1
2
0
1
1
0
1
bit position to a 1
$ B ENT
STR 1
12 SHFT L
ANDST
D
3
F
5
B
1
A
0
F
5
ENT
SHFT D E C O ENT
3 4 2 INST#
13
14
A
B
C
D
X1 LDD
V2000
0 0 0 2 8 5 2 9
8
Load the value in V2000 and
V2001 into the accumulator
8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
9
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
10
28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1
$
STR
B
1
ENT
C
L D D C A A A
SHFT
SHFT
ANDST
B
1
I
3
8
N
TMR
3
ENT
2 0 0 0
ENT
D
GX SHFT D C A B A ENT
OUT 3 2 0 1 0
DirectSOFT
DirectSOFT325
6 X1 0
V2001
0 0 0 6
V2000
F 7 1
LDD
7 V2000
8 Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0
2
0
1
0
5
0 0
2 1
0
6
0
3 1
0 0 0
8 4
0
2
0
1
0
5 2
0 0
1
0
6
0
3
1
1
1
8
0 1
4 2
1
1
1
5
8
1
2
7 6 5
0 1
1 6
1
3
4 3
1
1
0
8
2
0 0
4
1
2 1
0
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
9 4
7
4
4
7
3
7
4
6
8
7
0
8
4
3
5
4
2
1
7
1
0
8
8
5
5
4
4
7
7
7
2
8
8
6
0
9
4
3
0
9
7
1
5
4
8
5
7
4
2
8
8
2
1
4
4
1
0
7
2
5
3
6
7
6
8
3
8
4
9
2
9
6
4
8
2
4
2 6 8
8 1 9 4 7 6 3 1 8 4 2 6
10 3
6
4
8
2
4
1
2
5
6
2
8
4 2 6
11 BCD
16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 = 28529
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
13
14 OUTD
V2010
B $
STR
B
1
ENT
L D D C A A A
C SHFT
SHFT
ANDST
B
1
C
3
2
D
3
3
ENT
2 0 0 0
ENT
D GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
Invert (INV)
DS5 Used The Invert instruction inverts or takes the ones INV
1
HPP Used complement of the 32 bit value in the accumulator. The
result resides in the accumulator. 2
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
3
using the Out Double instruction.
4
5
DirectSOFT
Direct SOFT32 5 V2001 V2000
6
X1 0 4 0 5 00 22 55 00
LDD
V2000
OUTD F B F A F D A F
10
V2010 V2011 V2010
Copy the value in the
accumulator to V2010 and
V2011
11
Handheld Programmer Keystrokes
12
$ B ENT
SHFT
STR
L
ANDST
D
1
3
D
3
C
2
A
0
A
0
A
0
ENT
13
SHFT I N V ENT
GX
OUT
SHFT
8
D
TMR
3
AND
C
2
A
0
B
1
A
0
ENT 14
A
B
C
D
In the example on the following page, when X1 is ON the constant (K4) is loaded into the
13 accumulator using the Load instruction and will be placed in the first level of the accumulator
stack when the next Load instruction is executed. The starting location for the ASCII table
14 (V1400) is loaded into the accumulator using the Load Address instruction. The starting
location for the HEX table (V1600) is specified in the ASCII to HEX instruction. The table
A below lists valid ASCII values for ATH conversion.
ASCII Values Valid for ATH Conversion
B ASCII Value
30
HEX Value
0
ASCII Value
38
HEX Value
8
31 1 39 9
C 32 2 41 A
33 3 42 B
D 34
35
4
5
43
44
C
D
36 6 45 E
37 7 46 F
DirectSOFT 5
Direct SOFT32
X1 LD
K4
Load the constant value
into the lower 16 bits of the
accumulator. This value
ASCII TABLE
Hexadecimal
Equivalents
1
defines the number of V
LDA
memory location in the
ASCII table
D
3
A
PREV E
B
4
E
ENT
A A
5678 V1601 5
SHFT
ANDST 3 0 1 4 0 0
ENT
V1403 35 36
SHFT A
0
T
MLR
H
7
B
1
G
6
A
0
A
0
ENT
6
7
HEX to ASCII (HTA) 8
The HEX to ASCII instruction converts a table of HTA
DS5 Used
HEX values to a specified table of ASCII values.
HPP Used
HEX values are one digit and their ASCII
V aaa 9
equivalents are two digits.
This means a HEX table of two V-memory locations would require four V-memory locations 10
for the equivalent ASCII table. The function parameters are loaded into the accumulator
stack and the accumulator by two additional instructions. Listed below are the steps necessary
to program a HEX to ASCII table function. The example on the following page shows a
11
program for the HEX to ASCII table function.
Step 1: Load the number of V-memory locations in the HEX table into the first level of
12
the accumulator stack.
Step 2: Load the starting V-memory location for the HEX table into the accumulator. This 13
parameter must be a HEX value.
Step 3: Specify the starting V-memory location (Vaaa) for the ASCII table in the HTA 14
instruction.
Helpful Hint: For parameters that require HEX values when referencing memory A
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator. B
C
D
6 X1 LD
K2
Equivalents ASCII TABLE
V1500 1234
8 LDA
O 1500
31 32 V1401
10 HTA
V1400
37 38 V1402
$
STR
B
1
ENT
L D K E
13 SHFT
SHFT
ANDST
L
ANDST
D
3
3
A
0
SHFT
B
JMP
1
F
4
5
ENT
A
0
A
0
ENT
H T A B E A A
14 SHFT
7 MLR 0 1 4 0 0
ENT
The table below lists valid ASCII values for HTA conversion.
A ASCII Values Valid for HTA Conversion
Hex Value ASCII Value Hex Value ASCII Value
B 0 30 8 38
1 31 9 39
C 2
3
32
33
A
B
41
42
D 4
5
34
35
C
D
43
44
6 36 E 45
7 37 F 46
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8
0
7
0
6 5
0 0
4 3
0 0
2
1
1
0
0
1
12
GRAY
OUT
V2010
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
14
Copy the value in the lower
16 bits of the accumulator to
V2010
Gray Code
0000000000
BCD
0000 0 0 0 6
A
Handheld Programmer Keystrokes 0000000001 0001 V2010
$
STR
B
1
ENT
0000000011
0000000010
0002
0003
B
L D F B A B G 0000000110 0004
SHFT ENT
SHFT
ANDST
G
6
R
ORN
3
A
5
0
Y
MLS
ENT
1 0 1 6
0000000111
0000000101
0005
0006
C
GX V C A B A 0000000100 0007
SHFT ENT
OUT AND 2 0 1 0
D
1000000001 1022
1000000000 1023
HPP Used
digits rearranging them in a specified order. This function
2 requires parameters to be loaded into the first level of the
accumulator stack and the accumulator with two additional instructions. Listed below are
the steps necessary to use the shuffle digit function. The example on the following page
3 shows a program for the Shuffle Digits function.
Step 1: Load the value (digits) to be shuffled into the first level of the accumulator stack.
4 Step 2: Load the order that the digits will be shuffled to into the accumulator.
Step 3: Insert the SFLDGT instruction.
5
NOTE: If the number used to specify the order contains a 0 or 9-F, the corresponding position will
6 be set to 0.
9 A B C D E F 0
accumulator stack defines the digits to be shuffled.
10 They correspond to the bit positions in the
accumulator that define the order the digits will be
11 shuffled. The digits are shuffled and the result
resides in the accumulator.
1 2 8 7 3 6
12 Bit Positions 8 7 6 5 4 3 2 1
13 B C E F
Result (accumulator)
0 D A 9
14
A
B
C
D
In the following example when X1 is on, The value in the first level of the accumulator stack
will be reorganized in the order specified by the value in the accumulator. 1
Example A shows how the shuffle digits works when 0 or 9 F is not used when specifying
the order the digits are to be shuffled. Also, there are no duplicate numbers in the specified
order.
2
Example B shows how the shuffle digits works when a 0 or 9F is used when specifying the
order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed, the
3
bit positions in the first stack location that had a corresponding 0 or 9F in the accumulator
(order specified) are set to 0. 4
Example C shows how the shuffle digits works when duplicate numbers are used specifying
the order the digits are to be shuffled. Notice when the Shuffle Digits instruction is executed, 5
the most significant duplicate number in the order specified is used in the result.
DirectSOFT
Direct SOFT32 5
6
A B C
X1 LDD
V2000 9 A
V2001
B C D
V2000
E F 0 0
V2001
F E D C
V2000
B A 9 9
V2001
A B C D
V2000
E F 0 7
Load the value in V2000 and
V2001 into the accumulator
Original
bit
Positions
8
9 A
7 6
B C
5 4
D
3
E
2
F
1
0 Acc.
8 7 6 5
0 F E D
4
C
3
B
2
A
1
9 Acc.
8
9
7
A
6
B
5
C
4
D
3
E
2
F
1
0 Acc. 8
V2007 V2006 V2007 V2006 V2007 V2006
LDD
V2006
SHFT L
ANDST
B
D
1
3
D
ENT
3
C
2
A
0
A
0
A
0
ENT
A
SHFT
SHFT
L
ANDST
S
RST
D
SHFT
3
D
F
3
5
L
ANDST
C
D
2
3
A
G
0
6
A
T
MLR
0
G
ENT
6
ENT
B
GX
OUT
SHFT D
3
C
2
A
0
B
1
A
0
ENT
C
D
1 Table Instructions
Move (MOV)
2 The Move instruction moves the values from a V-memory
MOV
V aaa
DS5 Used
table to another V-memory table the same length (a table is
3 HPP Used
a consecutive group of V-memory locations). The function
parameters are loaded into the first level of the accumulator stack and the accumulator by two
4 additional instructions. The MOV instruction can be used to write data to non-volatile V-
memory (see Appendix F). Listed below are the steps necessary to program the MOV
function.
5 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).
6 Step 2: Load the starting V-memory location for the locations to be moved into the accumulator.
This parameter is a HEX value.
7 Step 3: Insert the MOVE instruction which specifies starting V-memory location (Vaaa) for the
destination table.
8 Helpful Hint: For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX equivalent
and load the value into the accumulator.
9 Operand Data Type DL05 Range
....................................A aaa
10 V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See memory map
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P See memory map
11 Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
12 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
13 placed in the first stack location after the Load Address instruction is executed. The octal
address 2000 (V2000), the starting location for the source table is loaded into the
accumulator. The destination table location (V2030) is specified in the Move instruction.
14 DirectSOFT
Direct SOFT325
A K6
(HEX) into the lower 16 bits
of the accumulator
B MOV
O 2000 the accumulator
$ B
1
X
0
X
1
X
0 V2005
X V2006
1
X
0
X
1
X
0 V2035
X V2036
ENT X X X X V2007 X X X X V2037
STR 1
D SHFT L
ANDST
L
D
D
3
A
SHFT K
C
JMP
G
A
6
A
ENT
A
SHFT ENT
ANDST 3 0 2 0 0 0
SHFT M O V C A D A ENT
ORST INST# AND 2 0 3 0
N C O N 4 5 3 2 V2001 LD
9 K
N
4
C
5
O
3
N
2
6 1 5 1 V2002
K0
N
6
C
1
O
5
N
1
8 8 4 5 V2003
offset for source and
destination locations
K 8 8 4 5
LDLBL
11 X X
.
X X V2004 K1
$ B
MOVMC
ENT V2000
STR 1
14 SHFT L
ANDST
D
3
SHFT K
JMP
E
4
ENT V2000 is the destination
starting address for the data
to be copied.
L D K A
A SHFT
ANDST
L D
3
L
SHFT
B L
JMP 0
ENT
B
SHFT ENT
ANDST 3 ANDST 1 ANDST 1
B SHFT M
ORST
O
INST#
V
AND
M
ORST
C
2
C
2
A
0
A
0
A
0
ENT
C
D
N O P
3
SHFT ENT
NOP TMR INST# CV
4
End (END) 5
The End instruction marks the termination point of the normal
DS5 Used
HPP N/A
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
END 6
the CPU will not enter the Run Mode. Data labels, subroutines and
interrupt routines are placed after the End instruction. The End 7
instruction is not conditional; therefore, no input contact is allowed.
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
8
END
SHFT E
4
N
TMR
D
3
ENT
9
10
Stop (STOP)
The Stop instruction changes the operational mode of the CPU
11
DS5 Used STOP
from Run to Program (Stop) mode. This instruction is typically
HPP N/A
used to stop PLC operation in an error condition. 12
In the following example, when C0 turns on, the CPU will stop
operation and switch to the program mode. 13
DirectSOFT 5
Direct SOFT32 Handheld Programmer Keystrokes
$ C A
14
C0 SHFT ENT
STR 2 0
STOP
SHFT S
RST
SHFT T
MLR
O
INST#
P
CV
ENT
A
B
Discrete Bit Flags Description
SP16 On when the DL05 goes into the TERM_PRG mode.
C
SP53 On when the DL05 goes into the PRG mode.
D
R S T W T
10 RSTWT
SHFT
ORN RST MLR ANDN MLR
ENT
11
12
13
14
A
B
C
D
In the following example, when X1 is on, the application program inside the For / Next loop
1 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.
2 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.
3 DirectSOFT 5
Direct SOFT32
X1 1 2 3
K3
4 FOR
5 RSTWT
6 X20 Y5
7 OUT
8 NEXT
9
Handheld Programmer Keystrokes
10 $
STR
B
1
ENT
11 SHFT F
R
5
O
INST#
S
R
T
ORN
W
D
T
3
ENT
SHFT ENT
ORN RST MLR ANDN MLR
12 $
STR
SHFT I
8
C
2
A
0
ENT
GX F
13 OUT
SHFT N E
5
ENT
X T ENT
TMR 4 SET MLR
14
A
B
C
D
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
1 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
2 Y0Y17 will be reset to off and then the CPU will return to the main body of the program.
DirectSOFT
Direct 5
SOFT32 Display X1 K3
3 C0
LD
GTS
K10
4
END
5 SBR K3
6 X20 Y5
OUTI
7 X21 Y10
OUTI
8 X35
RTC
X35 Y0 Y17
9 RSTI
10 RT
11 $
STR
B
1
ENT
SHFT G T S D ENT
6 MLR RST 3
12 ?
?
SHFT E N D ENT
4 TMR 3
13 SHFT S
RST
SHFT B
1
R
ORN
D
3
ENT
$ SHFT I C A ENT
14 GX
OUT
STR
SHFT I
8
8
F
2
5
ENT
0
$ I C B
A GX
STR
SHFT
SHFT I
8
B
2
A
1
ENT
ENT
OUT 8 1 0
B $
STR
SHFT
R
I
T
8
C
D
3
F
5
ENT
SHFT ENT
ORN MLR 2
C SP
STRN
SHFT I
8
D
3
F
5
ENT
S SHFT I A B H ENT
RST 8 0 1 7
D SHFT R
ORN
T
MLR
ENT
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will jump
to the Subroutine Label K3 and the ladder logic in the subroutine will be executed. The CPU 1
will return to the main body of the program after the RT instruction is executed.
DirectSOFT
Direct SOFT532 2
X1 K3
GTS 3
4
END 5
6
SBR K3
7
X20 Y5
OUT
8
X21 Y10
9
OUT
10
RT 11
Handheld Programmer Keystrokes
12
$ B
STR
G T
1
S
ENT
D
13
SHFT ENT
6 MLR RST 3
l
l
14
l
SHFT E
4
N
TMR
D
3
ENT A
SHFT S SHFT B R D ENT
$
RST
SHFT I
1
C
ORN
A ENT
3
B
STR 8 2 0
GX
OUT
F
5
ENT
C
$ SHFT I C B ENT
STR 8 2 1
GX
OUT
B
1
A
0
ENT
D
SHFT R T ENT
ORN MLR
created at level 1. Master Line Sets and Master Line Resets can
3 be used to nest power rails up to seven levels deep.
enable (or disable) sections of the RLL program. This provides program control flexibility.
10 The following example shows how the MLS and MLR instructions operate by creating a sub
power rail for control logic.
11
12 DirectSOFT 5
Direct SOFT32
X0 K1
When contact X0 is ON, logic under the first MLS
13 MLS will be executed.
X1 Y7
14 OUT
X2 K2
A MLS
When contact X0 and X2 are ON, logic under the
second MLS will be executed.
X3 Y10
B OUT
K1
C MLR
The MLR instructions note the end of the Master
K0 Control area.
D MLR
X10 Y11
OUT
MLS/MLR Example
In the following MLS/MLR example logic between the first MLS K1 (A) and MLR K0 (B) 1
will function only if input X0 is on. The logic between the MLS K2 (C) and MLR K1 (D)
will function only if input X10 and X0 is on. The last rung is not controlled by either of the
MLS coils.
2
DirectSOFT 5
DirectSOFT32
X0
Handheld Programmer Keystrokes 3
K1
A $ A ENT
MLS
Y
STR
B
0
ENT
4
X1 C0 MLS 1
OUT $
STR
B
1
ENT 5
X2 GX C A
C1
OUT
$
OUT
C
SHFT
ENT
2 0
ENT
6
STR 2
X3 Y0
OUT
GX
OUT
SHFT C
2
B
1
ENT 7
$ D
X10 K2
C
GX
STR
A
3
ENT
8
MLS ENT
OUT 0
X5 Y1
$
STR
B
1
A
0
ENT 9
OUT Y C
X4 Y2 $
MLS
F
2
ENT
10
ENT
STR 5
OUT
K1
GX
OUT
B
1
ENT 11
D $ E
MLR
GX
STR
C
4
ENT
12
X5 C2 ENT
OUT 2
OUT T
MLR
B
1
ENT
13
X6 Y3
OUT
$
GX
STR
F
5
C
ENT
C
14
SHFT ENT
OUT 2 2
K0
MLR
B
$
STR
G
6
ENT
A
X7 Y4
OUT
GX
OUT
D
3
ENT
B
T A ENT
MLR 0
$
STR
H
7
ENT
C
GX
OUT
E
4
C
2
ENT
D
1 Interrupt Instructions
Interrupt (INT)
2 The Interrupt instruction allows a section of ladder INT O aaa
DS5 Used
logic to be placed below the main body of the program
3 HPP Used
and executed only when needed. High-Speed I/O
Modes 10, 20, and 40 can generate an interrupt. With INT 1
4 Mode 40, you may select an external interrupt (input
X0), or a time-based interrupt (5999 mS).
Typically, interrupts are used in an application when a fast response to an input is needed or a
5 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
6 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
7 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 DL05, only one hardware interrupt is available.
8 Operand Data Type DL05 Range
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . O 0, 1
9
Interrupt Return (IRT)
10 DS5
An Interrupt Return is normally executed as the last instruction in the interrupt routine. It
Used
returns the CPU to the point in the main program from which
HPP Used
it was called. The Interrupt Return is a stand-alone instruction
11 (no input contact on the rung). IRT
D
SP
STRN
A
0
ENT
K E A
9
OUT Copy the value in the lower SHFT SHFT ENT
16 bits of the accumulator to ANDST 3 JMP 4 0
LD
V7633
V7633
I
2
S
ENT
I
13
SHFT ENT
3 8 RST 8
l
l
l
l
l
14
l
SHFT E N D ENT
END
SHFT I
4
8
N
TMR
TMR
T
MLR
3
A
0
ENT
A
INT O0
$ I B
X1 Y5
X
STR
SHFT
SHFT I
8
F
1
ENT
ENT
B
SETI SET 8 5
X3 Y7
SETI
$
STR
SHFT I
8
D
3
ENT
C
X SHFT I H ENT
SET 8 7
IRT SHFT I
8
R
ORN
T
MLR
ENT D
5 SP0
LD
K40
Load the constant value
(K40) into the lower 16 bits
of the accumulator
$
STR
B
1
ENT
6 OUT
V7633
Copy the value in the lower
16 bits of the accumulator to
V7633
GX
OUT
ANDST
SHFT
3
V
AND
H
7
G
JMP
6
D
4
3
D
0
3
ENT
7 LD
K104
Load the constant value
(K10) into the lower 16 bits
GX
OUT
ANDST
SHFT
3
V
AND
H
7
G
JMP
6
D
1
3
E
0
4
ENT
4
of the accumulator
$ E
8
ENT
V7634 V7634
SP E
9 X4
ENI
STRN
SHFT D
3
I
4
8
S
ENT
RST
I
8
ENT
10 X4
DISI
SHFT E N D ENT
4 TMR 3
11 END
SHFT I
8
N
TMR
T
MLR
A
0
ENT
$ SHFT I C ENT
STR 8 2
12 INT O0
X
SET
SHFT I
8
F
5
ENT
SP SHFT I D ENT
X2
13 Y5
SETI
STRN
X
SET
SHFT I
8
8
A
3
0
H
7
ENT
SHFT I R T ENT
X3 Y0 Y7
14 RSTI
8 ORN MLR
A IRT
Message Instructions 1
Fault (FAULT)
DS5 Used
The Fault instruction is used to display a message on the handheld 2
programmer or in the DirectSOFT 5 status bar. The message has a FAULT
HPP Used
maximum of 23 characters and can be either V-memory data, A aaa 3
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)
4
instructions, specify the constant (K) value for the corresponding data label area.
5
Operand Data Type DL05 Range
....................................A
V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
aaa
See memory map
6
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 1-FFFF
7
Discrete Bit Flags
SP50 On when the FAULT instruction is executed
Description
8
Fault Example 9
In the following example when X1 is on, the message
DS5
HPP
Used
Used
SW 146 will display on the handheld programmer. FAULT :
10
The NCONs use the HEX ASCII equivalent of the *SW 146
X1
Handheld Programmer Keystrokes
13
FAULT $ B ENT
K1 STR 1
SHFT F
5
A
0
U
ISG
L
ANDST
T
MLR
B
1
ENT 14
DLBL
END
E N D
A
K1 SHFT ENT
4 TMR 3
ACON
A SW
SHFT D
3
L
ANDST
B
1
L
ANDST
B
1
ENT B
SHFT A C O N S W ENT
NCON
K 2031
SHFT N
TMR
0
C
2
2
INST#
O
INST#
N
TMR
TMR
C
RST
2
ANDN
A
0
D
3
B
1
ENT
C
N C O N D E D G
SHFT
TMR 2 INST# TMR 3 4 3 6
ENT
D
NCON
K 3436
A
B
C
D
SHFT D
4
L
TMR
B
3
L B ENT
14
3 ANDST 1 ANDST 1
SHFT A
0
C
2
O
INST#
N
TMR
S
RST
W
ANDN
ENT A
N C O N C A D B
SHFT
SHFT N
TMR
C
2 INST#
O N
TMR
D
2
E
0
D
3
G
1
ENT
ENT
B
TMR 2 INST# TMR 3 4 3 6
C
D
Port 2 on the DL05 has standard RS232 levels, and should work with most printer serial
input connections. 1
Text element this is used for printing character strings. The character strings are defined as
the character (more than 0) ranged by the double quotation marks. Two hex numbers
preceded by the dollar sign means an 8-bit ASCII character code. Also, two characters
2
preceded by the dollar sign is interpreted according to the following table:
3
# Character code Description
1
2
$$
$
Dollar sign ($)
Double quotation ()
4
3 $L or $l Line feed (LF)
4 $N or $n Carriage return line feed (CRLF) 5
5 $P or $p Form feed
6
7
$R or $r
$T or $t
Carriage return (CR)
Tab
6
The following examples show various syntax conventions and the length of the output to the 7
printer.
Example: 8
Length 0 without character
A Length 1 with character A 9
Length 1 with blank
$ Length 1 with double quotation mark 10
$R$L Length 2 with one CR and one LF
$0D$0A Length 2 with one CR and one LF 11
$$ Length 1 with one $ mark
In printing an ordinary line of text, you will need to include double quotation marks before
12
and after the text string. Error code 499 will occur in the CPU when the print instruction
contains invalid text or no quotations. It is important to test your PRINT instruction data 13
during the application development.
The following example prints the message to port 2. We use a PD contact, which causes the 14
message instruction to be active for just one scan. Note the $N at the end of the message,
which produces a carriage return / line feed on the printer. This prepares the printer to print
the next line, starting from the left margin.
A
X1
B
PRINT K2 Print the message to Port 2 when
Hello, this is a PLC message.$N X1 makes an off-to-on transition. C
D
V-memory element - this is used for printing V-memory contents in the integer format or
1 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.
2 NOTE: There must be a space entered before and after the V-memory address to separate it from the
text string. Failure to do this will result in an error code 499.
3 # Character code Description
1 none 16-bit binary (decimal number)
4 2 :B 4 digit BCD
3 :D 32-bit binary (decimal number)
5 4 :DB 8 digit BCD
Example:
6 V2000 Print binary data in V2000 for decimal number
V2000 : B Print BCD data in V2000
7 V2000 : D Print binary number in V2000 and V2001 for decimal number
8 V2000 : D B Print BCD data in V2000 and V2001
Example: The following example prints a message containing text and a variable. The reactor
9 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.
10 X1 PRINT K2 Print the message to Port 2
Reactor temperature = V2000 deg. $N when X1 makes an off-to-on
11 Message will read:
transition.
represents a space
C
D
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 1
the V-memory number or relay number. The output type is described as shown in the table
below. 2
# Data format Description
1 none Print 1 for an ON state, and 0 for an
OFF state
3
2 : BOOL Print TRUE for an ON state, and
3 : ONOFF
FALSE for an OFF state
Print ON for an ON state, and
4
OFF for an OFF state
Example:
5
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format
6
C100 : BOOL Prints the status of C100 in TRUE/FALSE format 7
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 8
The maximum numbers of characters you can print is 128. The number of characters for
each element is listed in the table below: 9
Element Type Maximum Characters
Text, 1 character 1 10
16 bit binary 6
32 bit binary
4 digit BCD
11
4
11
8 digit BCD 8
Floating point (real number) 12 12
Floating point (real with exponent) 12
V-memory/text
Bit (1/0 format)
2
1
13
Bit (TRUE/FALSE format) 5
Bit (ON/OFF format) 3 14
The handheld programmers mnemonic is PRINT, followed by the DEF field.
Special relay flags SP116 and SP117 indicate the status of the DL05 CPU ports (busy, or
A
communications error). See the appendix on special relays for a description.
B
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.
C
D
13 In the following example when X1 is ON, the RD instruction will read six bytes of data from
a intelligent module in base 1, slot 2 starting at address 0 in the intelligent module and copy
the information into V-memory loacations V1400-V1402.
14 CPU Intelligent Module
Direct SOFT 5
Data
A X1 LD
The constant value K0102
}
specifies the base number V1400 3 4 1 2 12 Address 0
{
K0102 (01) and the base slot V1401 7 8 5 6 34 Address 1
number (02).
V1402 0 1 9 0 56 Address 2
B LD
K6
The constant value K6
specifies the number of
bytes to be read.
V1403
V1404
X
X
X
X
X
X
X
X
78
90
01
Address 3
Address 4
Address 5
C LD
K0
specifies the starting address
in the intelligent module.
Handheld Programmer Keystrokes
$
STR
B
1
ENT
D V1400
in the CPU where the specified
data will be stored.
SHFT
SHFT
ANDST
L
ANDST
D
3
3
PREV
PREV G
0
6
ENT
1 0 2
ENT
L D A
SHFT PREV ENT
ANDST 3 0
R D B E A A
SHFT ENT
ORN 3 1 4 0 0
{
The constant value K0102
X1 LD
K0102
specifies the base number
(01) and the base slot
number (02).
V1400
V1401
V1402
3
7
0
4
8
1
1
5
9
2
6
0 }
34
56
78
Address 1
Address 2
Address 3
A
The constant value K6 90 Address 4
V1403 X X X X
LD
K6
specifies the number of
bytes to be written. V1404 X X X X
01 Address 5
B
LD The constant value K0
Handheld Programmer Keystrokes
K0
specifies the starting address
in the intelligent module. $
STR
B
1
ENT C
V1400 is the starting location L D A B A C
WT SHFT PREV ENT
in the CPU where the specified ANDST 3 0 1 0 2
V1400 data will be written from.
SHFT L
ANDST
D
3
PREV G
6
ENT D
L D A
SHFT PREV ENT
ANDST 3 0
W T B E A A
SHFT ENT
ANDN MLR 1 4 0 0
1 Network Instructions
Read from Network (RX)
2 The Read from Network instruction causes the master device on a
DS5 Used
network to read a block of data from a slave device on the same
3 HPP Used
network. The function parameters are loaded into the accumulator
RX
A aaa
and the first and second level of the stack. Listed below are the
4 program steps necessary to execute the Read from Network
function.
Step 1: Load the slave address (090 BCD) into the low byte and F2 into the high byte
5 of the accumulator (the next two instructions push this word down to the second layer of the
stack).
6 Step 2: Load the number of bytes to be transferred into the accumulator, 2 - 128 bytes are
allowed, (the next instruction pushes this word onto the top of the stack).
7 Step 3: Load the starting Master CPU address into the accumulator. This is the memory
location where the data read from the slave will be put. This parameter requires a HEX value.
8 Step 4: Insert the RX instruction which specifies the starting V-memory location (Aaaa)
where the data will be read from in the slave.
9 Helpful Hint: For parameters that require HEX values, the LDA instruction can be used to
convert an octal address to the HEX equivalent and load the value into the accumulator.
10 Operand Data Type DL05 Range
A aaa
11 V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V All (See page 328)
Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P All V-memory. (See page 328)
12 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
0377
0377
13 Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S
0777
0377
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T 0177
14 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP
0177
0777
B
C
D
In the following example, when X1 is on and the port busy relay SP116 (see special relays) is
not on, the RX instruction will access port 2 operating as a master. Ten consecutive bytes of 1
data (V2000 V2004) will be read from a CPU at station address 5 and copied into
V-memory locations V2300V2304 in the CPU with the master port.
DirectSOFT 5
2
DirectSOFT
X1 SP116 LD
KF205
3
Master Slave
The constant value KF205
specifies the port number (2)
and the slave address (5)
CPU CPU 4
LD
K10
V2277 X X X X X X X X V1777
5
The constant value K10
specifies the number of
bytes to be read (2-128
V2300
V2301
3
8
4
5
5
3
7
4
3
8
4
5
5
3
7
4
V2000
V2001
6
bytes allowed) V2302 1 9 3 6 1 9 3 6 V2002
LDA V2303 9
1
5
4
7
2
1
3
9
1
5
4
7
2
1
3
V2003 7
O 2300 V2304 V2004
RX
10
V2000
HandheldProgrammer Keystrokes
12
$
STR
B
1
ENT 13
W SHFT SP B B G ENT
ANDN
SHFT L D
STRN
SHFT
1
K
1 6
SHFT L
ANDST
D
3
SHFT K
JMP
B
1
A
0
ENT A
SHFT L D A C D A A ENT
SHFT
ANDST
R X
3 0
C A
2
A
3
A
0
ENT
0
B
ORN SET 2 0 0 0
C
D
In the following example when X1 is on and the module busy relay SP116 (see special relays)
is not on, the WX instruction will access port 2 operating as a master. Ten consecutive bytes 1
of data is read from the Master CPU and copied to V-memory locations V2000V2004 in
the slave CPU at station address 5.
DirectSOFT
DirectSOFT5
2
X1 SP116 LD
KF205
3
Master Slave
The constant value KF205
specifies the port number (2)
and the slave address (5)
CPU CPU 4
LD
K10
V2277 X X X X X X X X V1777
5
The constant value K10 V2300 3 4 5 7 3 4 5 7 V2000
specifies the number of
bytes to be written (2-128 V2301 8 5 3 4 8 5 3 4 V2001 6
bytes allowed) V2302 1 9 3 6 1 9 3 6 V2002
LDA
O 2300
V2303
V2304
9
1
5
4
7
2
1
3
9
1
5
4
7
2
1
3
V2003
V2004
7
V2305 X X X X X X X X V2005
Octal address 2300 is
converted to 4C0 HEX and
. 8
loaded into the accumulator
V2300 is the starting
location for the Master CPU
where the specified data will
9
be read from.
WX
V2000
10
V2000 is the starting
location in the for the Slave
CPU where the specified
11
data will be written to
HandheldProgrammer Keystrokes
12
$
STR
B
1
ENT
13
W SHFT SP B C E ENT
ANDN STRN 1 1 6
SHFT L
ANDST
D
3
SHFT K
JMP
SHFT F SHFT
C
2
A
0
F
5
ENT
14
5
SHFT L
ANDST
D
3
SHFT K
JMP
B
1
A
0
ENT A
SHFT L D A C D A A ENT
ANDST 3 0 2 3 0 0
SHFT W X C A A A ENT
B
ANDN SET 2 0 0 0
C
D
Math IBoxes
14 Instruction Ibox # Page
Math - BCD (MATHBCD) IB-521 5-152
A Math - Binary (MATHBIN)
Square BCD (SQUARE)
IB-501
IB-523
5-154
5-156
Square Binary (SQUAREB) IB-503 5-157
B Sum BCD Numbers (SUMBCD) IB-522 5-158
Sum Binary Numbers (SUMBIN) IB-502 5-159
C
D
Communication IBoxes
1
Instruction Ibox # Page
ECOM100 Configuration (ECOM100) IB-710 5-160
2
ECOM100 Disable DHCP (ECDHCPD) IB-736 5-162
ECOM100 Enable DHCP (ECDHCPE) IB-735 5-164 3
ECOM100 Query DHCP Setting (ECDHCPQ) IB-734 5-166
ECOM100 Send E-mail (ECEMAIL)
ECOM100 Restore Default E-mail Setup (ECEMRDS)
IB-711
IB-713
5-168
5-171
4
ECOM100 E-mail Setup (ECEMSUP) IB-712 5-174
ECOM100 IP Setup (ECIPSUP) IB-717 5-178 5
ECOM100 Read Description (ECRDDES) IB-726 5-180
ECOM100 Read Gateway Address (ECRDGWA)
ECOM100 Read IP Address (ECRDIP)
IB-730
IB-722
5-182
5-184
6
ECOM100 Read Module ID (ECRDMID) IB-720 5-186
ECOM100 Read Module Name (ECRDNAM) IB-724 5-188 7
ECOM100 Read Subnet Mask (ECRDSNM) IB-732 5-190
ECOM100 Write Description (ECWRDES)
ECOM100 Write Gateway Address (ECWRGWA)
IB-727
IB-731
5-192
5-194
8
ECOM100 Write IP Address (ECWRIP) IB-723 5-196
ECOM100 Write Module ID (ECWRMID) IB-721 5-198 9
ECOM100 Write Name (ECWRNAM) IB-725 5-200
ECOM100 Write Subnet Mask (ECWRSNM)
ECOM100 RX Network Read (ECRX)
IB-733
IB-740
5-202
5-204
10
ECOM100 WX Network Write(ECWX) IB-741 5-207
NETCFG Network Configuration (NETCFG) IB-700 5-210 11
Network RX Read (NETRX) IB-701 5-212
Network WX Write (NETWX) IB-702 5-215
12
Counter I/O IBoxes (Work with H0-CTRIO and H0-CTRIO2)
Instruction Ibox # Page 13
CTRIO Configuration (CTRIO) IB-1000 5-218
CTRIO Add Entry to End of Preset Table (CTRADPT)
CTRIO Clear Preset Table (CTRCLRT)
IB-1005
IB-1007
5-220
5-223
14
CTRIO Edit Preset Table Entry (CTREDPT) IB-1003 5-226
CTRIO Edit Preset Table Entry and Reload (CTREDRL) IB-1002 5-230 A
CTRIO Initialize Preset Table (CTRINPT) IB-1004 5-234
CTRIO Initialize Preset Table (CTRINTR)
CTRIO Load Profile (CTRLDPR)
IB-1010
IB-1001
5-238
5-242
B
CTRIO Read Error (CTRRDER) IB-1014 5-244
CTRIO Run to Limit Mode (CTRRTLM) IB-1011 5-246 C
CTRIO Run to Position Mode (CTRRTPM) IB-1012 5-249
CTRIO Velocity Mode (CTRVELO)
CTRIO Write File to ROM (CTRWFTR)
IB-1013
IB-1006
5-251
5-254
D
9 ANLGCMB Parameters
Base # (K0-Local): must be 0 for DL05 PLC
10 Slot #: specifies the single PLC option slot that is occupied by the module
Number of Input Channels: specifies the number of analog input channels to scan
11 Input Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the
binary format may be used for displaying data on some OI panels
12 Input Data Address: specifies the starting V-memory location that will be used to store the analog
input data
13 Number of Output Channels: specifies the number of analog output channels that will be used
Output Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or
14 Binary)
Output Data Address: specifies the starting V-memory location that will be used to source the
analog output data
A
B Parameter
Base # (K0-Local) . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0 (local base only)
Slot # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K1
C Number of Input Channels . . . . . . . . . . . . . . . . K K1-8
Input Data Format (0-BCD 1-BIN) . . . . . . . . . . . K BCD: K0; Binary: K1
D Input Data Address . . . . . . . . . . . . . . . . . . . . . . V
Number of Output Channels . . . . . . . . . . . . . . . K
See DL05 V-memory map - Data Words
K1-8
Output Data Format (0-BCD 1-BIN) . . . . . . . . . K BCD: K0; Binary: K1
Output Data Address . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
ANLGCMB Example
In the following example, the ANLGCMB instruction is used to setup the pointer method 1
for an analog I/O combination module that is installed in option slot 2. Four input channels
are enabled and the analog data will be written to V2000 - V2003 in BCD format. Two
output channels are enabled and the analog values will be read from V2100 - V2101 in BCD
2
format.
3
4
5
No permissive contact or input logic is
used with this instruction 6
7
8
9
10
11
12
13
14
A
B
C
D
7 ANLGIN Parameters
Base # (K0-Local): must be 0 for DL05 PLC
8 Slot #: specifies the single PLC option slot that is occupied by the module
Number of Input Channels: specifies the number of input channels to scan
9 Input Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the
binary format may be used for displaying data on some OI panels
10 Input Data Address: specifies the starting V-memory location that will be used to store the analog
input data
14
A
B
C
D
ANLGIN Example
In the following example, the ANLGIN instruction is used to setup the pointer method for 1
an analog input module that is installed in option slot 1. Eight input channels are enabled
and the analog data will be written to V2000 - V2007 in BCD format. 2
3
4
No permissive contact or input logic is
5
used with this instruction
6
7
8
9
10
11
12
13
14
A
B
C
D
ANLGOUT Example
In the following example, the ANLGOUT instruction is used to setup the pointer method 1
for an analog output module that is installed in option slot 3. Two output channels are
enabled and the analog data will be read from V2100 - V2101 in BCD format. 2
3
4
5
No permissive contact or input logic is
used with this instruction
6
7
8
9
10
11
12
13
14
A
B
C
D
11 High Engineering . . . . . . . . . . . . . . . . . . . . . . . . K
Low Engineering . . . . . . . . . . . . . . . . . . . . . . . . K
K0-9999
K0-9999
Engineering (BCD). . . . . . . . . . . . . . . . . . . . . . V,P See DL05 V-memory map - Data Words
12
13
14
A
B
C
D
ANSCL Example
In the following example, the ANSCL instruction is used to scale a raw value (0-4095 BCD) 1
that is in V2000. The engineering scaling range is set 0-100 (low engineering value - high
engineering value). The scaled value will be placed in V2100 in BCD format. 2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
6
7 ANSCLB Parameters
Raw (12 bit binary): specifies the V-memory location of the unipolar unsigned raw decimal
8 unscaled value (12 bit binary = 0-4095 decimal)
High Engineering: specifies the high engineering value when the raw input is 4095 decimal
9 Low Engineering: specifies the low engineering value when the raw input is 0 decimal
Engineering (binary): specifies the V-memory location where the scaled engineering decimal value
10 will be placed
11
12 Parameter DL05 Range
Raw (12 bit binary) . . . . . . . . . . . . . . . . . . . . V,P See DL05 V-memory map - Data Words
13 High Engineering . . . . . . . . . . . . . . . . . . . . . . . . K K0-65535
Low Engineering . . . . . . . . . . . . . . . . . . . . . . . . K K0-65535
14 Engineering (binary) . . . . . . . . . . . . . . . . . . . . V,P See DL05 V-memory map - Data Words
A
B
C
D
ANSCLB Example
In the following example, the ANSCLB instruction is used to scale a raw value (0-4095 1
binary) that is in V2000. The engineering scaling range is set 0-1000 (low engineering value -
high engineering value). The scaled value will be placed in V2100 in binary format. 2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
9 FILTER Parameters
Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction
10 Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed
Raw Data (BCD): specifies the V-memory location of the raw unfiltered BCD value
11 Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase
the smoothing effect of the filter. A value of 1 results with no filtering.
12 Filtered Value (BCD): specifies the V-memory location where the filtered BCD value will be placed
B
C
D
FILTER Example
In the following example, the Filter instruction is used to filter a BCD value that is in V2000. 1
Timer(T0) is set to 0.5 sec, the rate at which the filter calculation will be performed. The
filter constant is set to 2. A larger value will increase the smoothing effect of the filter. A value
of 1 results with no filtering. The filtered value will be placed in V2100.
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
10 FILTERB Parameters
Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction
11 Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed
Raw Data (Binary): specifies the V-memory location of the raw unfiltered binary (decimal) value
12 Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase
the smoothing effect of the filter. A value of 1 results with no filtering.
13 Filtered Value (Binary): specifies the V-memory location where the filtered binary (decimal) value
will be placed
C
D
FILTERB Example
In the following example, the FILTERB instruction is used to filter a binary value that is in 1
V2000. Timer(T1) is set to 0.5 sec, the rate at which the filter calculation will be performed.
The filter constant is set to 3. A larger value will increase the smoothing effect of the filter. A
value of 1 results with no filtering. The filtered value will be placed in V2100.
2
3
4
SP1 5
6
7
8
9
10
11
12
13
14
A
B
C
D
10 HILOAL Parameters
Monitoring Value (BCD): specifies the V-memory location of the BCD value to be monitored
11 High-High Limit: V-memory location or constant specifies the high-high alarm limit
High-High Alarm: On when the high-high limit is reached
12 High Limit: V-memory location or constant specifies the high alarm limit
High Alarm: On when the high limit is reached
13 Low Limit: V-memory location or constant specifies the low alarm limit
Low Alarm: On when the low limit is reached
14 Low-Low Limit: V-memory location or constant specifies the low-low alarm limit
Low-Low Alarm: On when the low-low limit is reached
A Parameter DL05 Range
B Monitoring Value (BCD) . . . . . . . . . . . . . . . . . . V
High-High Limit . . . . . . . . . . . . . . . . . . . . . . . V, K
See DL05 V-memory map - Data Words
K0-9999; or see DL05 V-memory map - Data Words
High-High Alarm . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
C High Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K K0-9999; or see DL05 V-memory map - Data Words
High Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
D Low Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K
Low Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY,B
K0-9999; or see DL05 V-memory map - Data Words
See DL05 V-memory map
Low-Low Limit . . . . . . . . . . . . . . . . . . . . . . . V, K K0-9999; or see DL05 V-memory map - Data Words
Low-Low Alarm. . . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
HILOAL Example
In the following example, the HILOAL instruction is used to monitor a BCD value that is in 1
V2000. If the value in V2000 meets/exceeds the high limit of K900, C101 will turn on. If the
value continues to increase to meet/exceed the high-high limit, C100 will turn on. Both bits
would be on in this case. The high and high-high limits and alarms can be set to the same
2
value if one high limit or alarm is desired to be used.
If the value in V2000 meets or falls below the low limit of K200, C102 will turn on. If the
3
value continues to decrease to meet or fall below the low-low limit of K100, C103 will turn
on. Both bits would be on in this case. The low and low-low limits and alarms can be set to 4
the same value if one low limit or alarm is desired to be used.
5
6
SP1
7
8
9
10
11
12
13
14
A
B
C
D
10 HILOALB Parameters
Monitoring Value (Binary): specifies the V-memory location of the Binary value to be monitored
11 High-High Limit: V-memory location or constant specifies the high-high alarm limit
High-High Alarm: On when the high-high limit is reached
12 High Limit: V-memory location or constant specifies the high alarm limit
High Alarm: On when the high limit is reached
13 Low Limit: V-memory location or constant specifies the low alarm limit
Low Alarm: On when the low limit is reached
14 Low-Low Limit: V-memory location or constant specifies the low-low alarm limit
Low-Low Alarm: On when the low-low limit is reached
A
Parameter DL05 Range
B Monitoring Value (Binary) . . . . . . . . . . . . . . . . V
High-High Limit . . . . . . . . . . . . . . . . . . . . . . . V, K
See DL05 V-memory map - Data Words
K0-65535; or see DL05 V-memory map - Data Words
High-High Alarm . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
C High Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K K0-65535; or see DL05 V-memory map - Data Words
High Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
D Low Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K
Low Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY,B
K0-65535; or see DL05 V-memory map - Data Words
See DL05 V-memory map
Low-Low Limit . . . . . . . . . . . . . . . . . . . . . . . V, K K0-65535; or see DL05 V-memory map - Data Words
Low-Low Alarm. . . . . . . . . . . . . X, Y, C, GX,GY, B See DL05 V-memory map
HILOALB Example
In the following example, the HILOALB instruction is used to monitor a binary value that is
1
in V2000. If the value in V2000 meets/exceeds the high limit of the binary value in V2011,
C101 will turn on. If the value continues to increase to meet/exceed the high-high limit value 2
in V2010, C100 will turn on. Both bits would be on in this case. The high and high-high
limits and alarms can be set to the same V-memory location/value if one high limit or alarm
is desired to be used.
3
If the value in V2000 meets or falls below the low limit of the binary value in V2012, C102
will turn on. If the value continues to decrease to meet or fall below the low-low limit in 4
V2013, C103 will turn on. Both bits would be on in this case. The low and low-low limits
and alarms can be set to the same V-memory location/value if one low limit or alarm is 5
desired to be used.
6
SP1
7
8
9
10
11
12
13
14
A
B
C
D
OFFDTMR Example
In the following example, the OFFDTMR instruction is used to delay the turning off of 1
output C20. Timer 2 (T2) is set to 5 seconds, the off-delay period.
When C100 turns on, C20 turns on and will remain on while C100 is on. When C100 turns 2
off, C20 will remain for the specified Off Delay Time (5s), and then turn off.
3
4
5
6
7
8
9
10
Example timing diagram
11
C100
12
5 sec 5 sec
13
C20
14
A
B
C
D
11
12
13
14
A
B
C
D
ONDTMR Example
In the following example, the ONDTMR instruction is used to delay the turning on of 1
output C21. Timer 1 (T1) is set to 2 seconds, the on-delay period.
When C101 turns on, C21 is delayed turning on by 2 seconds. When C101 turns off, C21 2
turns off imediately.
3
4
5
6
7
8
9
10
11
Example timing diagram
12
C101 13
2 sec 2 sec
C21
14
A
B
C
D
3 ONESHOT Parameters
Discrete Output: specifies the output that
4 will be on for one scan
9
10
11
12 Example timing diagram
13 C0
14 Scan time
C100
A
B
C
D
MOVEW Parameters
3 From WORD: specifies the word that will be
moved to another location
4 To WORD: specifies the location where the
From WORD will be move to
5
6 Parameter
From WORD . . . . . . . . . . . . . . . . . . . . . . . . V,P,K
DL05 Range
K0-FFFF; See DL05 V-memory map - Data Words
8
MOVEW Example
9 In the following example, the MOVEW instruction is used to move 16-bits of data from
V2000 to V3000 when C100 turns on.
10
11
12
13
14
A
B
C
D
B
C
D
MATHBCD Example
In the following example, the MATHBCD instruction is used to calculate the math 1
expression which multiplies the BCD value in V1200 by 1000 then divides by 4095 and
loads the resulting value in V2000. 2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
12 MATHBIN Parameters
WORD Result: specifies the location where the binary result of the mathematical expression will be
13 placed (result must fit into 16 bit single V-memory location)
Expression: specifies the mathematical expression to be executed and the result is stored in specified
14 WORD Result. Each V-memory location used in the expression must be in binary format.
C
D
MATHBIN Example
In the following example, the MATHBIN instruction is used to calculate the math expression 1
which multiplies the Binary value in V1200 by 1000 then divides by 4095 and loads the
resulting value in V2000. 2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
SQUARE Parameters
3 Value (WORD BCD): specifies the BCD Word
or constant that will be squared
4 Result (DWORD BCD): specifies the location
where the squared DWORD BCD value will be
placed
5
Parameter DL05 Range
6 Value (WORD BCD) . . . . . . . . . . . . . . . . . . V,P,K K0-9999 ; See DL05 V-memory map - Data Words
Result (DWORD BCD) . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
7
8
SQUARE Example
9 In the following example, the SQUARE instruction is used to square the 4-digit BCD value
in V2000 and store the 8-digit double word BCD result in V3000 and V3001
10
11
12
13
14
A
B
C
D
6 SUMBCD Parameters
Start Address: specifies the starting address of a block of V-memory location values to be added
7 together (BCD)
End Addr (inclusive): specifies the ending address of a block of V-memory location values to be
8 added together (BCD)
Result (DWORD BCD): specifies the location where the sum of the block of V-memory BCD
values will be placed
9
Parameter DL05 Range
10 Start Address . . . . . . . . . . . . . . . . . . . . . . . . . . V
End Address (inclusive) . . . . . . . . . . . . . . . . . . V
See DL05 V-memory map - Data Words
See DL05 V-memory map - Data Words
Result (DWORD BCD) . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
11
12
SUMBCD Example
13 In the following example, the SUMBCD instruction is used to total the sum of all BCD
values in words V2000 thru V2007 and store the resulting 8-digit double word BCD value in
14 V3000 and V3001.
A
B
C
D
A Parameter
ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K1-4
B Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
C Msg Buffer (65 words used) . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
ECOM100 Example
The ECOM100 Config IBox coordinates all of the interaction with other ECOM100 based 1
IBoxes (ECxxxx). You must have an ECOM100 Config IBox for each ECOM100 module in
your system. Configuration IBoxes must be at the top of your program and must execute
every scan.
2
This IBox defines ECOM100# K0 to be in slot 3. Any ECOM100 IBoxes that need to
reference this specific module (such as ECEMAIL, ECRX, ...) would enter K0 for their
3
ECOM100# parameter.
The Status register is for reporting any completion or error information to other ECOM100
4
IBoxes. This V-memory register must not be used anywhere else in the entire program.
The Workspace register is used to maintain state information about the ECOM100, along 5
with proper sharing and interlocking with the other ECOM100 IBoxes in the program. This
V-memory register must not be used anywhere else in the entire program. 6
The Message Buffer of 65 words (130 bytes) is a common pool of memory that is used by
other ECOM100 IBoxes (such as ECEMAIL). This way, you can have a bunch of
ECEMAIL IBoxes, but only need 1 common buffer for generating and sending each EMail.
7
These V-memory registers must not be used anywhere else in your entire program.
8
9
10
11
12
13
14
A
B
C
D
ECDHCPD Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, disable DHCP in the ECOM100. DHCP is the same protocol 8
used by PCs for using a DHCP Server to automatically assign the ECOM100's IP Address,
Gateway Address, and Subnet Mask. Typically disabling DHCP is done by assigning a hard- 9
coded IP Address either in NetEdit or using one of the ECOM100 IP Setup IBoxes, but this
IBox allows you to disable DHCP in the ECOM100 using your ladder program. The
ECDHCPD is leading edge triggered, not power-flow driven (similar to a counter input leg).
10
The command to disable DHCP will be sent to the ECOM100 whenever the power flow
into the IBox goes from OFF to ON. If successful, turn on C100. If there is a failure, turn on 11
C101. If it fails, you can look at V2000 for the specific error code.
12
13
14
A
B
C
D
ECDHCPE Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
8
Rung 2: On the 2nd scan, enable DHCP in the ECOM100. DHCP is the same protocol
used by PCs for using a DHCP Server to automatically assign the ECOM100's IP Address, 9
Gateway Address, and Subnet Mask. Typically this is done using NetEdit, but this IBox
allows you to enable DHCP in the ECOM100 using your ladder program. The ECDHCPE
is leading edge triggered, not power-flow driven (similar to a counter input leg). The
10
commands to enable DHCP will be sent to the ECOM100 whenever the power flow into the
IBox goes from OFF to ON. The ECDHCPE does more than just set the bit to enable 11
DHCP in the ECOM100, but it then polls the ECOM100 once every second to see if the
ECOM100 has found a DHCP server and has a valid IP Address. Therefore, a timeout
parameter is needed in case the ECOM100 cannot find a DHCP server. If a timeout does
12
occur, the Error bit will turn on and the error code will be 1005 decimal. The Success bit will
turn on only if the ECOM100 finds a DHCP Server and is assigned a valid IP Address. If 13
successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at V2000
for the specific error code. 14
A
B
C
D
7 ECDHCPQ Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
8 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
10 Error: specifies a bit that will turn on if the instruction is not successfully completed
DHCP Enabled: specifies a bit that will turn on if the ECOM100s DHCP is enabled or remain off
if disabled - after instruction query, be sure to check the state of the Success/Error bit state along
11 with DHCP Enabled bit state to confirm a successful module query
14 Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
DHCP Enabled . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map
See DL05 V-memory map
A
B
C
D
ECDHCPQ Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
8
Rung 2: On the 2nd scan, read whether DHCP is enabled or disabled in the ECOM100 and
store it in C5. DHCP is the same protocol used by PCs for using a DHCP Server to 9
automatically assign the ECOM100's IP Address, Gateway Address, and Subnet Mask. The
ECDHCPQ is leading edge triggered, not power-flow driven (similar to a counter input leg).
The command to read (Query) whether DHCP is enabled or not will be sent to the
10
ECOM100 whenever the power flow into the IBox goes from OFF to ON. If successful, turn
on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D
B Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
C Error Code: specifies the location where the Error Code will be written
To: specifies an E-mail address that the message will be sent to
Parameter
ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
1
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map - Data Words
See DL05 V-memory map
2
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
To: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
See DL05 V-memory map
Text
3
Subject:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Body:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Text
See PRINT and VPRINT instructions
4
ECEMAIL Example
5
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as 6
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
is used as a global result status register for the other ECxxxx IBoxes using this specific
7
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer 8
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
9
10
11
12
13
(example continued on next page) 14
A
B
C
D
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ECEMRDS Example
1 Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
2 ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
is used as a global result status register for the other ECxxxx IBoxes using this specific
3 ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
4 available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
5
6
7
8 Rung 2: Whenever an EStop is pushed, ensure that president of the company gets copies of
all EMails being sent.
9 The ECOM100 EMail Setup IBox allows you to set/change the SMTP EMail settings stored
in the ECOM100.
10
11
12
13
14
A
B
C
D
ECEMRDS Example
Rung 3: Once the EStop is pulled out, take the president off the cc: list by restoring the 1
default EMail setup in the ECOM100.
The ECEMRDS is leading edge triggered, not power-flow driven (similar to a counter input 2
leg). The ROM based EMail configuration stored in the ECOM100 will be copied over the
"working copy" whenever the power flow into the IBox goes from OFF to ON (the working
copy can be changed by using the ECEMSUP IBox).
3
If successful, turn on C102. If there is a failure, turn on C103. If it fails, you can look at
V2001 for the specific error code.
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ECEMSUP Parameters
Port Number: optional parameter that specifies the TCP/IP Port Number to send SMTP requests; 1
usually this does not to be configured (see your network administrator for information on this
setting)
Timeout (sec): optional parameter that specifies the number of seconds to wait for the SMTP Server
2
to send the EMail to all the recipients
Cc: optional parameter that specifies a list of carbon copy Email addresses to send all EMails to
3
Parameter DL05 Range 4
ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K0-255
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map - Data Words
See DL05 V-memory map
5
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words 6
7
8
9
10
11
12
13
14
A
B
C
D
ECEMSUP Example
1 Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
2 ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
is used as a global result status register for the other ECxxxx IBoxes using this specific
3 ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
4 available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ECEMSUP Example
Rung 2: Whenever an EStop is pushed, ensure that president of the company gets copies of 1
all EMails being sent.The ECOM100 EMail Setup IBox allows you to set/change the SMTP
EMail settings stored in the ECOM100. The ECEMSUP is leading edge triggered, not
power-flow driven (similar to a counter input leg). At power-up, the ROM based EMail
2
configuration stored in the ECOM100 is copied to a RAM based "working copy". You can
change this working copy by using the ECEMSUP IBox. To restore the original ROM based 3
configuration, use the Restore Default EMail Setup ECEMRDS IBox.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 4
V2000 for the specific error code.
5
6
7
8
9
10
11
Rung 3: Once the EStop is pulled out, take the president off the cc: list by restoring the
default EMail setup in the ECOM100. 12
13
14
A
B
C
D
ECIPSUP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, configure all of the TCP/IP parameters in the ECOM100: 8
IP Address: 192.168. 12.100
Subnet Mask: 255.255. 0. 0
9
Gateway Address: 192.168. 0. 1
The ECIPSUP is leading edge triggered, not power-flow driven (similar to a counter input
10
leg). The command to write the TCP/IP configuration parameters will be sent to the
ECOM100 whenever the power flow into the IBox goes from OFF to ON. 11
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code. 12
13
14
A
B
C
D
10 Description: specifies the starting buffer location where the ECOM100s Module Name will be
placed
Num Char: specifies the number of characters (bytes) to read from the ECOM100s Description
11 field
12
Parameter DL05 Range
13 ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
14 Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
A Num Chars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K1-128
B
C
D
ECRDDES Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
1
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400 2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
4
5
6
7
8
Rung 2: On the 2nd scan, read the Module Description of the ECOM100 and store it in
V3000 thru V3007 (16 characters). This text can be displayed by an HMI.
The ECRDDES is leading edge triggered, not power-flow driven (similar to a counter input
9
leg). The command to read the module description will be sent to the ECOM100 whenever
the power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D
7 ECRDGWA Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
8 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
9 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the request is completed successfully
10 Error: specifies a bit that will turn on if the instruction is not successfully completed
Gateway IP Addr: specifies the starting address where the ECOM100s Gateway Address will be
11 placed in 4 consecutive V-memory locations
A
B
C
D
ECRDGWA Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, read the Gateway Address of the ECOM100 and store it in V3000 8
thru V3003 (4 decimal numbers). The ECOM100's Gateway Address could be displayed by
an HMI. 9
The ECRDGWA is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the Gateway Address will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D
7 ECRDIP Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
8 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
9 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
10 IP Address: specifies the starting address where the ECOM100s IP Address will be placed in 4
consecutive V-memory locations
11
Parameter DL05 Range
12 ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
13 Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
IP Address (4 Words) . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
14
A
B
C
D
ECRDIP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
8
Rung 2: On the 2nd scan, read the IP Address of the ECOM100 and store it in V3000 thru
V3003 (4 decimal numbers). The ECOM100's IP Address could be displayed by an HMI. 9
The ECRDIP is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the IP Address will be sent to the ECOM100 whenever the power
flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D
14
A
B
C
D
ECRDMID Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module.V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
8
Rung 2: On the 2nd scan, read the Module ID of the ECOM100 and store it in V2000.
The ECRDMID is leading edge triggered, not power-flow driven (similar to a counter input 9
leg). The command to read the module ID will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D
11 Num Chars: specifies the number of characters (bytes) to read from the ECOM100s Name field
12 Parameter
ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
13 Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
14 Module Name . . . . . . . . . . . . . . . . . . . . . . . . . . V
Num Chars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
See DL05 V-memory map - Data Words
K1-128
A
B
C
D
ECRDNAM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, read the Module Name of the ECOM100 and store it in V3000 8
thru V3003 (8 characters). This text can be displayed by an HMI.
The ECRDNAM is leading edge triggered, not power-flow driven (similar to a counter input 9
leg). The command to read the module name will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON. 10
If successful, turn on C100. If there is a failure, turn on C101.
11
12
13
14
A
B
C
D
7 ECRDSNM Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
8 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
10 Error: specifies a bit that will turn on if the instruction is not successfully completed
Subnet Mask: specifies the starting address where the ECOM100s Subnet Mask will be placed in 4
consecutive V-memory locations
11
Parameter DL05 Range
12 ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K0-255
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
13 Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map
See DL05 V-memory map
A
B
C
D
ECRDSNM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, read the Subnet Mask of the ECOM100 and store it in V3000 8
thru V3003 (4 decimal numbers). The ECOM100's Subnet Mask could be displayed by an
HMI. 9
The ECRDSNM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to read the Subnet Mask will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. 11
12
13
14
A
B
C
D
D Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
See DL05 V-memory map - Data Words
Text
ECWRDES Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, set the Module Description of the ECOM100. Typically this is
8
done using NetEdit, but this IBox allows you to configure the module description in the
ECOM100 using your ladder program. 9
The EWRDES is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the module description will be sent to the ECOM100 whenever
the power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code.
11
12
13
14
A
B
C
D
11 ECWRGWA Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
12 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14 Error Code: specifies the location where the Error Code will be written
Gateway Address: specifies the Gateway IP Address that will be written to the module
A
Parameter DL05 Range
B ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
C Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
D Gateway Address . . . . . . . . . . . . . . . . . . . . . . . . 0.0.0.1. to 255.255.255.254
ECWRGWA Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, assign the Gateway Address of the ECOM100 to 192.168.0.1
8
The ECWRGWA is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the Gateway Address will be sent to the ECOM100 whenever 9
the power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 10
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP 11
Setup (ECIPSUP) IBox.
12
13
14
A
B
C
D
11 ECWRIP Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
12 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14 Error Code: specifies the location where the Error Code will be written
IP Address: specifies the IP Address that will be written to the module
A
Parameter DL05 Range
B ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
C Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
ECWRIP Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, assign the IP Address of the ECOM100 to 192.168.12.100 8
The ECWRIP is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the IP Address will be sent to the ECOM100 whenever the 9
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 10
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP 11
Setup (ECIPSUP) IBox.
12
13
14
A
B
C
D
11 ECWRMID Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
12 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14 Error Code: specifies the location where the Error Code will be written
Module ID: specifies the Module ID that will be written to the module
A
Parameter DL05 Range
B ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
C Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
D Module ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K0-65535
ECWRMID Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, set the Module ID of the ECOM100. Typically this is done using
8
NetEdit, but this IBox allows you to configure the module ID of the ECOM100 using your
ladder program. 9
The EWRMID is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the module ID will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code.
11
12
13
14
A
B
C
D
11 ECWRNAM Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
12 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14 Error Code: specifies the location where the Error Code will be written
Module Name: specifies the Name that will be written to the module
A
Parameter DL05 Range
B ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K0-255
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
C Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map
See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
D Module Name . . . . . . . . . . . . . . . . . . . . . . . . . . . Text
ECWRNAM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, set the Module Name of the ECOM100. Typically this is done 8
using NetEdit, but this IBox allows you to configure the module name of the ECOM100
using your ladder program. 9
The EWRNAM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the module name will be sent to the ECOM100 whenever the
power flow into the IBox goes from OFF to ON.
10
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at
V2000 for the specific error code.
11
12
13
14
A
B
C
D
11 ECWRSNM Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
12 reference this logical number
Workspace: specifies a V-memory location that will be used by the instruction
13 Success: specifies a bit that will turn on once the request is completed successfully
Error: specifies a bit that will turn on if the instruction is not successfully completed
14 Error Code: specifies the location where the Error Code will be written
Subnet Mask: specifies the Subnet Mask that will be written to the module
A
Parameter DL05 Range
B ECOM100# . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
K0-255
See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
C Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
D Subnet Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . Masked IP Address
ECWRSNM Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
2
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx 3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
Rung 2: On the 2nd scan, assign the Subnet Mask of the ECOM100 to 255.255.0.0
8
The ECWRSNM is leading edge triggered, not power-flow driven (similar to a counter input
leg). The command to write the Subnet Mask will be sent to the ECOM100 whenever the 9
power flow into the IBox goes from OFF to ON.
If successful, turn on C100. If there is a failure, turn on C101. If it fails, you can look at 10
V2000 for the specific error code.
To configure all of the ECOM100 TCP/IP parameters in one IBox, see the ECOM100 IP 11
Setup (ECIPSUP) IBox.
12
13
14
A
B
C
D
9 ECRX Parameters
ECOM100#: this is a logical number associated with this specific ECOM100 module in the
10 specified slot. All other ECxxxx IBoxes that need to reference this ECOM100 module must
reference this logical number
12 From Slave Element (Src): specifies the slave address of the data to be read
Number of Bytes: specifies the number of bytes to read from the slave ECOM(100) PLC
13 To Master Element (Dest): specifies the location where the slave data will be placed in the master
ECOM100 PLC
Success: specifies a bit that will turn on once the request is completed successfully
14 Error: specifies a bit that will turn on if the instruction is not successfully completed
ECRX Example
Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all 1
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move 2
the module in the base to a different slot, then you only need to change this one IBox. V400
is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
3
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
available for use by the other ECxxxx IBoxes using this specific ECOM100 module. 4
5
6
7
8
(example continued on next page)
9
10
11
12
13
14
A
B
C
D
ECWX Example
1 Rung 1: The ECOM100 Config IBox is responsible for coordination/interlocking of all
ECOM100 type IBoxes for one specific ECOM100 module. Tag the ECOM100 in slot 1 as
2 ECOM100# K0. All other ECxxxx IBoxes refer to this module # as K0. If you need to move
the module in the base to a different slot, then you only need to change this one IBox. V400
3 is used as a global result status register for the other ECxxxx IBoxes using this specific
ECOM100 module. V401 is used to coordinate/interlock the logic in all of the other ECxxxx
IBoxes using this specific ECOM100 module. V402-V502 is a common 130 byte buffer
4 available for use by the other ECxxxx IBoxes using this specific ECOM100 module.
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ECWX Example
Rung 2: Using ECOM100# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast 1
as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in
slave K5. 2
Both the ECRX and ECWX work with the ECOM100 Config IBox to simplify all
networking by handling all of the interlocks and proper resource sharing. They also provide
very simplified error reporting. You no longer need to worry about any SP "busy bits" or
3
"error bits", or what slot number a module is in, or have any counters or shift registers or any
other interlocks for resource management. 4
In this example, SP1 (always ON) is driving both the ECRX and ECWX IBoxes in the same
rung. On the scan that the Network Read completes, the Network Write will start that same 5
scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending ECOM100 IBoxes below the ECWX, then
the very next scan the ECRX would start its request again.
6
Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the
fastest the PLC can do networking. For local Serial Ports, DCM modules, or the original
7
ECOM modules, use the NETCFG and NETRX/NETWX IBoxes.
8
9
10
11
12
13
14
A
B
C
D
10 NETCFG Parameters
Network#: specifies a unique # for each ECOM(100) or DCM network to use
11 CPU Port or Slot: specifies the CPU port number or slot number of DCM/ECOM(100) used
Workspace: specifies a V-memory location that will be used by the instruction
12
13 Parameter
Network# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
A
B
C
D
NETCFG Example
The Network Configuration IBox coordinates all of the interaction with other Network 1
IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for each serial
port network, DCM module network, or original ECOM module network in your system.
Configuration IBoxes must be at the top of your program and must execute every scan.
2
This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local CPU
serial ports or DCM/ECOM modules, use the same value you would use in the most
3
significant byte of the first LD instruction in a normal RX/WX rung to reference the port or
module. Any NETRX or NETWX IBoxes that need to reference this specific network would 4
enter K0 for their Network# parameter.
The Workspace register is used to maintain state information about the port or module, along 5
with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the
program. This V-memory register must not be used anywhere else in the entire program. 6
7
8
9
10
11
12
13
14
A
B
C
D
12 From Slave Element (Src): specifies the slave address of the data to be read
Number of Bytes: specifies the number of bytes to read from the slave device
13 To Master Element (Dest): specifies the location where the slave data will be placed in the master
PLC
Success: specifies a bit that will turn on once the request is completed successfully
14 Error: specifies a bit that will turn on if the instruction is not successfully completed
NETRX Example
Rung 1: The Network Configuration IBox coordinates all of the interaction with other 1
Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for
each serial port network, DCM module network, or original ECOM module network in your
system. Configuration IBoxes must be at the top of your program and must execute every
2
scan.
This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local CPU 3
serial ports or DCM/ECOM modules, use the same value you would use in the most
significant byte of the first LD instruction in a normal RX/WX rung to reference the port or 4
module. Any NETRX or NETWX IBoxes that need to reference this specific network would
enter K0 for their Network# parameter.
The Workspace register is used to maintain state information about the port or module, along
5
with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the
program. This V-memory register must not be used anywhere else in the entire program. 6
7
8
9
(example continued on next page)
10
11
12
13
14
A
B
C
D
NETWX Example
1 Rung 1: The Network Configuration IBox coordinates all of the interaction with other
Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for
2 each serial port network, DCM module network, or original ECOM module network in your
system. Configuration IBoxes must be at the top of your program and must execute every
scan.
3 This IBox defines Network# K0 to be for the local CPU serial port #2 (KF2). For local CPU
serial ports or DCM/ECOM modules, use the same value you would use in the most
4 significant byte of the first LD instruction in a normal RX/WX rung to reference the port or
module. Any NETRX or NETWX IBoxes that need to reference this specific network would
5 enter K0 for their Network# parameter.
The Workspace register is used to maintain state information about the port or module, along
6 with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the
program. This V-memory register must not be used anywhere else in the entire program.
7
8
9
10
11
12
13
14
A
B
C
D
NETWX Example
Rung 2: Using Network# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast as 1
possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in slave
K5. 2
Both the NETRX and NETWX work with the Network Config IBox to simplify all
networking by handling all of the interlocks and proper resource sharing. They also provide
very simplified error reporting. You no longer need to worry about any SP "busy bits" or
3
"error bits", or what port number or slot number a module is in, or have any counters or shift
registers or any other interlocks for resource management. 4
In this example, SP1 (always ON) is driving both the NETRX and NETWX IBoxes in the
same rung. On the scan that the Network Read completes, the Network Write will start that 5
same scan. As soon as the Network Write completes, any pending operations below it in the
program would get a turn. If there are no pending NETRX or NETWX IBoxes below this
IBox, then the very next scan the NETRX would start its request again.
6
Using the NETRX and NETWX for all of your serial port, DCM, or original ECOM
network reads and writes is the fastest the PLC can do networking. For ECOM100 modules,
7
use the ECOM100 and ECRX/ECWX IBoxes.
8
9
10
11
12
13
14
A
B
C
D
13 Slot: specifies the single PLC option slot the CTRIO module occupies
Workspace: specifies a V-memory location that will be used by the instruction
14 CTRIO Location: specifies where the module is located (local base only for DL05)
Input: This needs to be set to the same V-memory register as is specified in CTRIO Workbench as
Starting V address for inputs for this unique CTRIO.
A Output: This needs to be set to the same V-memory register as is specified in CTRIO Workbench as
Starting V address for outputs for this unique CTRIO.
B
C Parameter
CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K1
D Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
CTRIO Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 1
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
10 CTRAPT Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config)
11 Output#: specifies a CTRIO output to be used by the instruction
Entry Type: specifies the Entry Type to be added to the end of a Preset Table
12 Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
Preset Count: specifies an initial count value to begin at after Reset
13 Workspace: specifies a V-memory location that will be used by the instruction
Success: specifies a bit that will turn on once the instruction has successfully completed
14 Error: specifies a bit that will turn on if the instruction does not complete successfully
CTRADPT Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 1
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 2
through V2061 for its output data.
3
4
5
6
Rung 2: This rung is a sample method for enabling the CTRADPT command. A C-bit is
used to allow the programmer to control the command from Data View for testing purposes. 7
Turning on C0 will cause the CTRADPT instruction to add a new preset to the preset table
for output #0 on the CTRIO in slot 2. The new preset will be a command to RESET (entry
type K1=reset), pulse time is left at zero as the reset type does not use this, and the count at
8
which it will reset will be 20.
Operating procedure for this example code is to load the CTRADPT_ex1.cwb file to your
9
CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
on C2 in dataview, turn encoder on CTRIO to value above 10 and output #0 light will come 10
on and stay on for all counts past 10. Now reset the counter with C1, enable C0 to execute
CTRADPT command to add a reset for output #0 at a count of 20, turn on C2 to enable
output #0, then turn encoder to value of 10+ (output #0 should turn on) and then continue
11
on to count of 20+ (output #0 should turn off ).
12
13
14
A
B
C
(example continued on next page) D
2
3
4 Rung 4: This rung allows the operator to enable output #0 from the ladder code.
5
6
7
8
9
10
11
12
13
14
A
B
C
D
CTRCLRT Example
1 Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
2 CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
3
4
5
6
Rung 2: This rung is a sample method for enabling the CTRCLRT command. A C-bit is
7 used to allow the programmer to control the command from Data View for testing purposes.
Turning on C0 will cause the CTRCLRT instruction to clear the preset table for output #0
8 on the CTRIO in slot 2.
Operating procedure for this example code is to load the CTRCLRT_ex1.cwb file to your
9 CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning
on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will
come on and stay on until a count of 20 is reached, where it will turn off. Now reset the
10 counter with C1, enable C0 to execute CTRCLRT command to clear the preset table, turn
on C2 to enable output #0, then turn encoder to value of 10+ (output #0 should NOT turn
11 on).
12
13
14
A
B
C
D
CTRCLRT Example
Rung 3: This rung allows the programmer to reset the counter from the ladder logic. 1
2
3
Rung 4: This rung allows the operator to enable output #0 from the ladder code. 4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
CTREDPT Example
Rung 3: This rung allows the programmer to reset the counter from the ladder logic. 1
2
3
4
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
5
6
7
8
9
10
11
12
13
14
A
B
C
D
10 CTREDRL Parameters
CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config
11 Ibox)
Output#: specifies a CTRIO output to be used by the instruction
13 Entry Type: specifies the Entry Type to add during the edit
Pulse Time: specifies a pulse time for the Pulse On and Pulse Off Entry Types
A Success: specifies a bit that will turn on once the instruction has successfully completed
Error: specifies a bit that will turn on if the instruction does not complete successfully
B
C
D
Parameter
CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DL05 Range
K0-255
1
Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K0-3
Table# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K K0-255; See DL05 V-memory map - Data Words 2
Entry# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K K0-255; See DL05 V-memory map - Data Words
Entry Type . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K
Pulse Time . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K
K0-5; See DL05 V-memory map - Data Words
K0-65535; See DL05 V-memory map - Data Words
3
Preset Count . . . . . . . . . . . . . . . . . . . . . . . . . V,K K0-2147434528; See DL05 V-memory map
Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words 4
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
5
CTREDRL Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
6
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 7
through V2061 for its output data.
8
9
10
11
12
(example continued on next page) 13
14
A
B
C
D
CTREDRL Example
1
Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
2
3
4
5
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
6
7
8
9
10
11
12
13
14
A
B
C
D
B
C
D
CTRINPT Example
1
Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
2
3
4
5
Rung 4: This rung allows the operator to enable output #0 from the ladder code. 6
7
8
9
10
11
12
13
14
A
B
C
D
B
C
D
6
7
8
9
10
11
12
13
14
A
B
C
D
CTRINTR Example
1
Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
2
3
4
5
6
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
7
8
9
10
11
12
13
14
A
B
C
D
10
Parameter DL05 Range
11 CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
K0-255
K0-3
File# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K K0-255; See DL05 V-memory map - Data Words
12 Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V See DL05 V-memory map - Data Words
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
13 Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
14
A
B
C
D
CTRLDPR Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 1
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
2
3
4
5
6
Rung 2: This CTRIO Load Profile IBox will load File #1 into the working memory of 7
Output 0 in CTRIO #1. This example program requires that you load CTRLDPR_IBox.cwb
into your Hx-CTRIO(2) module.
8
9
10
11
12
13
Rung 3: If the file is successfully loaded, set Profile_Loaded.
14
A
B
C
D
CTRRDER Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 1
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
2
3
4
5
6
7
Rung 2: This CTRIO Read Error Code IBox will read the Extended Error information from
CTRIO #1. This example program requires that you load CTRRDER_IBox.cwb into your
8
Hx-CTRIO(2) module.
9
10
11
12
13
14
A
B
C
D
CTRRTPM Example
1 Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
2 CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
3
4
5
6
7
Rung 2: This CTRIO Run To Position Mode IBox sets up Output #0 in CTRIO #1 to
8 output pulses at a Frequency of 1000 Hz, use the 'Greater than Ch1/Fn1' comparison
operator, until the input position of 1500 is reached. This example program requires that you
load CTRRTPM_IBox.cwb into your Hx-CTRIO(2) module.
9
10
11
12
13
14
Rung 3: If the Run To Position Mode parameters are OK, set the Direction Bit and Enable
A the output.
B
C
D
CTRVELO Example
1 Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
2 CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
3
4
5
6
7 Rung 2: This CTRIO Velocity Mode IBox sets up Output #0 in CTRIO #1 to output
10,000 pulses at a Frequency of 1000 Hz. This example program requires that you load
CTRVELO_IBox.cwb into your Hx-CTRIO(2) module.
8
9
10
11
12
13
14
A
B
C
D
CTRVELO Example
Rung 3: If the Velocity Mode parameters are OK, set the Direction Bit and Enable the output. 1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
12 Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
See DL05 V-memory map - Data Words
See DL05 V-memory map
Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B See DL05 V-memory map
13
14
A
B
C
D
CTRWFTR Example
Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system 1
will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The
CTRIO has been configured to use V2000 through V2025 for its input data, and V2030
through V2061 for its output data.
2
3
4
5
6
Rung 2: This CTRIO Edit Preset Table Entry IBox will change Entry 0 in Table #2 to be a 7
RESET at Count 3456. This example program requires that you load CTRWFTR_IBox.cwb
into your Hx-CTRIO(2) module.
8
9
10
11
12
13
14
(example continued on next page) A
B
C
D