EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 261

Mitsubishi Electric MELSEC FX Series
838 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...
7 Applied Instructions
7.5 Data Operation
259
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Function and operation explanation
1. 16-bit operation (SQR, SQRP)
The square root of the data stored in the device specified by is calculated, and stored to the device
specified by ).
2. 32-bit operation (DSQR, DSQRP)
The square root of the data stored in the device specified by is calculated, and stored to the device
specified by ).
Cautions
1) When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the
case of a simple project. Use a label to handle 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
2) The obtained square root is an integer because the decimal point is ignored.
When the decimal point is ignored, M8021 (borrow flag) turns ON.
3) When the calculated value is true "0", M8020 (zero flag) turns ON.
4) Some restrictions to applicable devices
S1:The FX
3U and FX3UC PLCs only are applicable.
Program examples
Command input
Root data
Resulting data
SQR
EN
s
ENO
d
ds
Command input
Label 1
*1
Label2
*2
*1 This defines the device that stores the data whose square root is obtained.
*2 This defines the device that stores the square root operation result.
DSQR
EN
s
ENO
d
+1,
+1,
ds ds
D 10 D 12
100 10
=
The square root of D10 is stored to D12.
The value of D10 is "100".
X000
D10
D12
SQR
EN
s
ENO
d
[Structured ladder]
[ ST ]
SQR(X000, D10, D12);

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals