Kevin,
It is the address of the bit that is going to be inserted into the bit-shift register (memory storage array) for each and every time the rung logic for the BSR goes true.
It is the address of the bit that is going to be inserted into the bit-shift register (memory storage array) for each and every time the rung logic for the BSR goes true.
BSR [Bit Shift Right]
Rockwell Software 2000
Use with processorsAll SLC and MicroLogix processors Example of Instruction(Parameters shown are examples only, your data will vary.)
Description
On each false-to-true transition, this output instruction loads a bit of data into a bit array, shifts the pattern of data through the array to the right, and unloads the end bit of data.
An example of the use of this instruction might be for tracking bottles through a bottling line where each bit represents a bottle.
Entering Parameters
Depending on the type of processor you are using you may use indexed or indirect addressing to represent addresses in this instruction.
To program a BSR instruction enter the following parameters:
File is the address of the bit array you want to shift. You must use the file indicator (#) in the bit array address. . You must start the array at a 16-bit element boundary, for example, use bit 0 of element #1, 2, 3, etc.
Control is the unique address of the control structure (48 bits, 3 16-bit words) in the control area of memory that stores the instruction’s status bits, the size of the array (in number of bits), and the bit pointer (currently not used).
The control element:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 0 EN DN ER UL Not Used
Word 1 Size of bit array (number of bits)
Word 2 Bit Pointer (currently not used)
Warning! Do not use the same control address for more than one instruction. Duplication of these addresses could result in unpredictable operation, possibly causing equipment damage and/or injury to personnel.
Bit Address is the location of the bit which will be added to the array.
Length is the total number of bits to be shifted by the BSR. Bits located to the right of the last bit in the array, up to the next word boundary cannot be used.
Control Word Status Bits
10 = UL (unload) bit
11 = ER (error) bit
13 = DN (done) bit
15 = EN (enable) bit
Note The shift operation clears the index register to zero. Make sure to load the correct offset value back to S:24 after shift execution if you use indexed addressing in your program.
Rockwell Software 2000