12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Common Attributes 637SINT or INT to DINTFor those instructions that convert SINT or INT values to DINT values,the “Operands” sections in this manual identify the conversionmethod.This Conversion MethodSign-extensionConverts Data By Placingthe value of the left-most bit (the sign of the value) intoeach bit position to the left of the existing bits until thereare 32 bits.Zero-fill zeroes to the left of the existing bits until there are 32bitsThe following example shows the results of converting a value usingsign-extension and zero-fill.This value 2#1111_1111_1111_1111 (-1)Converts to thisvalue bysign-extension2#1111_1111_1111_1111_1111_1111_1111_1111 (-1)Converts to thisvalue by zero-fill2#0000_0000_0000_0000_1111_1111_1111_1111 (65535)Because immediate values are always zero-filled, the conversion of aSINT or INT value may produce unexpected results. In the followingexample, the comparison is false because Source A, an INT, convertsby sign-extension; while Source B, an immediate value, is zero-filled.dder Logic Listing - Total number of rungs: 3EQUEqualSource A remote_rack_1:I.Data[0]2#1111_1111_1111_1111Source B 2#1111_1111_1111_111142093Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!