Allen-Bradley Logix5000 Reference Manual page 263

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Description:
Arithmetic Status Flags:
Fault Conditions:
Condition
Prescan
Rung-condition-in is false
Rung-condition-in is true
Postscan
Example 1:
Example 2:
Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS)
The CPT instruction performs the arithmetic operations you define in the
expression. When enabled, the CPT instruction evaluates the expression and
places the result in the Destination.
The execution of a CPT instruction is slightly slower and uses more memory than
the execution of the other compute/math instructions. The advantage of the
CPT instruction is that it allows you to enter complex expressions in one
instruction.
TIP
Arithmetic status flags are affected.
None
Execution:
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
The instruction evaluates the Expression and places the result in the Destination.
The rung-condition-out is set to true.
The rung-condition-out is set to false.
When enabled, the CPT instruction evaluates value_1 multiplied by 5 and
divides that result by the result of value_2 divided by 7 and places the final result
in result_1.
When enabled, the CPT instruction truncates float_value_1 and float_value_2,
raises the truncated float_value_2 to the power of two and divides the truncated
float_value_1 by that result, and stores the remainder after the division in
float_value_result_cpt.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
There is no limit to the length of an expression.
Chapter 6
263

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents