User manual

Instruction Set
Compute 3-18
compute instructions continued...
Instruction Description
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.
Sine
SIN
(Enhanced, Ethernet, and
ControlNet PLC-5 processors
only)
When the input conditions are true, take the sine of the Source (F8:11) and store the result in
the Destination (F8:12). The Source is interpreted as radians.
NEGATE
Source N7:3
3
Destination N7:12
–3
NEG
Status Bit Description
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
SINE
Source F8:11
0.7853982
Destination F8:12
0.7071068
SIN
Status Bit Description
Calways 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