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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Move/Logical <strong>Instructions</strong> (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT) 287Masked Move (MVM)The MVM instruction copies the Source to a Destination and allowsportions of the data to be masked.This instruction is available in structured text and function block asMVMT, see page 290.Operands:Relay LadderOperand Type Format DescriptionSource SINT immediate value to moveINTtagMaskDINTA SINT or INT tag converts to a DINT value by zero-fill.SINT immediate which bits to block or passINTtagDestinationDINTA SINT or INT tag converts to a DINT value by zero-fill.SINT tag tag to store the resultINTDINTStructured Textdest := (Dest AND NOT (Mask))OR (Source AND Mask);This instruction is available in structured text as MVMT. Or you cancombine bitwise logic within an expression and assign the result tothe destination. This expression performs a masked move on Source.See Structured Text Programming for information on the syntax ofexpressions and assignments within structured text.Description:The MVM instruction uses a Mask to either pass or block Source databits. A “1” in the mask means the data bit is passed. A “0” in the maskmeans the data bit is blocked.If you mix integer data types, the instruction fills the upper bits of thesmaller integer data types with 0s so that they are the same size as thelargest data type.Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!