BSL question (Studio 5000)

phuz

Member
Join Date
Jun 2008
Location
Mohnton, PA
Posts
1,044
I feel like I'm circling back to a very newbie question, but am genuinely curious.
I'm using a BSL on a DINT for a length of 14 bits. For some reason, all of the bits in the DINT are being shifted, not just bits 0-13.
In this instance, it doesn't matter since I am not using the remaining bits, but would like to know why it's not shifting only the length I called out.

Even the BSL instruction help file shows it should only care about the bits from the length.
 
Last edited:
"I'm circling"...I see what you did there!?!...

Every bit in the array member is shifted. But everything after the Length bit is "invalid". Everything stored or not, in bits 14-31 for your example, are invalid data.

If your array members, such as DINTs, contains more than the data you want to shift, or care about, then you have to design it so the remainder of that member is not used. Move to the next member (DINT, etc.)...

47293 - Studio 5000: Bit Shift Instruction Shifts all Bits in the Array
Access Level: Everyone

56185 - Bit Shift returns an error: BSL, Operand 0: Not array element
Access Level: Everyone

Regards,
George
 

Similar Topics

Hey All. I am working on a small piece of logic and I hit a roadbump here. I am trying to use a BSL but perhaps something else is in order. I...
Replies
3
Views
2,584
I need to shift a bit through a lenght of 48. I tried using BSL but after B3:0/15 I get a weard result. What I'm tring to do is have only one...
Replies
2
Views
2,403
Hi all, I am trying to convert RSLogix 5000 program to Step7. I need to bit shift left my array of double integers for tracking the product on...
Replies
2
Views
521
I’m working on a conveyor project for work. We’re trying to install a few diverts to carry product directly to one of two trailer doors. I have...
Replies
5
Views
1,054
Hello friends, When I trigger once for an application, I want to shift the 15th bit in the word address by 10 bit , so; 1000 0000 0000 0000 ->...
Replies
3
Views
1,677
Back
Top Bottom