We have been playing around with this assembly line code for several lessons and have been informed by a RealPars student of a bug that we need to address. To refresh your memory, this code has a start and stop switch, 2 conveyor belts, a motor for each belt, 2 photo-eye sensors, and a jaw type clamping device that is controlled by a valve. In the previous lessons, we wrote different parts of the code and fixed issues found along the way.
In this lesson, we are going to address an issue found regarding the sensors ability to trigger motor 2 if someone just passes their hand in front of the sensor enough times to accumulate the counter used for shuttling the part to the next station.
We are also going to address another issue that we consider a safety risk. Open up this lesson and let’s do some bug extermination!
Now that you’ve come back to the video, what did you do? Could you fix the bug so that no one can run the motor by just passing their hands in front of sensor 2? If you have, congratulations! But if you haven’t, don’t worry, you’re going to learn that in this video.
16 Comments