Expressions In Array Subscripts; Immediate Values - Allen-Bradley Logix5000 Reference Manual

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

Advertisement

Appendix A
Common Attributes

Immediate Values

646

Expressions in Array Subscripts

Expressions set status flags based on the results of arithmetic operations. If you
have an array subscript as an expression, both the expression and the instruction
could generate minor faults.
Under certain circumstances, the S:Z status flag may be set if the expression of an
array element evaluates to zero. In this example, Array[Element*3], 0 if
Element=0 the subscript [Element*3] evaluates to 0 and the S:Z bit will be set.
When you enter an immediate value (constant) in decimal format
(for example, -2, 3) the controller stores the value by using 32 bits. If you enter a
value in a radix other than decimal, such as binary or hexadecimal, and do not
specify all 32 bits, the controller places a zero in the bits that you do not specify
(zero-fill).
EXAMPLE
If you enter
-1
16#ffff (-1)
8#1234 (668)
2#1010 (10)
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Zero-filling of immediate values
The controller stores
16#ffff ffff (-1)
16#0000 ffff (65535)
16#0000 029c (668)
16#0000 000a (10)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents