In this lesson, we have a factory environment that has a conveyor, some switches that run the conveyor for different lengths of time, a stop switch, and a stack light with running and stopped lamps. We need to write a program that will run the conveyor for specified lengths of time. The timing interval will be based on which switch is pressed so we’ll need to be able to change the timer interval based on those switches. We also need to light the lamps depending on whether the conveyor is running or stopped. So let’s open this up and do some time shifting.
In our previous lesson, we started writing some code to in order to run a conveyor for different lengths of time based on which input switch was triggered. In this lesson, we will continue writing our program to finish our time shifting quest.
We will add some more code that changes our timer...
On some occasions, you may need to continue timing a process even after the enable input to the timer turns false. As you may know, once the timer enable input transitions from false to true again, the timer resets and begins timing from zero. In this lesson, we will show you how you can change t...
As you know, when the timers enable input transitions to false, you will lose the timers accumulated value. In the previous lesson, we discussed the need to retain a timer’s accumulated value when the timers enable input transitions from true to false so that we can finish the timing process wher...