![Omron SYSMAC C200HE Скачать руководство пользователя страница 259](http://html1.mh-extra.com/html/omron/sysmac-c200he/sysmac-c200he_operation-manual_742434259.webp)
241
5-19-14 SQUARE ROOT – ROOT(72)
Sq
: First source word (BCD)
IR, SR, AR, DM, HR, TC, LR
R
: Result word
IR, SR, AR, DM, HR, LR,
Ladder Symbols
Operand Data Areas
ROOT(72)
Sq
R
@ROOT(72)
Sq
R
Limitations
Sq and Sq+1 must be in the same data area.
Description
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-dig-
it content of Sq and Sq+1 and places the result in R. The fractional portion is trun-
cated.
R
Sq+1
Sq
Flags
ER:
Sq or Sq+1 is not BCD.
Indirectly addressed DM word is non-existent. (Content of
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ
:
ON when the result is 0.
Example
The following example shows how to take the square root of a four-digit number
and then round the result.
First the words to be used are cleared to all zeros and then the value whose
square root is to be taken is moved to Sq+1. The result, which has twice the num-
ber of digits required for the answer (because the number of digits in the original
value was doubled), is placed in DM 0102, and the digits are split into two differ-
ent words, the leftmost two digits to IR 011 for the answer and the rightmost two
digits to DM 0103 so that the answer in IR 011 can be rounded up if required. The
last step is to compare the value in DM 0103 so that IR 011 can be incremented
using the Greater Than flag.
BCD Calculations
Section 5-19
Содержание SYSMAC C200HE
Страница 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Страница 2: ......
Страница 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 380: ......
Страница 410: ......
Страница 438: ......
Страница 464: ......
Страница 474: ......
Страница 522: ......
Страница 538: ......
Страница 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 554: ......
Страница 560: ......
Страница 584: ......
Страница 585: ......
Страница 586: ...W303 E1 09 ...