RsLogix 500 - Sequencing Machine Steps Part 1

The ability to program sequential steps greatly increases both the capabilities of your control system and complicates control system troubleshooting at the same time.  

In the next few lessons, you will be learning several methods of sequencing machine steps.  But first you will download the Cougar Tail Light RSS file to your PLC.  The purpose of this lessons is to give you a little bit of a primer into the ways of sequencing machine step.  If you don't fully understand each method, that is OK.  You will learn the details of how each one works in future lessons.

This sample program shows examples of sequencing machines using cascading timers, counters, manipulating words, multiplication, sequencers, and by gremlins possessing your machine.

I've chosen the 1960s Mercury Cougar sequential tail light problem to work with. You can do a quick google of "cougar tail lights" to see videos of how they operate.  I didn't review the original wiring diagrams to assure that the samples function as they originally did but the criteria is:

  • If the brake light is pressed, all of tail lights must turn on.
  • If the emergency flashers are on, all of the tail lights must flash together as long as the brake light is not pressed.
  • If the left or right turn signal is selected and the emergency flashers are not on, the tail lights should turn on in order from inside to middle to outside, then turn off and repeat.

1.  Download the Cougar Tail Light RSS file.

2.  Wiring buttons 1, 2, 3, and 4 to inputs 0, 1, 2, and 3 on your trainer.

2.  Open the RSS file in RsLogix 500, download the program to your PLC, switch the PLC to Run Mode, then Go Online.

3.  You will find several ladder routines in this program.  If you are unfamiliar with how PLC's execute subroutines then see our RsLogix 500 - Program Control JMP, LBL,JSR, etc.

  • LAD 2 - This is the default routine. 
    • The first three rungs of this routine document how the program works and allow you to see the I/O from one place. 
    • Rung 3 jumps to LAD 3 which is where the physical outputs are controlled for all of the sequencing methods. 
    • Rung 4 gives you instructions on how to enable each sequencing method. 
    • Rungs 5-10 jump to the routines' various sequencing methods.  See Rung 4 for details of how to execute each one. But basically you only should have one enabled at a time and to enable one, right click the XIC in the rung and select toggle bit so that it is green.

4.  Make sure B3:0/0-B3:0/5 are all set to 0.  These are the XICs in rungs 5-10 of LAD 2.  None of them should be green.

timertoggle.png5.  Right click the XIC B3:0/0 in rung 5 of LAD 2 and select toggle bit to observe timer sequenced machine steps.

6.  Open up the LAD 4 TIMERS.

7.  Press the Green button which you have wired up as the left turn signal and observe the code.

8.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  With what you have learned so far, you should be able to understand how this routine sequences through the Inside, Middle, and Right light.

9.  Right click XIC B3:0/0 in Rung 5 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

10.  Right click XIC B3:0/1 in Rung 6 and select toggle bit to observe counter sequenced machine steps.

11.  Open up the LAD 5 COUNTER.

12.  Press the Green button which you have wired up as the left turn signal and observe the code.

13.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  With what you have learned so far, you should be able to understand how this routine sequences through the Inside, Middle, and Right light.

14.  Right click XIC B3:0/1 in Rung 6 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

15.  Right click XIC B3:0/2 in Rung 7 and select toggle bit to observe word manipulation sequenced machine steps.

16.  Open up the LAD 6 WORD.

17.  Press the Green button which you have wired up as the left turn signal and observe the code.

18.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  This one may be a little harder for you to follow but refer back to the RsLogix 500 - Binary to Integer and Integer to Binary Conversions lesson to help you associate the decimal numbers being moved into B3:1 with the binary values in B3:1/0, B3:1/1, and B3:1/2.

19.  Right click XIC B3:0/2 in Rung 7 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

20.  Right click XIC B3:0/3 in Rung 8 and select toggle bit to observe multiply sequenced machine steps.

21.  Open up the LAD 7 MULTIPLY.

22.  Press the Green button which you have wired up as the left turn signal and observe the code.

23.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  None of the lessons so far have looked at what happens on a binary level when you multiple numbers.  You'll learn more about this when we dig into how this sequencing method works in a later lesson but can you figure out how this one steps through B3:1/0, B3:1/1, and B3:1/2?

24.  Right click XIC B3:0/3 in Rung 8 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

25.  Right click XIC B3:0/4 in Rung 9 and select toggle bit to observe sequencer instruction sequenced machine steps.

26.  Open up the LAD 8 SEQUENCER.

27.  Press the Green button which you have wired up as the left turn signal and observe the code.

28.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  This one is different and uses instructions specific to Allen Bradley.  You'll learn more about how this works in a later lesson.

29.  Right click XIC B3:0/4 in Rung 9 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

25.  Right click XIC B3:0/5 in Rung 10 and select toggle bit to observe possessed sequenced machine steps.

26.  Open up the LAD 9 POSSESSED.

27.  Press the Green button which you have wired up as the left turn signal and observe the code.

28.  Press the Yellow button which you have wired up as the right turn signal and observe the code.  This one is tricky but should give you something think about.  You will learn more about how this one works in a later lesson.

29.  Right click XIC B3:0/4 in Rung 9 of LAD 2 and select toggle bit again to set it back to 0 and is no longer green.

Conclusion 

This is the first lesson where you gauge what you have learned.

The timer and counter sequencing methods should have been easy to follow.  If you have trouble then review the RsLogix 500 - Timers - TON, TOF, and RTO and RsLogix 500 - Counters - CTU and CTD lessons.

The word and multiply sequencing methods were probably more difficult.  

The sequencer instruction sequencing method uses new instructions that you haven't seen yet.

The possessed sequencing method should be very challenging for you but there is a lot that can be learned about precise timing.

Continue to the RsLogix 500 - Sequencing Machine Steps Part 2 - Controlling Outputs where you will learn how the outputs are structured in this program.

Next Steps

Go to the Allen Bradley RsLogix 500 PLC Training PLC Training Getting Started Lesson series to select your next lesson.  There are also many other Lesson Series on PLC Programming and Industrial Automation.

 

 

Information