EasyManua.ls Logo

Mitsubishi MELSEC-Q/L

Mitsubishi MELSEC-Q/L
850 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
Loading...
540
BSQR, BSQRP, BDSQR, BDSQRP
Function
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 .
SRND
Updates random number series according to the 16-bit BIN data being stored in device designated by .
Operation Error
(1) There is no operation error in the RND(P) or SRND(P) instruction.
Program Example
(1) The following program stores random number at D100 when X10 is turned ON.
[Ladder Mode] [List Mode]
(2) The following program updates a random number series according to the contents of D0 when X10 is turned ON.
[Ladder Mode] [List Mode]
: Data of which the square root is obtained or the number of the device where the data is stored (BSQR(P): BCD 4 digits, BDSQR(P): BCD 8 digits)
: Head number of the devices where the square root calculation result will be stored (BCD 4 digits)
7.12.28 BSQR, BSQRP BCD 4-digit square roots
BDSQR, BDSQRP BCD 8-digit square roots
7.12.28
BSQR, BSQRP, BDSQR, BDSQRP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
––
–– ––
D
S
Step Instruction Device
Step Instruction Device
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
P
S D
S D
BSQR,BDSQR
BSQRP,BDSQRP
BSQR/BDSQR
S
D
S
D

Table of Contents

Related product manuals