Hello everyone. I m new on site. I need to an example program (done and running properly) that bit shift register. I will design a bottle filling machine. 3.0 Serial In - Parallel Out Shift Registers For this kind of register, data bits are entered serially in the same manner as discussed in the last section. The difference is the way in which the. Serial shift register can perform both operations. A bidirectional, or reversible, shift register is one in which the data can be.
July 4th, 2014, 03:46 AM
Hey.
I need some input on how to solve this task i am struggeling with.
In the picture I attatched to this post, i tried to display what my task is about.
I need to every time I get a pulse, move 4 bits 4 positions in an shift register.
I havent been able to make it work in rslogix 5000 with the LSB or RSB instruction, but this is also the first time i have tried to use thoose instructions.
I would say I have some experience in Rslogix 5000, so I am no rookie, I just never worked with this kind of assignment before.
In total i need 3 shift registeres, and the one that is displayed in the picture, are Nr. 2 of them, but i think that if I could just get some help to this one, then I would be on my way to solve thoose other two afterwards.
Please give me your inputs on what U think.
Thanks in advance.
I need some input on how to solve this task i am struggeling with.
In the picture I attatched to this post, i tried to display what my task is about.
I need to every time I get a pulse, move 4 bits 4 positions in an shift register.
I havent been able to make it work in rslogix 5000 with the LSB or RSB instruction, but this is also the first time i have tried to use thoose instructions.
I would say I have some experience in Rslogix 5000, so I am no rookie, I just never worked with this kind of assignment before.
In total i need 3 shift registeres, and the one that is displayed in the picture, are Nr. 2 of them, but i think that if I could just get some help to this one, then I would be on my way to solve thoose other two afterwards.
Please give me your inputs on what U think.
Thanks in advance.
July 28th, 2015, 01:58 AM
Hi,
I need to bit-shift a block of words in an Omron PLC by a certain amount. Is SFTR the only way to do this? I've tried NSFR/NSFL but from testing it, it seems those instructions are only restricted to a single word.
SFTR seems to do what I want but it looks like it works off a pulse input, which is a bit annoying as I want to run it on consecutive scans within a FOR loop to do my bit-shifting. The help file for this instruction seems to be quite contradictory:
When the execution condition of the shift input bit (bit 14 of C) changes to ON, all the data from ST to E is moved in the designated shift direction (designated by bit 12 of C) by 1 bit, and the ON/OFF status of the data input is placed in the rightmost or leftmost bit. The bit data shifted out of the shift register is placed in the Carry Flag (CY).
The data in the shift register will be shifted one bit in the direction indicated by bit 12, shifting one bit out to CY and the status of bit 13 into the other end whenever SFTR(084) is executed with an ON execution condition as long as the reset bit is OFF and as long as bit 14 is ON. If SFTR(084) is executed with an OFF execution condition or if SFTR(084) is executed with bit 14 OFF, the shift register will remain unchanged. If SFTR(084) is executed with an ON execution condition and the reset bit (bit 15) is OFF, the entire shift register and CY will be set to zero.
So...am I meant to be pulsing bit 14 or just leaving it on all the time? I've tried both but haven't gotten any bit-shifting to occur, perhaps I'm doing the pulsing incorrectly...
I need to bit-shift a block of words in an Omron PLC by a certain amount. Is SFTR the only way to do this? I've tried NSFR/NSFL but from testing it, it seems those instructions are only restricted to a single word.
SFTR seems to do what I want but it looks like it works off a pulse input, which is a bit annoying as I want to run it on consecutive scans within a FOR loop to do my bit-shifting. The help file for this instruction seems to be quite contradictory:
When the execution condition of the shift input bit (bit 14 of C) changes to ON, all the data from ST to E is moved in the designated shift direction (designated by bit 12 of C) by 1 bit, and the ON/OFF status of the data input is placed in the rightmost or leftmost bit. The bit data shifted out of the shift register is placed in the Carry Flag (CY).
The data in the shift register will be shifted one bit in the direction indicated by bit 12, shifting one bit out to CY and the status of bit 13 into the other end whenever SFTR(084) is executed with an ON execution condition as long as the reset bit is OFF and as long as bit 14 is ON. If SFTR(084) is executed with an OFF execution condition or if SFTR(084) is executed with bit 14 OFF, the shift register will remain unchanged. If SFTR(084) is executed with an ON execution condition and the reset bit (bit 15) is OFF, the entire shift register and CY will be set to zero.
So...am I meant to be pulsing bit 14 or just leaving it on all the time? I've tried both but haven't gotten any bit-shifting to occur, perhaps I'm doing the pulsing incorrectly...