Data Types; Lint Data Type Considerations; Sint Or Int To Dint - 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

Data Types

650

LINT Data Type Considerations

When using LINT data types, many limitations apply. A LINT data type cannot
be used in most instructions. Limitations are as follows:
• The LINT data type is not supported in Machine Edition. The LINT data
type is a 64-bit word; ME uses only 32-bit words.
• The LINT data type is not supported by HMIs.
• The LINT data type is not supported in most instructions.
TIP
LINTs can only be used with Move and Copy instructions.
They are used with the CST/WallClock Time attribute, time
synchronization and Add-On Instructions.You cannot Add,
Subtract, Multiply, or Divide this tag type.
When using LINT data types, consider the following descriptions when these
issues occur.
How to
Move/copy two double-integer DINT values into
one LINT
Correct Date/Time Display error

SINT or INT to DINT

For those instructions that convert SINT or INT values to DINT values, the
'Operands' sections in this manual identify the conversion method.
This conversion method
Sign-extension
Zero-fill
The following example shows the results of converting a value using sign-
extension and zero-fill.
This value
Converts to this value
by sign-extension
Converts to this value
by zero-fill
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Description
Create a double integer array of two elements,
total of 64 bits (that is, DINT[2], which can then
be copied into one long integer.
When a tag has a negative value, it cannot be
displayed as Date/Time. In the tag editor, check
whether the value is negative by changing the
style of the tag from Date/Time to Binary. When
the most significant bit (leftmost one) is 1, the
value is negative and therefore cannot be
displayed as a Date or Time.
Converts data by placing
The value of the leftmost bit (the sign of the value) into each bit
position to the left of the existing bits until there are 32 bits.
Zeroes to the left of the existing bits until there are 32 bits.
2#1111_1111_1111_1111
2#1111_1111_1111_1111_1111_1111_1111_1111
2#0000_0000_0000_0000_1111_1111_1111_1111
(-1)
(-1)
(65535)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents