User manual
Instruction Set
Compute 3-12
Compute Instructions
Instruction Description
Compute
CPT
If the input conditions go true, evaluate the Expression N7:4 – (N7:6 * N7:10) and store the
result in the Destination (N7:3). The CPT instruction can perform these operations: add (+),
subtract (–), multiply (*), divide (|), convert from BCD (FRD), convert to BCD (TOD), square root
(SQR), logical and (AND), logical or (OR), logical not (NOT), exclusive or (XOR), negate (–), clear
(0), and move. In addition, Enhanced PLC-5 processors can do: X to the power of Y (**), radians
(RAD), degrees (DEG), log (LOG), natural log (LN), sine (SIN), cosine (COS), tangent (TAN), inverse
sine (ASN), inverse cosine (ACS), inverse tangent (ATN). Complex expressions (up to 80
characters) are valid with Enhanced and ControlNet PLC-5 processors only.
Arc Cosine
ACS
(Enhanced, Ethernet, and
ControlNet PLC-5
processors only)
When the input conditions are true, take the arc cosine of the Source (F8:19) and store the
result in the Destination (F8:20). The Source must be greater than or equal to –1 and less than
or equal to 1.
COMPUTE
Dest N7:3
3
Expression
N7:4 – (N7:6 * N7:10)
CPT
ARCCOSINE
Source F8:19
0.7853982
Destination F8:20
0.6674572
ACS
Status Bit Description
Calways resets
V sets if overflow is generated; otherwise resets
Z sets if the result is zero; otherwise resets
Salways resets