![Omron CVM1D Operation Manual Download Page 317](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532317.webp)
(274)
ROTB 0001 D00100
0000
00
312
5-23-5 BINARY ROOT: ROTB(274)
(274)
ROTB S R
Ladder Symbol
Variations
↑
ROTB(274)
Operand Data Areas
R: Result word
CIO, G, A, DM, DR, IR
S: First source word
CIO, G, A, T, C, #, DM
When the execution condition is OFF, ROTB(274) is not executed. When the ex-
ecution condition is ON, ROTB(274) computes the square root of the 32-bit
binary content of the specified word (S) and outputs the integer portion of the
result to the specified result word (R). The fraction portion is eliminated.
R
S+1
S
Binary data (32 bits)
Binary data (16 bits)
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 computation.
Precautions
S, S+1 must be non-negative between 0000 0000 and 3FFF FFFF.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
S, S+1 is negative (leftmost bit of S+1 is “1”).
The content of a
*
DM word is not BCD when set for BCD.
= (A50006)
The output data is all zeroes.
N (A50008)
OFF when ROTB(274) is executed.
OF (A50009)
The input data (S+1, S) is within the range of 4000 0000 to
7FFF FFFF.
UF (A50010)
OFF when ROTB(274) is executed.
Example
When CIO 000000 is ON in the following example, the square root of the data in
CIO 0002 and CIO 0001 is computed, and the result (integer only) is placed in
D00100.
Address
Instruction
Operands
00000
LD
000000
00001
ROTB(274)
0001
D00100
014B
5A91
1234
D00100
CIO 0002
CIO 0001
Square root computation
(with fraction eliminated)
Description
Special Math Instructions
Section 5-23
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...