EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 486

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
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...
453
Special Math Instructions Section 3-13
Precautions The content of S+1 and S must be less than 8000 0000.
The operands of this instruction (S+1, S, and R) are all treated as binary val-
ues. If the input data is BCD, use the ROOT(072) instruction.
Example When CIO 0.00 is ON in the following example, ROTB(620) calculates the
square root of the data in CIO 1001 and CIO 1000, and writes the integer por-
tion of the result in D100.
3-13-2 BCD SQUARE ROOT: ROOT(072)
Purpose Computes the square root of an 8-digit BCD number and outputs the integer
portion of the result to the specified result word.
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
Overflow Flag OF ON if the content of S+1 and S is 4000 0000 to
7FFF FFFF.
OFF in all other cases.
Underflow Flag UF OFF
Negative Flag N OFF
Name Label Operation
014B 5A91
1234
D100
CIO 1001 CIO 1000
0.00
1000
D100
Square root computation
(remainder eliminated)
ROOT(072)
S
R
S: First source word
R: Result word
Variations Executed Each Cycle for ON Condition ROOT(072)
Executed Once for Upward Differentiation @ROOT(072)
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification Not supported.
Block program areas Step program areas Subroutines Interrupt tasks
OK OK OK OK
Area S R
CIO Area CIO 0 to CIO 6142 CIO 0 to CIO 6143
Work Area W0 to W510 W0 to W511
Holding Bit Area H0 to H510 H0 to H511
Auxiliary Bit Area A0 to A958 A448 to A959
Timer Area T0000 to T4094 T0000 to T4095
Counter Area C0000 to C4094 C0000 to C4095
DM Area D0 to D32766 D0 to D32767
Indirect DM addresses
in binary
@ D0 to @ D32767

Table of Contents

Related product manuals