Omron SYSMAC CS Series Instruction & Reference Manual page 399

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Function
ROTB(620) computes the square root of the 32-bit
binary number in S+1 and S and outputs the integer
portion of the result to R.
Note 1 The non-integer remainder is eliminated.
2 The range of data that can be specified for
words S+1 and S is 0000 0000 to 3FFF
FFFF. If a number from 4000 0000 to
7FFF FFFF is specified, it will be treated
as 3FFF FFFF for the square root compu-
tation.
3 The operands of this instruction (S+1, S,
and R) are all treated as binary values. If
the input data is BCD, use the ROOT(072)
instruction.
Example Programming
When CIO 0.00 is ON in the following example, ROTB(620) calculates the square root of the data in
CIO 2 and CIO 1, and writes the integer portion of the result in D100.
0.00
CS/CJ/NSJ Series Instructions Reference Manual (W474)
CIO 2
014B
1
D100
S+1
S
Binary data (32 bits)
CIO 1
5A91
Square root computation
(remainder eliminated)
D100
1234
3. Instructions
R
Binary data (16 bits)
3
365

Advertisement

Table of Contents
loading

Table of Contents