The goal of this demo is to establish a general template for simulating and animating simple assembly lines. In this example, we have two conveyor belts that have motions perpendicular to each other. Furthermore, a package needs to be mounted onto the conveyors and transferred across them as well by three gantries.
Key points to keep in mind:
1. The SimEvents model is used to model the environmental input to the conveyor belt system. A gated release of the packages is obtained through control from the assemly line that signals if the conveyor_x is indeed free. Furthermore, each entity is assigned a unique identification number (UID) to keep track of its flow through the statechart.
2. The Stateflow chart is used as a diagram to sequence the states. All concurrent motions of the various elements in the system are modeled as parallel states.
3. The transfers are also modeled as parallel states with timed delays to create a simple loading motion. Observe how the uid values are reset only after the sequence is done to keep the various states of the system in synchronous.
4. The Integration subsystem is a placeholder for modeling additional dynamics that can be incorporated by the modeler.
5. The Animation Logic MATLAB function has been designed to simply the animation. At any point in time, there are only two blocks possible on the assembly line. By switching on/off the transparencies of the blocks, a uniform motion of the blocks can be obtained. This is much simpler than having to create a new block dynamically using the PROTO function.
Questions to ponder about:
1. The maximum queue capacity is 25. At what value of the velocities(forward & backward) for both the conveyors will the queue length never exceed 10?
2. How does the result in (1) change if you use a uniform distribution for the time-based entity generation?