beautypg.com

Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 311

background image

Publication 1785-UM012D-EN-P - July 2005

Instruction Set Quick Reference D-11

Negate
NEG

Sine
SIN

Square Root
SQR

Instruction

Description

NEG

NEGATE

Source

N7:3

3

Dest

N7:12

-3

sets if the operation generates a carry;

sets if overflow is generated;

sets if the result is zero;

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

C

V

Z

S

Description

Bit

sets if the result is negative;

otherwise resets

otherwise resets

otherwise resets

otherwise resets

SIN

SINE

Source

F8:11

0.7853982

Dest

F8:12

0.7071068

When input conditions go true, take the sine of the value in
F8:11 and store the result in F8:12.

always resets

sets if overflow is generated;

sets if the result is zero;

Status

C

V

Z

S

Description

Bit

otherwise resets

otherwise resets

sets if the result is negative;

otherwise resets

SQR

SQUARE ROOT

Source

25

Dest

N7:12

5

N7:3

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

C

V

Z

S

Description

always resets

Bit

sets if overflow occurs during floating point

sets if the result is zero; otherwise resets

always reset

to integer conversion; otherwise resets