EasyManuals Logo

Mitsubishi MELSEC iQ-F FX5 series User Manual

Mitsubishi MELSEC iQ-F FX5 series
888 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #467 background imageLoading...
Page #467 background image
7 APPLICATION INSTRUCTION
7.8 Random Number Instruction
465
7
7.8 Random Number Instruction
Generating random number
RND(P)
These instructions generate a pseudo-random number ranging from 0 to 32767, and store it as a random number to a device
specified by (d).
Setting data
Descriptions, ranges, and data types
Applicable devices
Processing details
These instructions generate a pseudo-random number ranging from 0 to 32767, and store it as a random number to a
device specified by (d).
In the pseudo-random number sequence, the source value of a random number is calculated every time, and this
instruction calculates a pseudo-random number using the source value.
*1 To (SD8311, SD8310), write a non-negative value (0 to 2,147,483,647) only once when the CPU module mode switches from STOP to
RUN. (K1 is written to (SD8311, SD8310) as the initial value when the power is restored.)
Operation error
There is no operation error.
Ladder diagram Structured text
ENO:=RND(EN,d);
ENO:=RNDP(EN,d);
Operand Description Range Data type Data type (label)
(d) Head device number storing a random number 16-bit signed binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(d) 
Pseudo-random number calculation equation:
(SD8311, SD8310)=(SD8311, SD8310)
*1
1103515245+12345
(d) ="([SD8311, SD8310]>>16)&<logical product>00007FFFh"
(d)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC iQ-F FX5 series and is the answer not in the manual?

Mitsubishi MELSEC iQ-F FX5 series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC iQ-F FX5 series
CategoryController
LanguageEnglish

Related product manuals