Allen-Bradley PLC-5 User Manual page 311

Enhanced and ethernet plc-5 programmable controllers
Hide thumbs Also See for PLC-5:
Table of Contents

Advertisement

Instruction
Negate
NEG
NEG
NEGATE
Source
N7:3
3
Dest
N7:12
-3
Sine
SIN
SIN
SINE
Source
F8:11
0.7853982
Dest
F8:12
0.7071068
Square Root
SQR
SQR
SQUARE ROOT
N7:3
Source
25
Dest
N7:12
5
Instruction Set Quick Reference
Description
When the input conditions are true, take the opposite sign of
the Source (N7:3) and store the result in the Destination
(N7:12). This instruction turns positive values into negative
values and negative values into positive values.
Status
Description
Bit
C
sets if the operation generates a carry;
otherwise resets
V
sets if overflow is generated;
otherwise resets
Z
sets if the result is zero;
otherwise resets
S
sets if the result is negative;
otherwise resets
When input conditions go true, take the sine of the value in
F8:11 and store the result in F8:12.
Status
Description
Bit
C
always resets
V
sets if overflow is generated;
otherwise resets
Z
sets if the result is zero;
otherwise resets
S
sets if the result is negative;
otherwise resets
When the input conditions are true, take the square root of the
Source (N7:3) and store the result in the Destination (N7:12).
Status
Description
Bit
C
always resets
V
sets if overflow occurs during floating point
to integer conversion; otherwise resets
Z
sets if the result is zero; otherwise resets
S
always reset
Publication 1785-UM012D-EN-P - July 2005
D-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents