Bcd Square Root: Root(072) - Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Special Math Instructions
Flags
Precautions
Example

3-14-2 BCD SQUARE ROOT: ROOT(072)

Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
568
Name
Label
Error Flag
ER
Equals Flag
=
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
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.
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.
CIO 0002
014B
Computes the square root of an 8-digit BCD number and outputs the integer
portion of the result to the specified result word.
ROOT(072)
S: First source word
S
R
R: Result word
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Block program areas
OK
OK
Area
CIO Area
Work Area
Holding Bit Area
Auxiliary Bit Area
Operation
ON if bit 15 of S+1 is 1 (ON).
OFF in all other cases.
ON if the result is 0000.
OFF in all other cases.
ON if the content of S+1 and S is 4000 0000 to
7FFF FFFF.
OFF in all other cases.
OFF
OFF
CIO 0001
5A91
Square root computation
(remainder eliminated)
D00100
1234
Step program areas
Subroutines
OK
S
CIO 0000 to CIO 6142
W000 to W510
H000 to H510
A000 to A958
Section 3-14
ROOT(072)
@ROOT(072)
Not supported.
Interrupt tasks
OK
R
CIO 0000 to CIO 6143
W000 to W511
H000 to H511
A448 to A959

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents