Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
7  APPLICATION INSTRUCTIONS
7.12  Special Function Instructions
647
7
Random number generation, series updates
RND(P), SRND(P)
Processing details
 • The random number generation instruction generates random numbers conforming to a certain calculation formula. In the 
calculation using the formula, the result of previous calculation is used as a coefficient. The random series change 
instruction can change the random number generation pattern.
RND
 • Generates random number of from 0 to 32767, and stores at device designated by (D).
SRND
 • Updates random number series according to the 16-bit BIN data being stored in device designated by (S).
Operation error
 • There is no operation error in the RND(P) or SRND(P) instruction.
Program example
 • The following program stores random number at D100 when X10 is turned ON.
 • The following program updates a random number series according to the contents of D0 when X10 is turned ON.
• Basic model QCPU: The serial number (first five digits) is "04122" or later.
(D):   Head number of the devices where random numbers will be stored (BIN 16 bits)
(S):   Random number serial data or the first number of the devices where the random number serial data is stored (BIN 16 bits)
Setting 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
(D)
(S)
[Ladder Mode]
[List Mode]
[Ladder Mode]
[List Mode]
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
Command
Command
Command
Command
SRNDP
SRND
RNDP
RND
SRNDP
SRND
RNDP
RND
S
D
D
S
Step
Instruction
Device
Step
Instruction
Device