User manual

Instruction Set
Compute 3-20
compute instructions continued...
Instruction Description
Standard Deviation
STD
(Enhanced, Ethernet, and
ControlNet PLC-5 processors
only)
Status Bits:
EN - Enable
DN - Done Bit
ER - Error Bit
When the input conditions go from false-to-true, the elements in N7:1, N7:2, N7:3 and N7:4 are
used to calculate the standard deviation of the values and store the result in the Destination
(N7:0). The result is stored in N7:0.
Subtract
SUB
When the input conditions are true, subtract the value in Source B (N7:4) from the value in
Source A (N7:3) and store the result in the Destination (N7:12).
STANDARD DEVIATION
File #N7:1
Dest N7:0
Control R6:0
Length 4
Position 0
STD
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
SUBTRACT
Source A N7:3
3
Source B N7:4
1
Dest N7:12
2
SUB
Status Bit Description
C sets if borrow is generated; otherwise resets
V sets if underflow is generated; otherwise resets
Z sets if the result is zero; otherwise resets
S sets if the result is negative; otherwise resets