EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Special Math Instructions

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
451
Special Math Instructions Section 3-13
Description COML(614) reverses the status of every specified bit in Wd and Wd+1.
(Wd+1, Wd)
(Wd+1, Wd)
Note When using the COM instruction, be aware that the status of each bit will
change each cycle in which the execution condition is ON.
Flags
Precautions When COML(614) is executed, the Error Flag will turn OFF.
If as a result of COML, the content of R, R+1 is 00000000 hex, the Equals
Flag will turn ON.
If as a result of COML, the leftmost bit of R+1 is 1, the Negative Flag will turn
ON.
Examples When CIO 0.01 is ON in the following example, the status of each bit in D201
and D200 will be reversed.
3-13 Special Math Instructions
This section describes instructions used for special math calculations.
3-13-1 BINARY ROOT: ROTB(620)
Purpose Computes the square root of the 32-bit signed binary contents (positive value)
of the specified words and outputs the integer portion of the result to the spec-
ified result word.
Ladder Symbol
Name Label Operation
Error Flag ER OFF
Equals Flag = ON when the result is 0.
OFF in all other cases.
Negative Flag N ON when the leftmost bit of R is 1.
OFF in all other cases.
0.01
D200
D200
D200
D201
D201
Instruction Mnemonic Function code Page
BINARY ROOT ROTB 620 451
BCD SQUARE ROOT ROOT 072 453
ARITHMETIC PROCESS APR 069 456
FLOATING POINT DIVIDE FDIV 079 467
BIT COUNTER BCNT 067 470
ROTB(620)
S
R
S: First source word
R: Result word

Table of Contents

Related product manuals