Ladder Logic Program

Discussion in 'Programmer's Corner' started by afried01, Nov 9, 2014.

  1. afried01

    Thread Starter Member

    Feb 5, 2011
    11
    0
    I need help with the following. It is not a homework problem; I'm just trying to learn the language.

    "When pushbutton one (PB1) is pressed, the red, white, and green pilot lights turn on and off every two seconds. That is, the red pilot light comes on for two seconds and then goes off. Then, the white pilot light comes on for two seconds and goes off. Finally, the green pilot light should come on for two seconds. This process should continue until the master switch (MSW) is opened."

    I can't figure out how to keep this process going. I have rung 007 because I figure you have to have some king of feedback to reset all the timers to zero and start the process again. Please see the file I uploaded. That is what I have so far. NOTE: Outside switches are open.

    Thanks Problem 30 page 203 (Timers).jpg
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,524
    2,369
    There are a few ways to do it, It depends on what the instruction set covers, for example if it includes a Trailing edge pulse contact, the O:2/2 falling edge could be used to reset the timers and the process should restart.
    What make of PLC?
    Max.
     
  3. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    There is a command to rest a counter. Look in the command selection palette, there is a command 'RES' you can assign a timer to it and reset that timer.
    You can also place many of these in parallel to reset multiple timers.

    Daniel
     
  4. afried01

    Thread Starter Member

    Feb 5, 2011
    11
    0
    1) It is an Allen-Bradley SLC 500
    2) What do you mean by O:2/2 falling edge and trailing edge pulse?
     
  5. afried01

    Thread Starter Member

    Feb 5, 2011
    11
    0
    I was under the impression that the RES instruction was used only with retentive timers. The timers I have are non-retentive; they should reset when the rung is de-energized.
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,524
    2,369
    It has been a While since I used the SLC500, the Mitsubishi have rising/falling edge instructions, but if using the SLC500 you could use the T4:3 DN followed by a OSR instruction, and then B3:1/1 could be used as a one shot to reset the timers.
    Max.
     
  7. afried01

    Thread Starter Member

    Feb 5, 2011
    11
    0
    Thank you. That did work. I thought I tried that already,,,,,, anyway thanks!!
     
Loading...