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

Page 313

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

Instruction Set Quick Reference D-13

Instruction

Description

Subtract
SUB

Tangent
TAN

X to the power of Y
XPY

SUB

SUBTRACT

Source A

Source B

Dest

N7:3

N7:4

N7:12

3

1

2

sets if borrow is generated;

sets if underflow is generated;

sets if the result is zero; otherwise resets

When the input conditions are true, subtract the value in Sour
B (N7:4) from the value in Source A (N7:3) and store the result
the Destination (N7:12).

Status

C

V

Z

S

Description

Bit

sets if the result is negative;

otherwise resets

otherwise resets

otherwise resets

Source

Dest

F8:15

F8:16

0.7853982

1.000000

TAN

TANGENT

When input conditions go true, take the tangent of the
value in F8:15 and store the result in F8:16.

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

XPY

X TO POWER OF Y

Source A

Source B

Dest

N7:4

N7:5

N7:6

5

2

25

When input conditions go true, take the the value in N7:4,
raise it to the power stored in N7:5, and store the result in

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

Advertising