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

A simple template that combines SimEvents, Stateflow, Simulink and Simulink 3D Animation.
1.8K Downloads
Updated 1 Sep 2016

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?

Cite As

Simulink Dude (2024). Modeling, Simulation and 3D Animation of a Simple Assembly Line (https://www.mathworks.com/matlabcentral/fileexchange/32403-modeling-simulation-and-3d-animation-of-a-simple-assembly-line), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Simulation in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

assembly_line/

Version Published Release Notes
1.4.0.1

Updated license

1.4.0.0

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.0.0

Update to the 3D world

1.1.0.0

Changed title

1.0.0.0