![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030607.webp)
567
Special Math Instructions
Section 3-14
Flags
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 000000 is ON in the following example, ROTB(620) calculates the
square root of the data in CIO 0002 and CIO 0001, and writes the integer por-
tion of the result in D00100.
3-14-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
Name
Label
Operation
Error Flag
ER
ON if bit 15 of S+1 is 1 (ON).
OFF in all other cases.
Equals Flag
=
ON if the result is 0000.
OFF in all other cases.
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
014B
5A91
1234
D00100
CIO 0002
CIO 0001
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 0000 to CIO 6142
CIO 0000 to CIO 6143
Work Area
W000 to W510
W000 to W511
Holding Bit Area
H000 to H510
H000 to H511
Auxiliary Bit Area
A000 to A958
A448 to A959
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...