Bit Shift Left

ki4mva

Member
Join Date
Nov 2008
Location
south carolina
Posts
4
i am just getting started in programming the micrologix 1000 and want to do a Bit Shift Left. my question is what info do i put in the box under "FILE"....is this an N or can it be a Bit file...i would like an example....also, CONTROL...is this the switch that controls the 1 or 0 when it goes into the first block? and BIT ADDRESS, what is this? last but not least what is LENGTH and what does it do? i know how it works but can't find an example of a 1 moving left and causing an output to turn on....i know so little, just enough to get into trouble..HELP
 
Bit shift is used to shift the state of a bit, say first bit to the left or right [Depend on BSL or BSR] where the shifting is based on a constant change in state. Say for example you have an inspection on station #1 of the indexer and the reject station is a couple of stations later say station #8. Shifting the stored bit states inside a word or a group of consecutive words to the reject station can be achieved using bit shifting. Upon shifting the states of bits in the whole word/s are shifted, giving you a transition of state from one station to another when the indexer turns.

File - It is a group of bits, in which you want to transfer the state of bits. You can use any bit file say, B3. So B3:0 is a word in file B3. where B3:0/0 is the first bit in the word B3:0, and B3:0/15 is the last bit in that word. Each such word contains 16 bits. If you need to shift more than 16 bits, it uses B3:0, B3:1, B3:2 and so on [16 bits + 16 bits + .......]But there is limit on the maximum size.

Control - It is a register file say R6 where the instruction is used to store its various states, example position of shift, unload bit state etc. Each R6 word, say R6:0 consists of 3 word length [you do not have to worry of this]

Bit Address - This is the source of you shift instruction. If this address is ON/True when the instruction goes true, it shifts a 'state - one' to the first bit address of the file, or shifts a 'zero' when the state of Bit Address is OFF/False

Length - I think you should have guessed what is length by now. It is the count of number of bits you want to shift. Say your file address is B3;0. If you specify 16 or less the instruction use of word in the file. That is B3:0 itself, or if you specify anything between 16 and 32 it uses two words B3:0 and B3:1.

I do not have RS Logix at home, maybe tomorrow I can post an example. If this is not clear enough, ask, but be more specific.

Best Regards
____________
 
thank you very much, i can now chose a FILE, i understand that BIT ADDRESS controls the 1 or 0 being placed in the register.....if i want an output to turn on when a one moves into bit B3:0/12 then i should address a contact B3:0/12 that will control the output...right? as to CONTROL how do i pick a proper register? still don't understand that part. you have been so helpful...thank you thank you, thank you, ki4mva
 
Hi,

You can pick any unused register word in 'R6' types. On the Data files double click on R6 - > click on 'Usage' button and the view changes to dots, any used register will show a 'W' below the title 'FW'. Take note for bit files, [B3,] used bits will display as 'X' in the respective column place holders.

Attached is an image for your understanding. Normally I hold the status I want to shift [B3:0/8 in the image] and reset it upon shift operation

Bottle1.JPG


Best Regards
____________
 
great, thanks again for all the help. today, with your help, i was able to program a BSL. i looked at the data file just like you showed in your answer. this is neat stuff. now i just have to come up with a use for BSL around the house. i am retired and use a plc to close my garage door if i forget and leave it open. refill my bird bath simple things like that. someone should write a book of home projects for PLCs. thanks again for all the help. ki4mva
 

Similar Topics

I am having trouble figuring out how to track a product using a BSL instruction. The way that I have it set up is: I have an infeed eye that...
Replies
10
Views
2,741
Hi everyone im a student from mexico and i have a problem using the ladder function BSR AND BSF (BIT Switch left and right), I use connected...
Replies
3
Views
2,963
hi, having abit of trouble getting the bit shift left to work in logix 5000 all is good except it wont accept my array when i verify It...
Replies
3
Views
4,552
hi I m trying to learn BSL and BSR. I want to clear my basics about Bit functions. Can anyone help me to understand that why do we use BSL and BSR...
Replies
4
Views
1,742
May I know where to keep more infor about this mitsubishi FX1N SFTL instruction as i want to use this SFTL in my PLC program. The mitsubishi...
Replies
1
Views
2,579
Back
Top Bottom