In the previous lesson, we had our PLC software connected to the Factory I/O software. We were able to start and stop the equipment, verify product counts passing by the retro reflective sensors, all using the Factory I/O animated simulation and our program.
One thing that we have not yet discussed is the lamps that were provided with our switches inside of Factory I/O. In this lesson, we’re going to write some additional code that will light the lamps. We will light the red lamp, or stop switch lamp, when the equipment is stopped and the green lamp, or the start switch lamp, when the equipment is running. We will also light the reset lamp when the reset button is pressed. This reset lamp will remain lit until the counters accumulated value is greater than zero.
Let’s get started and write some code!