RsLogix 500 - Sequencing Machine Steps Part 6 - Multiplying Integers by Two
In this lesson you will dive deep into how the LAD 7 MULTIPLY routine of the previous RsLogix 500 - Sequencing Machine Steps uses integers and their associated bits to sequence through steps.
This method is probably used more than it should be in industry but is another great exercise in manipulating 16 bits. Note that by simply multiplying by 2, you shift to the “1” to the next bit.
The advantages of this method have diminished in my mind over the years although it used to be my preferred programming method. It does allow you to manipulate 16 bits at a time but from a maintenance point of view I think the Word method is clearer while accomplishing the same thing.
The disadvantages are it isn't as clear for maintenance troubleshooting plus if you have over 16 steps it gets more complicated than the other methods..
1. Download the CougarTurnSignalMultiply.RSS file. This is a simplified version of the RSS file you used in the Sequencing Machine Steps lesson, only including the Multiply sequence programming.
2. Open the RSS file in RsLogix 500, download it to your PLC, switch the PLC to Run Mode, and Go Online.
3. Open up the LAD 7 MULTIPLY routine.
4. Turn on I:0/0. It should still be wired to the Green button from the previous lesson.
5. Your screen should be sequencing through rungs 0-5 similarly to the video below. You may have to right click the image below and open and new tab depending on your browser.
Below is the explanation of how the integer keeps track of which step in the sequence the PLC is on. We are ignoring the XIC I:0/0 left turn signal in the explanation below for simplicity.
The key to understanding this method is understanding that the integer B3:1 is directly linked to the values of B3:1/0 through B3:1/15 since they are in fact the same number. So B3:1 equaling 1 will always mean B3:1/0 is a 1 and B3:1/1-B3:1/15 are all 0. Then understanding that multiplying a binary number by two simply shifts its position by 1. So if B3:1 equals 1, which means B3:1/0 is a 1 and B3:1/1-B3:1/15 are all 0, then multiplying that 1 by 2 makes B3:1 equal 2, which means B3:1/1 is now 1, and B3:1/0 and B3:1/1-B3:1/15 are now all 0.
After that, this one sequences exactly the same as the previous RsLogix 500 - Sequencing Machines with Cascading Timers and RsLogix 500 - Sequencing Machines with Counters sequencers.
This one is a little less common but you will run into it from time to time and it is an excellent exercise in manipulating bits at the word level. Continue to the next lesson, RsLogix 500 - Sequencing Machines Part 7 - Sequencer Instructions.
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.