Previous in Forum: How Do I Get the New Lion Upgrade for Macpro?   Next in Forum: Microsoft Outlook 2007
Close
Close
Close
4 comments
Rating: Comments: Nested
Active Contributor

Join Date: Mar 2012
Location: Istanbul/Turkey
Posts: 18

Shift Register

10/16/2012 11:00 AM

Hi All,

I am working in a steel pipe factory.

I have to write a shift register program with Siemens Step 7.

Between package machine and hydraulic test I want to seperate good tube and bad tube in the end of rollway.

But how can I write this program. Because the worst case ıf there are two bad tube on rollway at the same time how can ı manage seperation with this program.

Can anybody help me?

Best Regards,

Musa UÇAN

__________________
Unbalance Fault
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1639
Good Answers: 73
#1

Re: Shift Register

10/16/2012 12:07 PM

I might be able to help, but it is not clear to me what options you have. If I understand you correctly, by "rollway" I think you are referring to two perpendicular rails (perpendicular to the roll direction) upon which the pipe rolls. Is that correct?

If you are using a shift register with a bit to represent each pipe, then as the pipe indexes from one position to the next, so does the shift register. That way the "good and bad" bits follow the pipe. It must shift in synchronization with the motion. Your reject device must be able to reject only one pipe but it will be instructed by the value of the bit in your shift register. I don't know if you have decided whether a logic "1" is a good or bad product. Once you have decided on that, we can get more specific.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#2
In reply to #1

Re: Shift Register

10/16/2012 6:57 PM

Reckon it needs two shift registers running in parallel (assuming one bit per product item) - one to indicate "product present" and the other for "good/bad". This is assuming the registers are only one bit wide - if the PLC can be configured with wider registers, then e.g. two bits could be assigned to each position, and shifted together synchronously with the "rollway".

Don't know Siemens PLC architecture very well; if memory serves an Allen-Bradley PLC can be configured with one word per "bucket", and the whole string (file) of words can be shifted at once using the Sequencer instructions.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Active Contributor

Join Date: Mar 2012
Location: Istanbul/Turkey
Posts: 18
#3

Re: Shift Register

10/17/2012 1:22 AM

Dear NotUROrdinaryJoe and JohnDG,

I will work max 6 pipes at the sime time. Because max 3 pipes may exist on rollway and 3 pipes are taken out from hydro test. However good or bad tube is sign on hydro test.

If I use this program on Step 7

A I 0.0
FP M 5.0
= M 0.0


AN M 0.0
JC NEXT


L MW 1
SLW 1
T MW 1


NEXT: L MW 1
L W#16#0
<>I
BEC
L W#16#1
T MW 1

I only see 1,2,4,8, etc. But I have to see 1,2,3,4,5, so ı don't know how ı use shift register.

If there is only one bad pipe in each 6 pipes ı can solve this two counters.

One is for all pipe the other is for take out bad pipe on rollway.

Please ask me what you want to learn from me to help me?

Best Regards,

Musa UÇAN

__________________
Unbalance Fault
Register to Reply
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1639
Good Answers: 73
#4
In reply to #3

Re: Shift Register

10/19/2012 1:01 PM

Your shift register is working in binary (base 2). When you shift (left or right) what you are representing is a series of "1's and 0's" in such a way that the current bit pattern represents the status, or presence of some object such as your pipe.

If you are working with 3 pipes then the possibilities are as follows

000 = 0, No bad pipes (or it might represent no good pipes in your program?)

001 = 1, Right most pipe is bad

010 = 2, Center pipe is bad

011 = 3, Both center and right most pipes are bad

100 = 4, Left most pipe is bad

101 = 5, Only center pipe is good

110 = 6, Only right pipe is good

111 = 7, All pipes are bad

1000 = 8, same as 000

If your PLC is working with 4 or 8 bits you have to mask out the bits that are not part of your test. By masking I mean that you must create a variable that holds the current test value by taking the data in the shift register and performing a logical AND with 0000 0111 (for an 8 bit data byte). This will force any data above the right most three bits to become zero for considering the current condition of the three pipes in the test.

I can not understand what is meant by your "Step 7" but perhaps you can after considering the idea above. I hope that helps.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply
Register to Reply 4 comments
Copy to Clipboard

Users who posted comments:

JohnDG (1); M.UCAN (1); NotUrOrdinaryJoe (2)

Previous in Forum: How Do I Get the New Lion Upgrade for Macpro?   Next in Forum: Microsoft Outlook 2007

Advertisement