FX Series Programmable Controlers Applied Instructions 5
5-43
5.5.1 ZRST (FNC 40)
Operation:
The ran
g
e of devices, inclusive of those specified as
the two destinations are reset, i.e. for data devices the
current value is set to 0 (zero) and for bit elements,
the devices are turned OFF, i.e. also set to 0 (zero).
The specified device ran
g
e cannot contain mixed device t
y
pes, i.e. C000 specified as the first
destination device (D
1
) cannot be paired with T199 as the second destination device (D
2
). When
resettin
g
counters, standard and hi
g
h speed counters cannot be reset as part of the same
ran
g
e.
If D
1
is
g
reater than (>) D
2
then onl
y
device D
1
is reset.
5.5.2 DECO (FNC 41)
Operation:
Source data is provided b
y
a combination of operands
S and n. Where S specifies the head address of the
data and n, the number of consecutive bits. The
source data is read as a sin
g
le number (binar
y
to
decimal conversion) Q. The source number Q is the
location of a bit within the destination device (D) which
will be turned ON (see example opposite). When the
destination device is a data device n must be within
the ran
g
e 1 to 4 as there are onl
y
16 available
destination bits in a sin
g
le data word. All unused data
bits within the word are set to 0.
Mnemonic Function
Operands
Program steps
SD
ZRST
FNC 40
(
Zone
Reset)
Used to reset a
ran
g
e of like
devices in one
operation
Y, M,S,
T, C, D
Note:
D
1
must be less than or e
q
ual
(
≤
)
to D
2.
Standard and Hi
g
h speed counters cannot be mixed.
ZRST,
ZRSTP:
5 steps
Mnemonic Function
Operands
Program steps
SD n
DECO
FNC 41
(Decode)
Source data value
Q identifies the
Qth bit of the
destination device
which will be
turned ON
K, H,
X, Y, M,S,
T, C, D, V,
Z
Y, M, S ,
T, C, D
K, H,
Note:
D= Y,M,S then n ran
g
e =
1-8
D= T,C,D then
n ran
g
e = 1-4
n= 0, then no
processin
g
DECO,
DECOP:
7 steps
M8002
ZRST M 500 M 599
[D1] [D2]
X4
M 10 K 3
[ S ]
[ D ]
X 0
[ n ]
DECO
M15 M14 M13 M12 M11 M10M16M17
01000 000
7. 6. 5. 4. 3. 2. 1. 0.
421
011
X 2 X 1 X 0
=3
+