Publication 1766-RM001A-EN-P - October 2008
Math Instructions
235
Instruction Operation
When the rung is true, this instruction shall compute the expression and
place the result in Destination.
Note that it takes on the attributes of the instruction which it is computing.
The following instructions can be included in the expression section of
CPT instruction.
CPT Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
Parameter
Data Files
Function Files
(1)
CS - Com
m
s
IOS - I/O
DL
S -
D
a
ta
L
o
g
(2
)
Address Mode
(3)
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTOX, PW
MX
STI
EII
BH
I
MMI
LCD
Dir
e
c
t
Indir
e
ct
Immedia
te
Int16
Immedia
te In
t32
Immedia
te Flo
a
t
Bit
Wo
rd
D
oub
le W
o
rd
Ele
m
ent
Float
Destination •
•
•
•
•
•
•
•
•
•
•
•
•
(1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit.
(2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
(3) See Important note about indirect addressing.
IMPORTANT
You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX,
PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
CPT Instruction Operation
Sub Instructions
Symbol
Addition
+ (ADD)
Subtraction
- (SUB)
Multiplication
* (MUL)
Division
/ (DIV)
Square Root
SQR
Negate
- (NEG)
Logical Not
NOT
Logical Exclusive Or
XOR
Logical Inclusive Or
OR
Logical And
AND
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive