Bradley Smoker PLC-5 user manual Neg, Sin, Sqr

Models: PLC-5

1 388
Download 388 pages 13.97 Kb
Page 311
Image 311

Instruction Set Quick Reference

D-11

 

 

Instruction

Description

 

 

 

NEG

 

 

 

 

 

 

NEGATE

 

 

Source

N7:3

 

 

 

3

 

Dest

N7:12

 

 

 

-3

 

 

 

 

Negate

NEG

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

 

Csets if the operation generates a carry; otherwise resets

Vsets if overflow is generated; otherwise resets

Zsets if the result is zero; otherwise resets

Ssets if the result is negative; otherwise resets

SIN

SINE

Source F8:11

Sine

SIN

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

Status

0.7853982

Bit

Description

DestF8:12 0.7071068

C

always resets

Vsets if overflow is generated; otherwise resets

Zsets if the result is zero; otherwise resets

Ssets if the result is negative; otherwise resets

 

SQR

 

 

 

 

 

 

SQUARE ROOT

 

 

Source

N7:3

 

 

 

25

 

Dest

N7:12

 

 

 

5

 

 

 

 

Square Root

SQR

When the input conditions are true, take the square root of th Source (N7:3) and store the result in the Destination (N7:12).

Status

Description

Bit

 

 

 

C

always resets

Vsets if overflow occurs during floating point to integer conversion; otherwise resets

Zsets if the result is zero; otherwise resets

S always reset

Publication 1785-UM012D-EN-P - July 2005

Page 311
Image 311
Bradley Smoker PLC-5 user manual Neg, Sin, Sqr