Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 608

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Special Math Instructions
Description
Flags
Precautions
Examples
568
Area
Timer Area
Counter Area
DM Area
EM Area without bank
EM Area with bank
Indirect DM/EM
addresses in binary
Indirect DM/EM
addresses in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
ROOT(072) computes the square root of the 8-digit BCD number in S+1 and
S and outputs the integer portion of the result to R. The non-integer remainder
is eliminated.
Name
Error Flag
ER
Equals Flag
=
The operands of this instruction (S+1, S, and R) are all treated as BCD val-
ues. If the input data is binary, use the ROTB(620) instruction.
Square Root of 8-digit Number
When CIO 000000 is ON in the following example, ROOT(072) calculates the
square root of the data in D00001 and D00000, and writes the integer portion
of the result in D00100.
Note Figures after the decimal point are truncated for 8-digit numbers.
S
T0000 to T4094
C0000 to C4094
D00000 to D32766
E00000 to E32766
En_00000 to En_32766
(n = 0 to C)
@ D00000 to @ D32767
@ E00000 to @ E32767
@ En_00000 to @ En_32767
(n = 0 to C)
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
#00000000 to #99999999
(BCD)
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
S+1
S
BCD data (8 digits)
Label
ON if the data in S+1 and S is not BCD.
OFF in all other cases.
ON if the result is 0000.
OFF in all other cases.
Section 3-14
R
T0000 to T4095
C0000 to C4095
D00000 to D32767
E00000 to E32767
En_00000 to En_32767
(n = 0 to C)
---
DR0 to DR15
R
BCD data (4 digits)
Operation

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents