Shift bits

canaryF

Member
Join Date
Feb 2011
Location
virginia
Posts
11
I need to shift bits in ladder logic. A camera is taking a snapshot once per cycle. The item will pass or fail at station
#1. If it fails, the reject station will kick the item
out at station #4. I need to enable a bit and walk it through
ladder logic to enable the output at station #4. Any Ideas anyone.

Thanks in advance
 
Next, how is the pass/fail decision of the camera brought into the PLC?

What is the output for rejection?

What tells you that the item has shifted one station?

Maybe you can post what you have so far to limit the guesses.
 
another guess ...

are you just asking for help on "which instruction to use" ? ...

if so, try the BSL or BSR instruction ...

if you need more help than that, give Bernie the information he's asking for and he'll probably write the code for you ...

but ...

is this a student exercise? ... there's nothing wrong with the SLC-5/01 platform - but many schools have that type of equipment for their student labs ... we'll help you either way, but it's best if we know what we're up against ...

and welcome to the forum ...
 
Last edited:
No this is not a student excercise. A real world machine running production. The sequence of events are; a camera snapshots at position
#1 (B3:3/1). If part fails inspection B3:3/0 is latched on. Part indexes to position #2 (B3:3/2). Then part indexes to position #3 (B3:3/3). Once at position #3 (B3:3/3) goes true and energizes a solonoid which opens reject door (O:6/0). What I am trying to do is walk the fail bit (B3:3/0) to each position(as machine indexes) with the defective part. My code isn't working. Would appreciate help.
Thank You in Advance
 
I put some notes in the rung comments for rungs 71 through 77 ... I didn't change any of the logic though ...

see if this helps ...

my distinguished colleague Bernie will be along soon (he's a west coast guy - I'm east coast so I got a head start) ...

Bernie and the rest of the members will help you sort this out ... I've got other thing$ to do - but it sure looks like fun ...

hope this helps ... good luck with your project ...

.
 
and here's a PDF of the entire file - sometimes this is helpful for members who don't have RSLogix500 handy ...

the comments on rungs #71 through #77 are the ones I wrote (and included in the shorter printout in the previous post) ...

gotta run ...

.
 
Last edited:
Your comments in the PDF fiLe are correct. That is my problem.When B3/49 (index one time) and B3/48 is status of ONE B3/50(position one) is latched on. This is correct. Machine indexes to next cycle and B3/50 having status of ONE latches B3/51 (position #2) on, as well as B3/52 (position #3) on. This is where my problem exists. What I'm trying to do is after the camera issues a fail signal,turn on each bit as the machine indexes through the next cycle. In this way the position of the failed part is tracked and the part is discarded after B3/52 (position #3) Incidently Rung 0074 will be deleted...it was an experiment. Thank You so much.
 
Last edited:
question: do you have any type of REAL-WORLD input signal that tells you WHEN you have moved from one position to another? ... maybe a proximity sensor, a limit switch, etc. ...

if yes, then tell us the address (I:____) of that input ...

big idea: we need to tell the PLC WHERE it is (physical position) in order to shift the status bits ... for example: suppose that each time the machine advances a notch, switch A closes when we reach a new physical position ...

type up your sequence of operation something like this: put in ALL of the details ... remember that the PLC is "STUPID" ... it has to be told everything ...

machine reaches position 1 ...
switch A closes ...
pulse trigger to camera ...
camera responds "good" or "fail" ...
write a status bit to ONE for "fail" – or ZERO for "good" ...

move machine from position 1 ...
switch A opens ...
move machine to position 2 ...
switch A closes ...
advance the "fail/good" status bit information one notch ...

move machine from position 2 ...
switch A opens ...
move machine to position 3 ...
switch A closes ...
advance the "fail/good" status bit information one notch ...

move machine from position 3 ...
switch A opens ...
move machine to position 4 ...
switch A closes ...
advance the "fail/good" status bit information one notch ...

if the status of the "fail/good" bit equals ONE, then reject the part ...

once you've got that "what-happens-when" step done, then look at the BSL (Bit Shift Left) instruction ... see if that helps ...

SUGGESTION: experiment (read "PLAY") with the BSL logic in a simple "dummy" program BEFORE you try to insert it into your actual program ...

you should be able to manually toggle the "fail/good" status OFF or ON ...

you should be able to manually advance the machine – and the status of the bit – through the PLC's memory locations ...

you should be able to SEE the status of the bit take the appropriate action when it finally reaches the "reject" position ...

DISCLAIMER: all of this is written based on what little we understand about the operation of your machinery ... if it doesn't make sense, then I strongly suggest that you tell us more about how the machinery functions ...

PS Edit ... I see that Bernie is online now ... if he tells you something different, then go with his way ... I'm out of here for awhile ...
 
Last edited:

Similar Topics

Good Morning , I'm developing a Shift Register Program for a conveyor system. I begin the Shift Register on a conveyor that is roughly 128...
Replies
14
Views
3,619
So I have a device that uses the last 14 bits of a word for the process value. Bit 0 and 1 are used for a different purpose. what is the best...
Replies
7
Views
2,335
Good Morning , I need to use a shift register to keep track of good and bad parts . As a rough draft I'm using 300 bits. When the 1's and 0's...
Replies
4
Views
1,782
Hello, Its my first time working a project that involves PLCs. I need to develop a way to track parts with serial numbers that are passing through...
Replies
13
Views
5,278
Hello, I am creating some local messages of faults in View Studio ME. I would like to setup the compactlogix processor to only rotate through...
Replies
8
Views
1,876
Back
Top Bottom