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.

392 Array (File)/Shift <strong>Instructions</strong> (BSL, BSR, FFL, FFU, LFL, LFU)Bit Shift Right (BSR)The BSR instruction shifts the specified bits within the Array oneposition right.Operands:Relay LadderOperand Type Format DescriptionArray DINT array tag array to modifyspecify the element where to begin the shiftdo not use CONTROL.POS in the subscriptControl CONTROL tag control structure for the operationSource bit BOOL tag bit to shiftLength DINT immediate number of bits in the array to shiftCONTROL StructureMnemonic Data Type Description.EN BOOL The enable bit indicates that the BSR instruction is enabled..DN BOOL The done bit is set to indicate that bits shifted one position to the right..UL BOOL The unload bit is the instruction’s output. The .UL bit stores the status of the bit that wasshifted out of the range of bits..ER BOOL The error bit is set when .LEN < 0..LEN DINT The length specifies the number of array bits to shift.Description:When enabled, the instruction unloads the value at bit 0 of Array tothe .UL bit, shifts the remaining bits one position right, and loadsSource bit into the uppermost bit of the specified bits.IMPORTANTYou must test and confirm that the instruction doesn’t change data that you don’twant it to change.The BSR instruction operates on contiguous memory. In some cases, the instructionchanges bits in other members of the tag. This happens if the length is too big andthe tag is a user-defined data type.Arithmetic Status Flags:Fault Conditions:not affectednonePublication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!