Help with Ladder Logic Question

NoBrainPLC

Member
Join Date
Nov 2023
Location
Jacksonville
Posts
5
Hey. I am new to PLCs and LogixPro. A friend and I have been trying to build this diagram and instructions using LogixPro500. Could anyone help us solve this? Thank you.

PLC Description.png PLC Diagram.png
 
Rung 0: If you haven't turned on the pilot light, you can't use it to seal in the conveyor run command.
Rungs 1 & 2: The small bottle count is presumably the difference between the overall count and the large bottle count. You will eventually need something to adjust the accumulated counts when a full package moves off each downstream conveyor.
Rung 3: I don't see anything in your program to turn on the solenoid. The conveyors aren't supposed to start until you have placed three bottles on them. I don't think you'll ever want to turn them both on at the same time.
Rung 4: I don't see anything in your program to turn off the solenoid.

You may need to include a timer to keep the solenoid energized after the bottle clears LS1.

Start by cleaning up your logic for conveyor 1 and the diverter solenoid. Then we can move on to controlling the downstream conveyors
 
Thank you for the help. I didn't copy anyone. I'm still new to plcs and logix pro so my work is not great.

Watch the first 4-5 videos in this series: https://www.youtube.com/watch?v=T3tnXu-Eywc&list=PLB1ACAF773A15BFB1. Watch them repeatedly until you understand two things: the scan cycle i.e. time; reading (i.e. predicting in your head) how a given pattern of ladder logic will behave, with discrete tags (bit) having a value of 0 or 1 (not true/false, not on/off, etc.), and rung connections having a value of True or False (not on/off, not powered/unpowered, not current flowing/not flowing).

All of the ladder logic patterns needed for this assignment are covered at this site: http://www.contactandcoil.com/patterns-of-ladder-logic-programming/

You have but five discrete (i.e. Boolean) outputs to control:

  1. Pilot light
  2. Conveyor 1 motor
  3. Diverter
  4. Conveyor 2 motor
  5. Conveyor 3 motor
The pilot light is dependent on only two inputs: Start button; Stop button. Use the canonical Start/Stop Circuit pattern; you were close but as @Steve Bailey noted you have a typo in the seal-in contact.

The key to understanding the Start/Stop Circuit, and indeed all of relay logic programming, is that programming PLCs is primarily about time, so understanding, and thinking about, when something happens is more important than what happens. That is apparent in the assignment description: When ...; As ...; at any time. The Seal-In contact and the Output coil use the same bit in memory (Run, or in your case Pilot Light), however the contact examines that bit's value that was set at a different time (i.e. during the previous scan cycle) than the coil writes that bit's value.
 
Last edited:
Reading a process description, and breaking each output's run condition down into it's minimum set of component parts, is an acquired skill.

For example, the counters have no direct effect on when Conveyor 1 motor should run, although when either box conveyor's counter reaches its limit, then that box conveyor should start and indirectly that should cause Conveyor 1 to stop. This can be reduced down to the following statement:
The Conveyor 1 motor is running when the following is true:
  • The pilot light is on, AND
  • Conveyor 2 motor is not running, AND
  • Conveyor 3 motor is not running.
Note that, because those individual conditions are ANDed, when any of them are false (e.g. pilot light is not on, or either box conveyor is running), Conveyor 1 will be stopped.

The key thing to see here is that the counter values are not needed to directly choose when the Conveyor 1 motor is running or stopped; it is enough for the counters and box photo switches to control when the box conveyor motors run or not, which must be done anyway, and then the value of the box conveyor motors will feed back to this rung to control the Conveyor 1 motor.

Translating that Conveyor 1 motor logic into a rung is even simpler than the Start/Stop circuit. Each of those individual conditions needs but a single contact, whether XIC/NO or XIO/NC. Connecting them to implement the logical ANDs, and then connecting the result of those logical ANDs to the Conveyor 1 motor output, is all that remains.

The Diverter is active when a large bottle is present at Limit Switch 1, and inactive at all other times.

The Conveyor 2 motor runs when the Conveyor 2 count value is 3, and continues running, even after the count value is reset to 0, until the Photo Switch 4 input value changes from 1 to 0. It might be possible to use the Start/Stop Circuit pattern here, but that might not start the motor if the Photo Switch 4 input value is 0 (i.e. not 1) when the count value reaches 2, so the State Coil/Fault Coil pattern might be a better choice here. Also, at some point once the count value reaches 3 you will need to reset the counter value back to 0, but if you reset it too soon then the motor may not be started.

The Conveyor 3 motor output will be similar to the Conveyor 2 motor output, but have a different counter, and count value (preset) to trigger it.

That, plus my previous post, covers the five outputs. I leave it to you to write the rungs that drive the various counters, reset each box counter when its box is full, and reset all counters when the Reset button is pressed.
 
Realistically, I don't think you have enough time to complete the homework this week. BUT I have a great idea to delay it all together. Write to your instructor.


Dear Respectable Instructor,

I request that the homework assignment for this week to be postpone due to the following reasons:

I do not see any instruction regarding the pilot light operation shown in the diagram. Is it an alarm light since it is red?
I do not see any instruction regarding Photo Eyes #2.
I do not see any instruction regarding Photo Eyes #3.
Does the Limit switch 1 really count the larger bottle or Photo Eye #3?
What to detect an empty box is in position?


Make sure to get it to notarize before submitting it to your instructor.
 
Last edited:
Nearly every post on here regarding assignments have been awful in the documentation supplied by these so called instructors/ tutors. they miss important information, seems that they do not understand the process themselves or even have any real practical experience. no wonder students have difficulty in getting it right if the instructions do not make complete sense, perhaps in some cases it is deliberate to make the students have to think & ask questions, however, in my experience that is not the case, heard many conversations where a student has questioned the paper only to be told this is the way it is.
 
Nice. You are indeed close. Not bad for beginners; well done!

General comment: make sure you add comments about what is happening on each rung. Describe what the process is doing ("Count small bottles into box on conveyor 2; box is full at the third bottle"), not the logic ("when input O:x.y becomes 1, increment the counter").

Rungs 000/001: what is RUN? Is there an actual output called RUN, other than the pilot light? If RUN is not needed for an actual output, then RUN is redundant with PL (Pilot Light) and RUN can be eliminated by replacing RUN with PL in Rung 000 (Seal-in and Coil!) as well as anywhere else RUN is used, and removing current Rung 001.

Rungs 002-004: I assume the PSn inputs are 1 when a bottle is present, and 0 when no bottle is present. If no, then ignore the rest of this comment. If yes, then nice touch using the falling edge to count bottles after they pass the sensor on the three conveyors, but that also means that, if there is not a bottle present in front of one those photo switches (input is 0) when the system starts (pilot light goes from 0 to 1), then the corresponding counter will see a rising edge and count from 0 to 1, because there is not a bottle there. The solution may be to remove the XIC PL from those counters, because there should not be a negative transition unless the process is running (i.e. the conveyor is moving). That's not strictly true, but it's an edge case beyond the scope of this assignment; even so, you could always reset counters whenever PL is 0 (which has its own problems/edge cases).

Rung 005: Output O:2/2 is possibly mislabeled as CONV 2; I think it should be CONV 1. In any case, there are two outputs labeled CONV 2, which will be confusing at 3am six months from now.

Rung 005: the timer is an interesting idea; I assume you are providing a delay for each start conveyor 1. Given the logic on Rung 013, you need neither the XIC on PL, nor the XIOs on CONV 2 and CONV 3, because T4:0/DN will already be 0 when any of those instructions evaluated to False, and T4:0/DN can be 1 only if all of them evaluated to True.

Rung 005: if you press the Stop button and the PL returns to 0 when there are no more bottles on conveyor 1 or coming in, then the seal-in of the conveyor 1 motor on the rung will keep conveyor 1 running. I am pretty sure the seal-in is both unnecessary and undesirable; running conveyor 1 whenever both PL is 1 and both box conveyors are stopped seems like the right call. That said, this is irrelevant since a simple XIC T4:0/DN OTE CONV 1 (no seal-in) is all that is needed here anyway, and the logic of Rung 013 will handle the rest.

Rungs 005 and 013: if you do want the delay timer, then I would move Rung 013 to just before Rung 005, so it is easier to read the logic at 3am ...

Rung 006: I don't grok this yet; what is O:2/6 SODP?

Rungs 007-009/010-012: very well done. The R1/R2 bits can be PLC-internal memory bits i.e. they do not have to be tied to physical outputs. Also, on Rungs 008 and 011 using an XIC ps OSF oneshot (instead of XIO+OSR). Finally, on Rungs 009 and 012 the XIC PL may be unnecessary to trigger the counters' resets. But those are a very minor nitpicks; this is truly sweet.

Again, well done.
 

Similar Topics

Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
228
Working on project will update after it is completed.
Replies
2
Views
357
Can someone help me piece this problem together. I have a lot of it down I think but cannot seem to get it right. Probably an easy one for most on...
Replies
1
Views
304
Hi everyone, I'm working on a project that involves using a Keyence LR-X100 sensor in Studio 5000 V35 ladder logic to determine the object's...
Replies
4
Views
677
I need to know how to take a schematic like this and solve it for let’s say a run time of 5 seconds By solve I mean determine which rungs are...
Replies
33
Views
9,149
Back
Top Bottom