Bit shift with RSLogix

smiller

Member
Join Date
Aug 2003
Location
Arizona/Brazil
Posts
116
I have been trying to figure out the BSL instruction in Logix 500 V6.20 for a while and I just have'nt been able to get it. I would like to shift a bit and have it wraparound in a loop. I have set the File to a #B3 with a bit set in the word, set the R6 control to EN and used many different Bit Address addresses and Lengths.
I have a timer that toggles to activate the BSL instruction but nothing happens. Can someone please help me out with the setup of this block? It is not on a process, just a test rack that I am playing around with.

Thanks.
 
I'm really rusty with that instruction, but others should be able to help. Posting your code would be a good start. Might be something obvious.

Anyway,
Here's a LINK to a sample program you can download and study.
 
Set the R6 to EN...
wooo.. hold on, what do you mean by that? I hope you didn't OTE the R6:X/EN bit, it's not needed. Just like a timer, BSL control word do NOT need to be 'enabled', it is enabled everytime the rung condition goes from false to true.

For wrap around, set the bit to the last bit in the word; so if you use File #B3:0, set bit to B3:0/15.
 
Some things to be aware of. If you need the length to be 8 then set it for 9. I think the only vailid lengths are 1 to 31.

For wraparound operation, set the position of the bit address to the last bit of the array or to the UL (unload) bit, whichever applies.
You must use the file indicator (#) in the bit array address.
If using indesed addressing you need to put a value in S:24


Try using File #B3:0, Bit Address B3:1/15 with a length of 9.

Good catch harry, I missed that EN thing.
 
Last edited:
is this what you're looking for? ...

try this ...

bsl_loop.jpg
 
Another Way

Here`s one more way.
bsl1.jpg

Length is the total number of bits to be shifted by the BSL. Bits located to the left of the last bit in the array, up to the next word boundary cannot be used.
Rockwell Software 2000

This can be confusing as I think you will find the Length is in Words not Bits. I could be WRONG?
 

Similar Topics

Good morning (EST), I am trying to implement the code below in on an S7-1200. It's barely half a dozen instructions, but I am stuck; I have not...
Replies
26
Views
5,526
Can someone clarify the BSL instruction for me? Length is that in bits or words? If length is in bits why select any number below 16 as the...
Replies
7
Views
11,787
Hi All. I have a very specific question about tracking using an encoder and bitshift register. We would like to use a Compact or Control Logix PLC...
Replies
40
Views
1,600
Hello. I've been using the answers in this forum for a while now, so thank you. Usually I can find the answer I'm looking for with a basic...
Replies
8
Views
733
Hi, I need some help write a PLC instruction. I am using Proficy Machine Edition 6.5. Our indexing rotating table has 3 nests that are equally...
Replies
15
Views
3,888
Back
Top Bottom