File Exchange

image thumbnail

Modeling, Simulation and 3D Animation of a Simple Assembly Line

version 1.4.0.1 (69.6 KB) by

A simple template that combines SimEvents, Stateflow, Simulink and Simulink 3D Animation.

4 Downloads

Updated

View License

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?

Comments and Ratings (5)

I tried this with R2016b and it was not able to resolve the SimEvents links

James

James (view profile)

Thanks.

Mr Smart

Mr Smart

Updates

1.4.0.1

Updated license

1.4

There was a bug regarding the animation. The factory_floor.wrl file was not being read by the MDL file. I have fixed this. Thanks to Gautam for bringing this to my attention

1.2

Update to the 3D world

1.1

Changed title

MATLAB Release
MATLAB 7.12 (R2011a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

assembly_line/