Beginner here. RSLogix 500. Input sensor must lose signal between cycles.

PLCplease

Member
Join Date
Dec 2017
Location
Indiana
Posts
22
Good Day. I wrote a program to check if ten input sensor conditions were met. The program works fine and if all the input conditions are met the output signals are sent.

But I don't know how to make all of the input sensors force themselves to clear between cycles.

In a simplified fashion, I have a retroreflector, a button, and a light.

When I push the button, the light will come on if there is something in the beam of the laser.

But if I push the button again, I need the light to stay off IF the beam has not been cleared before another item breaks the beam.

I don't know how to make the PLC know how to remember if the signal has been broken or not.

I don't even know if this is a simple problem. I've written 6 programs since the beginning of the year that all work how I want them to, thanks to your informative posts. But I'm not sure how to solve this problem.

I've never needed a program to remember what happened last time. Everything usually just resets when the cycle is finished.

I'd be happy to post my program so you can see my logic up to this point. I must warn you all that I use the most basic logic possible because I am not advanced yet at any of this. I almost never leave the basic tab with XIO XIC.

I would appreciate any guidance that anyone could offer, though. Otherwise, it's off to Google!

Thanks
 
I'm not even sure if I'm asking this question correctly.

Right now if I push the button ten times the light comes on ten times.

I need the light to come on the first time only, unless the sensor changes state in between button presses.

I just need a general guidance here, I can probably figure out the details. If someone can point me in the right direction.
 
You can't change the input states, so you have to do the thinking in the PLC.

If you put a ONS after the inputs that then latches a bit which allows the button to light the lamp.

Use a OSF on the button to unlatch this bit.

The light will illuminate when the button is pressed but the button won't be able to light the lamp again until the input before the ONS on the previous rung goes to false.

The bolds are the actual names so you can find them in the help files to get a detailed description.

EDIT: Example attached

zsls2c.png
 
Last edited:
Janner_10, I would like to thank you very much for your reply. I have read about latching and other techniques but I have not had the opportunity to understand them yet. I believe this is the solution to my problem.

One last quick question: is the concept the same when using multiple inputs to turn on the light? Two buttons? Is there a limit to how many ONS bits you can store? I would assume not.

Thank you very much, again. I will take a picture of my machine for you tomorrow and show you the code I have written.

As soon as I figure out how you posted that example.

You have been a great help. I didn't know what sort of function I needed and you showed me the way. Much appreciated.
 
PLCplease,

I do not know of any plc that resets its inputs every cycle.
if an input is on, it stays on.

lets look at it another way.
a sensor is made - photo #1
you press a push button - pb#1
you have a light - LT#1

you press pb#1 and photo#1 is not made - no light (LT#1)
you press pb#1 and photo#1 is made - LT#1 turns on

you press pb#1 again and photo#1 is made you do not want LT#1 to turn on

when the sensor is clear you want to reset the sequence
OR
if you press pb#1 and the sensor is clear you want to reset the sequence.
i'm not sure which way you want to do this.

HINT - how many times did I press pb#1 when the condition was true?
what can keep track of how many times you press a button?

use that line of thinking for the solution.
this is homework, so i'm not going to spell it out for you.
you need to think for yourself and not depend on others.

james
 
I assume you've been taught a simple start stop circuit using a holding contact to keep a motor running until you press the stop button. Use that type of logic here. That's what a holding circuit does. It remembers you pushed the start button even after you let it go.

This is the same type of problem. Except your Photo-eye is your stop button.

The tricky part here is you need to remember two conditions and hold those thoughts to perform your action.
hint: you need to remember the button's actions not the PE. Pushing the button and letting go of the button while your Photo-eye is blocked. Hold on to those two thoughts and once you do that you can find your solution.

You need 3 rungs.
Rung 1. Button down
Rung 2. Button up
Rung 3. Light control

Good Luck with your project!
 
Thanks, guys and gals, for all the input! I haven't gotten back to the programming side of my project because I'm just finishing up the machine.

This is the machine I have built:
https://imgur.com/a/fMeIB9T

Basically, they gave me these parts and told me to build a machine that makes sure all of the pink clips were in place, and stamp it with a mark indicating the part is good.

I wanted to build a simple nest with 4 holes and little limit switches that would detect the clips if you flip the part over and press it down, and then maybe give the part a green dot with ink or some such.

They told me it's too much effort for the operators to keep flipping the parts over all the time (management, am I right?). So I was left with photoeyes.

I actually thought this would have been a good time to test out some vision systems, but they are resistant to that idea.

Anyway, this is what happens in my current program. You put the part in place and hit the start buttons. This engages a cylinder that locks the part into place until assembly is complete.

https://imgur.com/a/3acbu21

All of the clip lights go red. Then the operator installs 8 clips, 4 on the right side and 4 on the left. As each clip is installed the lights go green. Then they hit the test button and if everything is in place then the marking cylinder (also pictured above) stamps the part and releases the locking cylinder.

If anything is missing, in other words, if the photoeye can see it's own reflection, the defect alarm goes off and won't stop until the supervisor comes and flips the reset switch. I left the bottom left clip out in this picture.

https://imgur.com/a/qP3qaxH

And the clip light is red

https://imgur.com/a/7atSGIH

If they hit the test button right now the defect alarm is going off.
 
So, now they are worried about operators intentionally obstructing the beam, say they wrap one of the photo eyes in duct tape.

Now the sensor always thinks there is a clip in place. So I need to change the program so that each sensor sees it's own reflection in between parts.

You've all given me a lot of good suggestions and I'll be fiddling with my logic in the coming week.

cwal61, nobody ever taught me anything. About 6 months ago we needed another sort of detection machine, and I spent about a week doing research on the internet (I read a lot of threads in here, and watched a few youtube videos) and figured out how to write some basic programming. But I haven't used anything more complicated than a timer.

If I knew how to post my program for this current machine I would show you what I mean.

How do you post ladder logic in the forums? I'm not familiar with this forum layout.
 
Last edited:
To attache your program, you'll need to zip it first then attache it. Forum rules.


HTH
 
I didn't intend to attach the program, I just wanted to show the logic.

I can attach it but I'm not asking anyone to do it for me. I'm trying to figure out how to do it.

In any case, it's my work computer and I can't get to it today.

I already noticed I made a mistake in rung 1. I have Right Hand Short Shot in there twice. One of them is supposed to be Left Hand Short Shot.
 
This is why details are so important !
from what I now understand.

1. load part
2. hit pb and clamp part.
3. load 8 clips that are detected by photo lights.
4. operator then hits a test button, and if all parts are there, the machine cycles and completes the part.
BUT,
if a clip is missing, a fault light is turned on and a mgr has to reset the fault.

to me, this is pokie yokie, meaning verification of all sensors changing states.

so, we now take a different approach.

in the automatic cycle, we need to set up a permissive bit.
1. has the main part been removed and no sensor is on? yes, continue
no, set a fault bit and turn on alarm light
2. are the 8 clip photos off? yes, continue
no, set a fault bit for each and turn on alarm light. an hmi terminal would be nice or a set of fault indicator lights for notification is a good idea. the lights need a light test button.
3. process the part as always.
4. remove the part and make sure all sensors are reset to clear the current cycle.
you must check all sensors for on / off transitions.
since I do not know your entire process, some steps may be left out.

james
 

Similar Topics

Hello With my background in programming and web development a friend came to me for help building a SCADA system, but I'm a newcomer to HMIs...
Replies
3
Views
1,511
FUNCTION FC007: VOID VAR_INPUT START :BOOL; STOP :BOOL; END_VAR VAR_OUTPUT GESTART: BOOL; END_VAR BEGIN IF START = true THEN GESTART := true...
Replies
21
Views
7,455
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
248
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
114
Dear all, First of all thanks for letting me join this forum. I just need some help in one of my programming exercises. Being a beginner...
Replies
6
Views
609
Back
Top Bottom