Beginner PLC

Hello everyone,
I'm taking a PLC class at my local community college for "fun", but realized it's more than I bargained for. Nevertheless, I have a project that's coming up, but worried about making any tweaks so I don't "break" it. We've only been given 2 attempts to verify our programs on the trainers and expected to turn in a big point assignment by the end of this week. I am using RSLogix 500 Pro. The expectations are that the program has to have: 2 start push buttons, 2 stop push button, 2 emergency stop buttons buttons, 3 motor starter coils (individual), 1 reset push button, 1 red lamp, 1 yellow lamp, 1 green lamp, and timers. I posted what I have thus far. Feel free to dm directly for additional information/inquiries. This is a 3 conveyor project.
 

Attachments

  • 2024-10-26 16.pdf
    272 KB · Views: 28
It need to work in ladder logic?-Safely. I have it understood, it goes 5, 10, 15 and 15,10,5 seconds preset for TON and then TOF.
 
Is this a program you have written and want comments about? Or is this a program provided by the exercise that has mistakes and you need to fix and/or finish it?

I don't see the red lamp output being used by the program. What is it supposed to do?

there is a PC program called RSEmulate 500 available from Rockwell Automation; it provides an in-PC emulator that you can use to mimic PLC operation, so you can test your program's functionality without using the trainer, assuming that is allowed for the project.

There is no need to use DMs; it makes more sense if we all see each other's comments (plus it maximizes any embarrassment opportunities to learn ;)).
It need to work in ladder logic?-Safely. I have it understood, it goes 5, 10, 15 and 15,10,5 seconds preset for TON and then TOF.
I don't see any TOFs being used by the program. Do you understand how the TOF instruction works? Are those meant to extend the on-time (delay of turning off) of the conveyor motor outputs when a stop button has been pressed?

Comments
  • Rungs 0000 and 0001: E-Stop and E-stop Reset
    • PLC programming is primarily about time, so when something happens is more important than what happens.
    • On each scan cycle,
      • Rung 0001 will be evaluated and have its OTU output instruction optionally unlatch the MACH_UNSAFE bit value to 0,
      • after Rung 0000 is evaluated and have its OTL output instruction optionally latch the MACH_UNSAFE bit value to 1
      • So after those two rungs are evaluated, in that order, what will be the value of MAC_UNSAFE if the operator presses one of the reset-E-Stop buttons while either of the E-Stop inputs values is 1?
        • Would that result be the correct result from a safety standpoint
    • Assuming you see the problem from the previous bullet point,
      • Read about the Set/Reset pattern at this link.
        • Pay particular attention to the "-dominant" phrases.
        • Remember what written about time, when, and what above.
    • Sidebar: note that E-Stops should be hardwired external to the PLC's internal logic to ensure safe operation while either E-Stop is active, no matter what the PLC does, even if the PLC does the wrong thing.
      • That does not absolve the PLC programmer of responsibility
        • e.g. would it be a mistake for the PLC logic to immediately start the conveyors motors when the E-Stop resets were pressed after E-Stops were cleared?
  • Rung 0003:
    • If the value of MACH_RUN changes from 1 to 0 (e.g. someone presses a stop button), what will be the state of bit M3_TIMER/DN:
      • on the scan cycle when the MACH_RUN value is first detected as 0?
      • on subsequent scan cycles when the MACH_RUN value continues to be 0?
      • Given the answers to those questions, is it necessary to evaluate both MACH_RUN and M3_TIMER/DN here?
    • Why is the Motor 3 Timer Done bit, which controls the Conveyor Motor 3 output bit on Rung 0005, used to control the Motor 1 Green Light output bit?
  • Rung 0004
    • Is the Motor 2 TT bit the right source for controlling the Yellow Light output bit?
  • Rung 0005
    • This looks okay ...
    • But which bit values in contacts are going to feed the TOFs when they are added?
      • Should the TOFs all start when the Machine Running bit value change from 0 to 1?
      • Or should something else drive the TOFs?
    • Specifically, do you understand how the TOF instruction works?
      • Many people do not
        • And often choose to instead implement some inverted logic with TONs to implment a "Timer OFf-delay" (TOF)
      • I strongly suggest making a test program with two rungs:
        • an XIC B3:0.0/0(normally-open) contact with its ouput feeding two branches:
          • the first branch with a TON instruction
          • the second branch with a TOF instruction
          • ensure the Preset is equivalent to a several seconds of time e.g. Preset=5000 and Time Base=0.001
        • Download the program (e.g. to the emulator) and put it into Remote Run mode
        • Manually toggle the value of B3:0.0/0 (right-click on the contact and select [Toggle Bit] from the popup menu)
        • Monitor the value of the T4:n attributes (double-click on the T4 under [Data Files] on the left) in response to manual changes to the value of B3:0.0/0
          • Make sure you toggle the state of B3:0.0/0 both when the timer is timing and has completed timing
          • Note especially what happens to the /EN, /TT, and /DN bits of the TOF timer as its feed rung state changes over time
            • Specifically note that, when its feed rung state is True,
              • the TON writes a 1 to its /DN bit
              • i.e. the TON acts identically to an OTE (coil) instruction
                • i.e. again, when its feed rung state is True
    • Refer also to the Rung 0006 comments below
  • Rung 0006
    • This seems to be currently set up to start the three conveyor motors using various TON delays if the Machine Unsafebit value is 0.
      • The TON timers are driven by the Machine Running bit
      • The three timers' /DN bit values, after those timers have expired, will change to from 1 to 0 immediately if the Machine Running bit value changes from 1 to 0.
        • So there is no off-delay yet
    • How will this change when the TOFs are added to the logic?
      • Specifically, considering what I hope you will learn from the test program with TON/TOF in the Rung 0005 comment above:
        • Again, which bits in which contacts (XIC or XIO?) should be used to feed the TOFs?
        • Does the logic need to use the TONs' /DN bits in XIC contacts to directly drive the three conveyor motors?
  • General
    • RSLogix 500 can print the program logic, and
      • that printout can be directed to a PDF,
        • which PDF file is a cleaner way of posting code to this forum
 

Similar Topics

Hi everyone, I'm new to the PLC world and currently learning step by step alongside my friend, who is a PLC programmer. I come from a mechanical...
5
Replies
853
Views
Interested getting into learning PLC. Thinking of getting factory I/O and a beginner and budget friendly PLC to start. Not sure what PLC to get do...
3
Replies
732
Views
Dear Friends, I am new to PLC and at the moment I am making some trouble shooting on a machine and came to my hand the PLC program. Can someone...
6
Replies
1,155
Views
Hi, I am being introduced to some of the systems that we work with at our facility. We are currently using the 1747 slc500 processor card and...
12
Replies
1,186
Views
Newbie here, greetings to all. I am a Mechanical Engineer by profession, I also by nature of working in a busy manufacturing environment have a v...
16
Replies
2,455
Views
Top