In this lesson we are going to energize 16 lamps at the same time, with the press of a switch. After some time delay, we want the lamps to turn off one at a time, one every second, until all of lamps are de-energized. We will be using the shift instruction to accomplish this task. After we write the first network of code and download it to the simulator, we discover that the code doesn’t work quite as we expected. We correct that problem and retest only to find that we still have some code issues. Let’s open up this lesson and get started turning on and off some lamps.
In the previous lesson we began writing some code that would turn on 16 lamps, all at once, with the press of a switch. Once the switch is released, after a short delay, the lamps are supposed to turn off, one by one, every second until they are all off. We simulated the code only to find that we...
In the previous lessons we have been working with some code that turns on multiple lamps with the press of a single switch. After a short time delay, the lamps are supposed to turn off one at a time, one every second until all of lamps are turned off. As you know during writing and testing, we ha...
In previous lessons, we have been working with the shift instruction and have written a few lines of code that will turn on and off some PLC outputs in a specific order. We’ve been writing code to create different patterns to turn on and off 16 lamps. We started out using 2 switches and eventuall...
5 Comments