Allen Bradley slc500 Shift register help.

ScottC

Member
Join Date
Jul 2003
Location
Phoenix
Posts
29
Hello everybody, I am new to plc programming. I have some experience in changing ladders at customer sites to make the machine run better or different. Now, after substantial downsizing, I have been tasked with writing the entire control program for an inspection machine. Using the tutorial, I have discovered that the shift register example is perfect for the most troublesome part of the ladder. This is a rotary table m/c that is going to accept, suspect, or reject parts. I believe the shift reg will track the inspected parts and then open the appropriate escapement as needed. Just like the tutorial. I just need a little help figuring out what RS Logix is asking for in the required fields of AB shift regs. Any assistance anyone can lend will be greatly appreciated. Thanks, Scott.
 
If you understand the typical adressing scheme and most of the AB basics, the help file gives a pretty straight forward explaination of what each field is. Take a look at this and reply with any specific questions.

sqo.gif
 
Use the search option at the top of the page to search for BSL. There are many threads that go into detail how it works. You might also want to post in detail step by step what you want the machine to do.
Sid
 
Thanks and here are the details:
6 station rotary table fed by a bowl feeder.
Station 1 - Load part
Station 2 - Air blow off (Fires after completion of every index)
Station 3 - Vision system (Three outputs, Good, Suspect, Reject)
Station 4 - Accept bin
Station 5 - Suspect bin
Station 6 - Reject bin (Always open catch all)

Upon Cycle start SBR runs two indexes to allow the first part to reach the Camera. Meanwhile, parts for subsequent testing continue to load into the table. The camera then gives 1 of 3 states of the part. I index and then the test starts over.

My problem, is basically disallowing "accept" and "suspect" during a reject part as well as disallowing "accept" during a "suspect" part. The major holdup to me seems to be if I was to incur multiple "suspect/reject" parts. This is where I believe the BSL would come in handy. There are counters to shutdown the cycle if too many bad parts. That could be a camera problem. I guess I need to learn more bout AB addressing.

Like I said earlier, this is way over my head as far as the plc programming I have ever done. You can see my company likes to force feed jobs around as well. Too bad we dont have an IT group anymore, maybe I could pass it to them ;)

Thanks,
Scott
 
non-BSL method

I don't know the timing requirements or the exact output from your vision system or how long the S.R. should be but, it might be easier to build a shift register using two integer files.

1. Encode the vision output into an integer '1', '2', or '3' (for readability reasons).

2. Copy the primary register, say N12, to a temporary register, say N13, for len X.

3. Move the new value from step one into the bottom or first position of the primary register (N12:0).

4. Copy the temporary register back to the primary but offset by one. That is, N13:0 for len X-1 is copied to N12:1. So you don't cause a fault, one less word is copied in this step than in step one.

Once this is done, add appropriate comparison statements to operate the pickoff/divert point which mates up with the correct S.R. stage.
 
I use BSL left for all my rotary index tables.

Basically I pick a bit file and go to town.

Most of the time I use one word file to track something:

Say B10:0 could be the tracking for part present on the table
B10:1 could be the part status, good or bad.

So when a part is loaded at station 1, I load a "1" into B10:0/01, bit 1 I always use as station 1, most of the time I never run into problems because I've never seen a 15 station rotary table yet ;-).

Also in the same index, I would load a "0" into B10:1/01, so what I have now is a register that looks like this:

B10:0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

B10:1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Let's say on the next index or station, my part status is still bad, but I still loaded another part.

B10:0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0

B10:1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


Let's say on index #3, I get to the vision station and it was a good part:

B10:0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0

B10:1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0


So now, my very first part I placed on the index table has arrive at station #4, the accept bin....basically I now compare bits,

If B10:0/04 is "1" and B10:1/04 is "1", then ACCEPT the part.

So providing that my next part passed vision, my register would look like this:


B10:0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0

B10:1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0


Hope that helps.

You can download an example Index Table I wrote here:
RS Logix File:
http://www.mrplc.com/dl/index.php?action=view&view=entry&entryid=23

PDF Only:
http://www.mrplc.com/dl/index.php?action=view&view=entry&entryid=21

Good luck
 
Alright,
Thanks guys, I'm using the BSL method and I seem to have it figured out. Guess I'll see when we put it in the machine. Let's see, we'll need safety glasses, fire ext. , blast shield.....and a little bit of luck on this end. And the Boss has 4 hours of debug slated on the schedule.......Yeah right. Thanks again for all the help. Time to go trim the fat....after a coffee I think.

Scott
 
A quick and dirty BSL (Bit Shift Left) operation can be performed by multiplying the word by 2. You get away from having to use a CONTROL element but you have to set the seed value yourself with an OTL -(L)-instruction.

One other caveat here is that if the bits get to the end of the word they will cause a math overflow so be sure to unlatch the S:5/0 status bit after this move to avoid a fault at the end of the scan.

... and one last thing. If you use this, put a comment on the rung to let others know what you are doing!! :)
 
Last edited:

Similar Topics

HI, I'm currently also trying to get an Allen Bradley SLC500 fixed. Our technician is trying to replace all the Takamisawa JY25H-K-505 relays. So...
Replies
2
Views
1,729
I have 2 identical systems that have the AB SLC500 Basic card in them. I system stopped working and the issue was traced back to the card...
Replies
15
Views
3,005
HI, My first post on here, Using SLC500 I have a STRING LEN 30 that I need to convert just the first 2 characters (POS 0 , 1) into an INT. any...
Replies
6
Views
2,376
I have two output cards sitting next to each other in a rack: 1746-OW16 1746-OW16 (Octal) output 13 in the first card triggers a solenoid. When...
Replies
2
Views
2,187
I propose to replace an old pc with the latest HMI from Schneider running Vijeo designer. Firstly, am I correct in thinking that I can use RS500...
Replies
4
Views
3,020
Back
Top Bottom