Stop light lab for school

SnakePliskin

Member
Join Date
Feb 2018
Location
florida
Posts
3
Greetings everyone, I need help on this school lab. I’m using Push buttons for the sensors and I’m sure I need latching and unlatching functions in the program. I’m still a beginner to this PLC stuff(but I want to major in this field) any advice or diagrams would be greatly appreciated, thanks in advance

3BB484EC-28E4-437A-843C-1188D24CC2AF.jpg 92CD8800-B338-4699-995D-66E6F3DD601B.jpg
 
Last edited:
The best way of learning is firstly do it yourself else you would learn nothing.
It may take some time, however you would learn greatly.

Once done, put your solution here and we would tell how to improve
 
The best way of learning is firstly do it yourself else you would learn nothing.
It may take some time, however you would learn greatly.

Once done, put your solution here and we would tell how to improve



Thanks for the reply, I’ve started to program the lab but I’m somewhat stuck (see picture)... I’m going to try putting more unlatch functions and try experimenting and see what happens next.
 
I don't know what your instructor is telling you, but IMHO, the first step is to document your I/O.

Right click on your XIO/XIC/OTE, etc instructions and give them a description.

Right click on the rung number to give the rung a description.

Then, and only then, will we know what you are thinking 🍻

Also, I note that this is your 4th exercise (maybe?) and that the instructor wants you to use timers and counters - no mention of latches/unlatches..
 
Last edited:
I don't know what your instructor is telling you, but IMHO, the first step is to document your I/O.

Right click on your XIO/XIC/OTE, etc instructions and give them a description.

Right click on the rung number to give the rung a description.

Then, and only then, will we know what you are thinking 🍻


Sorry about that, here’s what I got so far with some help... right now I’m trying to see if there’s any way to change the program so I don’t have to use NEQ EQU TON and CTU? Reason because we haven’t used the NEQ and EQU functions yet, but we have learned a little about Timer Up and CountingUp function.

Thanks

920F0607-B8F1-42EB-999A-119AF71A8D66.jpg
 
I don't have the time to look at the examples, but I think you are taking the exercises with the mindset of passing instead of learning.

You'll eventually realise that there are best practices to program that are valid for different platforms and you should not try to fit constraints where none are given. If the exercise doesn't specifically say to use latches, then solve the problem the best way you can using latches where it makes sense and normal contacts where it doesn't.

You should also start picking up why certain things should not be done and not take the word of others as law. A good example of this is that every programming teacher I've had would curse the use of goto in C programs. Not a single one of them could tell me why we shouldn't use a functionality that is, to this day, part of the language.
As others on this forum have said it, that is not engineering it's superstition.

Also, be prepared to justify your choices to the teacher... that can definitely make a difference in your final grade.
 
A couple of points to ponder


  • How many green/red lights are there?
  • How many beam break sensors are there?
  • Should the beam break sensors (at either end of the tunnel) use separate counters?
  • How does a timer XIO DoneN bit in the rung with the TON instruction work?
  • Do you want the startup timer to be completed timing whenever the program is executing?
  • Do you need to use a latch with green light or could a sealed-in contact do the job?
  • If one beam is broken (by a car traveling past), how does this affect the other beam/green/red light combination?
Like I said before, use rung comments - tell us what you think a rung should be doing.
 
Last edited:
First off it looks to me like the diagram for the exercise is wrong, the 2nd outputs should be Y3 and Y4 for the 2nd set of lights.
So you have set inputs and outputs...
Now you need to write a functional description of how you want it to work...
If this or this happens then this happens and this happens etc etc.
Then your job is to change the functional description, step by step, until your program works.

Functional description might look something like this.
Both lights are constant red
Beam 1 is broken/made so green light 1 is on and red is off.
Green light stays on for x time if beam 1 is not broken again.
Green light stays on for 5 beam brakes

So you might control the green light and use the XIO contact to control the red light???

And so on.....
Good luck!!
 
May I make the following suggestion.

your assignment is your customers specifications for the job.
read the specs and understand what you have to do.
Write down in your own words your sequence of events, forget the I/o for now
go over what you wrote and then compare it to the sketch provided, does your description make sense? yes - next step. no - simplify until it makes sense
add I/o descriptions to the writeup if you haven't already.
add I/o to the write up.

go through the process again and see if the sensor descriptions and I/o make sense. if it does, write the code.

james
 

Similar Topics

Daft question coming up...what colour should the Run/STOP light be on a S7-1200 if it's working correctly? At the moment it's solid yellow. The...
Replies
15
Views
2,031
Happy Holidays Folks! I am working on a robot cell and as we are adding PLC control to the system, I have some questions about implementing an...
Replies
6
Views
4,668
Each/all of the cars ahead of me is a first order plus dead time ( FOPDT ) system. Why is it that the first car always has the longest dead time...
Replies
23
Views
6,737
To start/stop energizing the heating elements there are used two buttons, each with a NO and NC contacts. The push buttons have LED lights (a max...
Replies
8
Views
3,443
I have a machine that has Light Curtains, E-Stop and 2 Palm Buttons. If I wire the Light Curtain’s and E-Stop to safety a Relay(Category 4) do I...
Replies
15
Views
6,313
Back
Top Bottom