Shift Register.

Sorry for the delay in answering, just got back off my holidays.
Of course you are all correct regarding 'hiding away information' by PM's, this was unintentional and only done because I was PM'ed about it.
So here is the explanation of the logic example given.

First rung
On a rising edge input X001 moves 1 into k2Y000, in effect turning on Y000 for one scan (K2Y000 references 2 x Nybbles = 2 x 4bits = Y000 to Y007)

Rung 2
If Y000 is true Set Internal flag M20 - this selects shift left register

Rung 3
If Y007 is true Reset Internal flag M20 - this selects shift right register

rung 4
If M20 True then increment the shift register via rising edge of system flag M8012 (100mS clock pulse)
the shift register breakdown is as follows:- [SFTL Shift left instruction
[M1 dummy flag
[Y000 first bit in shift register
[K8 number of bits in shift register
[K1 number of bits to shift
rung 5
If M20 False then increment the shift register via rising edge of system flag M8012 (100mS clock pulse)
the shift register breakdown is as follows:- [SFTR Shift Right instruction
[M1 dummy flag
[Y000 first bit in shift register
[K8 number of bits in shift
[K1 number of bits to shift

When Output Y007 turns on it activates the shift right register by turning off M20, this then shifts
the state of Y007 rightwards toward y000, until Y000 is reached making M20 true, starting the shift left once more.

Rung 6
when input x001 activated it moves zero onto output byte Y000 to Y007 (K2Y000 2xnybbles = 2x4bits = Y000 to y007)

Hope this helps (y)

Just bear in mind this was only a quick off the top of my head example

Steve
 

Similar Topics

I am attempting to reject a bottle If the label fails. The rejection works fine at normal line speed but at low speed the rejector fires (air...
Replies
35
Views
1,175
Hi guys, I am pretty new when it comes to programming. I am working with CX-Programmer and I am having a problem where I have a sensor on my...
Replies
6
Views
698
Hi all, i have a very slow indexing machine where we are looking to make everything as bulletproof as possible, money is not much of a factor...
Replies
12
Views
3,073
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,712
Hi everyone I am completely new to using shift registers and am a bit stuck, my shift register works as should, it is for an overhead conveyor...
Replies
55
Views
15,668
Back
Top Bottom