Application 001: Man Crossing

As many of you know, I have been pretty focused on my Automation Academy project. Because of this and some guidance I received this Summer to “repurpose everything”, I have decided to start an applications series here on the Primer. The picture above is of the first applications document I have created for the Academy site, where I will also post these.

“Man Crossing”

Requester: Sobodh Kant Shikri, Bhopal, India           Date: 21 October, 2020

Description: This request came from the Automation Training Facebook group. Because the description was very brief, there are many questions I could ask about this, but I will make some assumptions and try to anticipate different possibilities.

The question read like this: “How to make Ladder Program. Conveyor Crossing line .Two input Signal and one output. When man crossing transmitter and receiver signal one side when sense then Set and conveyor stop and after cross conveyor line reset and conveyor line output activate run. Similar from opposite side  same situation before set after reset.”

This picture was attached:

In further conversation he mentioned that it was a Siemens TIA Portal application using an S7-1500.

Since I already had a project with an S7-1500 configured, I used it for this application. I created a routine, FC20, to write the code in.

As this application is written, you would simply write code to latch (set) a bit when someone entered one side of the conveyor, then unlatch it when the person exited the other side.  This causes lots of potential problems though, so all possibilities need to be accounted for.

There is also the possibility that this is safety related, so I will preface this with the statement that in no way am I recommending any of these methods, and anyone should seek a competent programmer with safety experience to evaluate the project. This is why systems integration help can be expensive.

I created the conveyor and photoeye tags in a folder called “IO”, it already had the stack light tags in it.

The way the application is written, the code would look as follows:

First you may have to invert the signals from the photoeye. Often through-beam photoeyes are light-on out of the box. This means that if you want the signal to be on when an object is present, you need to either invert the signal in the code, set a switch on the photoeye itself, or connect a different wire.

I put this in the r2_Inputs routine, which is where input conditioning like this occurs. It may also need an on-delay timer here. See my writeup in Ladder Logic 201 – Inputs or read my book Advanced PLC Hardware and Programming, page 132 for more on this subject.

Here is the logic for entry from one side:

And just duplicate it for the other side, but with the photoeyes reversed:

And then just put the coils in series with the Conveyor Output:

Except that as I mentioned, there are lots of potential problems with this.

What if someone enters one side, turns around and exits the same side? The conveyor will stay off forever, or at least until someone blocks the other side.

What if someone enters one side, stands where the conveyor line is drawn, and flags the other photoeye? The conveyor line will start moving with the person inside the conveyor zone. Sounds dangerous.

I am not sure how someone crosses a conveyor walking anyway, it certainly isn’t a floor mounted belt or roller conveyor.

Perhaps it is a paint line, where objects are carried on hooks overhead. If so, the best bet would be to use a zone sensor in the lower area. Floor scanners (Sick Optic) or even a light curtain laid on its side would do the job. These are both dual channel safety rated devices, so there wouldn’t likely be a PLC involved at all, you would just put the contacts in series with the conveyor motor control.

Just for fun, let’s assume we were using such a device, but wanted to put the logic in the PLC:

You would use an Off-Delay timer so that the inhibit output would be on anytime someone was in the zone, and for three seconds after they left. Remember, Off Delays are done immediately and start timing when the signal goes off.

The Conveyor inhibit signal would also stop the conveyor, along with the photoeyes described before.

Again, from a safety perspective this is not legal in The US and Europe. Safety has to be hard wired or run through an appropriate safety PLC. If people can be injured by the conveyor moving, this is a problem.


And that’s the end of this application post. Yes, it’s very simple from a programmer’s perspective, but I have done some crazy stuff in the Ladder Logic 400 series here too.

I am doing this in the Automation Academy to let people know that for the low price of being a member, they can ask me to do applications for them and I will try to oblige. People often ask for help for free, especially from overseas. As you can see, it takes a long time to put together a good explanation. I did this another time this Summer and even made 3 YouTube videos for it, simulating the logic in a PLC.

Speaking of the Automation Academy, I am probably about 2 weeks from opening it to Founding Members for a special price. I will post a video tour of the site soon.


Electrical Engineer and business owner from the Nashville, Tennessee area. I also play music, Chess and Go.

Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *