Square Root - Root(72) - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

BCD Calculation Instructions
5-21-11 SQUARE ROOT – ROOT(72)
Limitations
Description
Flags
Example
00000
DM 0001
6 3
2
5
63,250,561 = 7953.0221
001
7 9
Ladder Symbols
ROOT(72)
Sq
R
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, ROOT(72) is not executed. When the
execution condition is ON, ROOT(72) computes the square root of the eight-
digit content of Sq and Sq+1 and places the result in R. The fractional portion
is truncated.
ER:
Sq is not BCD.
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
EQ:
ON when the result is 0.
The following example shows how to take the square root of an eight digit
number. The result is a four-digit number, with the remainder rounded off. and
then round the result.
In this example, √ 63250561 = 7953.0221..., which is rounded off to 7953.
@ROOT(72)
DM 0000
001
DM 0000
0
5
6 1
(The remainder is rounded off.)
5
3
@ROOT(72)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Sq
R
R
Sq+1
Address Instruction
00000
LD
00001
@ROOT(72)
Section 5-21
Operand Data Areas
Sq: First source word (BCD)
R: Result word
IR, SR, AR, DM, EM, HR, LR
Sq
Operands
00000
DM
0000
001
327

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents