5:
Binary
Arithmetic
Instructions
FC5A
MicroSmart
User’s
Manual FC9Y
‐
B1273
5
‐
19
RNDM
(Random)
Applicable
CPU
Modules
Valid
Devices
For
the
valid
device
address
range,
see
pages
and
(
Basic
Vol.).
When
S1
or
S2
value
is
over
32767,
a
user
program
execution
error
will
result,
turning
on
special
internal
relay
M8004
and
ERR
LED
on
the
CPU
module.
When
S1
value
is
larger
than
or
equal
to
S2
value,
a
user
program
execution
error
will
result,
turning
on
special
internal
relay
M8004
and
ERR
LED
on
the
CPU
module.
Valid
Data
Types
Example:
RNDM
FC5A
‐
C10R2/C/D
FC5A
‐
C16R2/C/D
FC5A
‐
C24R2/C/D
FC5A
‐
D16RK1/RS1
FC5A
‐
D32K3/S3
FC5A
‐
D12K1E/S1E
X
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1
(Source
1)
Minimum
value
of
pseudorandom
numbers
— — — — — —
X
X
—
S2
(Source
2)
Maximum
value
of
pseudorandom
numbers
— — — — — —
X
X
—
D1
(Destination
1)
Destination
to
store
results
— — — — — —
X
—
—
W
(word)
X
I
(integer)
—
D
(double
word)
—
L
(long)
—
F
(float)
—
When
input
is
on,
pseudorandom
numbers
are
generated.
Source
devices
S1
and
S2
specify
the
minimum
and
maximum
values
of
the
gen
‐
erated
pseudorandom
numbers,
respectively.
S2
value
must
be
larger
than
S1
value.
S1
and
S2
values
must
be
between
0
and
32767.
The
result
is
stored
to
the
destination
designated
by
device
D1.
This
instruction
is
available
on
upgraded
CPU
modules
with
system
program
version
210
or
higher.
D1
*****
S1
*****
S2
*****
RNDM(W)
When
a
word
device
such
as
D
(data
register)
is
designated
as
the
source
or
destination,
1
point
(word)
is
used.
D1
D100
S1
1
I0
RNDM(W)
S2
6
SOTU
When
input
I0
is
turned
on,
RNDM
is
executed
to
generate
a
pseu
‐
dorandom
value
ranging
between
1
and
6,
and
stores
the
result
to
data
register
D100
designated
by
destination
device
D1.
Содержание MICROSmart FC5A Series
Страница 1: ...FC5A SERIES FC9Y B1273 1 User s Manual Advanced Volume ...
Страница 2: ......
Страница 8: ...Preface 6 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 14: ...TABLE OF CONTENTS vi FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 52: ...4 DATA COMPARISON INSTRUCTIONS 4 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 72: ...5 Binary Arithmetic Instructions 5 20 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 88: ...7 SHIFT ROTATE INSTRUCTIONS 7 12 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 112: ...8 DATA CONVERSION INSTRUCTIONS 8 24 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 138: ...11 PROGRAM BRANCHING INSTRUCTIONS 11 14 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 178: ...13 PULSE INSTRUCTIONS 13 32 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 202: ...14 PID INSTRUCTION 14 24 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 206: ...15 DUAL TEACHING TIMER INSTRUCTIONS 15 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 214: ...16 INTELLIGENT MODULE ACCESS INSTRUCTIONS 16 8 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 248: ...21 COMPUTER LINK COMMUNICATION 21 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 272: ...23 MODBUS TCP COMMUNICATION 23 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 332: ...25 EXPANSION RS232C RS485 COMMUNICATION 25 16 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 341: ...NOTE FC5A MICROSMART USER S MANUAL FC9Y B1273 1 ...
Страница 342: ...NOTE 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...