Final project: design a painting machine
Painting machines are often complex devices that have many moving parts. For our final project, we are going to design a simulated device that can move a part on a conveyor belt and paint a sentence on it. For this project, we are going to set the following requirements:
- Drive the conveyor belt (belt on/off)
- Select between two paint APIs
- Paint a message on a part
With these requirements, we can formulate a design like the following:

Figure 12.15: Painter design
In this case, the PLC_PRG file is going to act as our orchestrator. The file will control when the belt is running and when the machine is painting. In this design, we’ll use a beltMotor function block and a paintMotors block, which will implement IMotor. The paintMotors block will use the paintWrapper function block as a wrapper; in this case, this will be our mock API. The paintWrapper function block will use two different vendor...