April 8, 2011
struct U.S.: the IDisposable
{
the public ushort V; public void the Dispose ()
{
V = 100;
} public override string the ToString ()
{
return V. ToString ();
}
} U.S. [] us = new U.S. [1];
us [0] V = 5;
Console.WriteLine (us [0]) ;/ / 5
var x = us [0] as IDisposable;
x.Dispose ();
Console.WriteLine (us [0]); / / 5
Console.WriteLine (x) ;/ / 100 ——– ———– 5
5
100
End
press any key to continue …
September 29, 2010
destructor GC automatically calls
the IDisposable need to call, or in a using {} to automatically call the following written assurance sr resources release:
using (the System.IO.StreamReader sr = System.IO.File.OpenText (fileName))
{
string s = “”;
while ((s = sr.ReadLine ())! = null)
{
System.Console.WriteLine (s );
}
}
GC.SuppressFinalize (this), and judgment first in the destructor if called Disposed did not call, call the Dispose, to ensure the release of resources.
In addition, the destructor call order is a randomized
/ / o1, o2 destructor call is random, not necessarily o1 the former o2 in after
o1 = null;
o2 = null;
using System;
using System.Collections.Generic;
using System.IO;
namespace Test.basic
{
public class O1: IDisposable {
internal bool isDisposed = false;
data = new List
September 9, 2010
compiled the Sounds of the environment: VS C # 2005 Windows window procedure
Form1, Button1
custom class: clsA,
clsA IDisposable interface
class clsA: the IDisposable
{
the public clsA ()
{
clsACounts ;
}
/ / IDisposable Dispose () method,
/ / user code can call the clsA object Dispose () method,
/ / First, by using statement, the second is to manually call
public void Dispose ()
{
/ / this can be made transactional processing
clsACounts -;
the MessageBox. Show (“clsA.Dispose () -> clsA.clsACounts:” clsACounts);
/ / into this GC.SuppressFinalize (), it will make the destructor will no longer be call
}
public static void ShowMsg ()
{
MessageBox.Show (“clsA.ShowMsg ( ) -> clsA.clsACounts: ” clsACounts);
}
/ / in managed environments, the C # destructor is not necessarily always in the demise of the object is called
/ / but called automatically by the system
/ / therefore, not suitable for the timeliness requirements in which the transaction
~~ clsA ()
{
/ / transactional processing
/ / clsACounts – not suitable for this;
/ / MessageBox.Show (“clsA. ~ clsA () -> clsA.clsACounts:” clsACounts);
}
/ / used in the context of the total recorded in clsA the number of objects
private the static an int clsACounts = 0;
}
Here is the user code,
{
public Form1 ()
{
InitializeComponent (); < br />
}
private void button1_Click (object sender, EventArgs e)
{
/ / automatically when you exit the using block call which the object Dispose () method
using the (clsA A1 = the new clsA ())
{
clsA.ShowMsg (); < br />
}
/ / manually call the objects Dispose () method
clsA A2 = the new clsA ();
clsA.ShowMsg ();
A2.Dispose (),;
/ / In general, the exit of the Form1 form, A1 and A2 will destructor < br />
/ / but not in every case, in managed C # is generally not destructor
/ / transactional processing this case through to implement the IDisposable the Dispose () method
/ / in the object exit to achieve the necessary transaction processing
}
}
December 8, 2010 less a few pictures, I am too lazy to copy, we still go to the source address the see http://www.codeproject.com/KB/cs/idispose.aspx highly recommended ! ! ! !
Introduction
This is yet another article on the use of the interface class IDisposable. Essentially, the code that you are going to see here is no different than the code on MSDN or these two excellent articles:
Garbage Collection in. NET by Chris Maunder:
http://www.codeproject.com/managedcpp/garbage_coll ection.asp
General Guidelines for C # Class Implementation by Eddie Velasquez:
http://www.codeproject.com/csharp/csharpclassimp.a sp
What different is that this article illustrates the functional aspects of:
the destructor
the Dispose method
memory allocation
garbage collection issues
In other words, there lots of articles showing how to implement IDisposable, but very few demonstration of why to implement IDisposable.
How To Implement IDisposable
< br /> The salient features of the code below are:
Implement the Dispose method of the IDisposable interface
Only Dispose of resources once
The implementing class requires a destructor
Prevent the GC from disposing of resources if they e already been manually disposed
Track whether the GC is disposing of the object rather than the application specifically requesting that the object is disposed. This concerns how resources that the object manages are handled.
And here a flowchart:
Note two things:
If Dispose is used on an object, it prevents the destructor from being called and manually releases managed and unmanaged resources.
If the destructor is called, it only releases unmanaged resources. Any managed resources will be de -referenced and also (possibly) collected.
There are two problem with this, which I l come back to later:
Using Dispose does not prevent you from continuing to interact with the object!
A managed resource may be disposed of, yet still referenced somewhere in the code!
Here an example class implementing IDisposable, which manages a Image object and has been instrumented to illustrate the workings of the class.
Collapse
public class ClassBeingTested: IDisposable
{
private bool disposed = false;
private Image img = null;
public the Image Image
{
get { return img;}
}
/ / the constructor
public ClassBeingTested ()
{
Trace.WriteLine (“ClassBeingTested: Constructor”);
}
/ / the destructor
~ ClassBeingTested ()
{
Trace.WriteLine (“ClassBeingTested: Destructor”);
/ / call Dispose with false. Since we e in the
/ / destructor call, the managed resources will be
/ / disposed of anyways.
Dispose (false);
}
public void Dispose ()
{
Trace.WriteLine (“ClassBeingTested: Dispose”);
/ / dispose of the managed and unmanaged resources
Dispose (true);
/ / tell the GC that the Finalize process no longer needs
/ / to be run for this object.
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposeManagedResources) < br />
{
/ / process only if mananged and unmanaged resources have
/ / not been disposed of.
if (! this.disposed)
{
Trace.WriteLine (“ClassBeingTested: Resources not disposed”);
if (disposeManagedResources)
{
Trace.WriteLine (“ClassBeingTested: Disposing managed resources”);
/ / dispose managed resources
if (img! = null)
{
img.Dispose ();
img = null;
}
}
/ / dispose unmanaged resources
Trace.WriteLine (“ClassBeingTested: Disposing unmanaged resouces”);
disposed = true;
}
else
{
Trace.WriteLine (“ClassBeingTested: Resources already disposed “);
}
}
/ / loading an image
public void the LoadImage (string file) < br />
{
Trace.WriteLine (“ClassBeingTested: LoadImage”);
img = Image.FromFile (file);
}
}
Why Implement IDisposable?
Let put this class into a simple GUI driven test fixture that looks like this:
and we l use two simple tools to monitor what going:
DebugView to watch the execution: http://www.sysinternals.com/ntw2k/freeware/debugvi ew. shtml
the Task Manager Performance view for memory utilization.
The test is very simple, involving loading a 3MB image file several times, with the option to dispose of the object manually :
Collapse
private void Create (int n)
{
for (int i = 0; i {
ClassBeingTested cbt = new ClassBeingTested ();
cbt.LoadImage (“fish.jpg”); < br />
if (ckDisposeOption.Checked)
{
cbt.Dispose ();
}
< br />}
}
The unsuspecting fish, by the way, is a Unicorn Fish, taken at Sea World, San Diego California:
Observe what happens when I create 10 fish:
Ten fish took up 140MB, (which is odd, because the fish is only a 3MB file, so you think no more than 30MB would be consumed , but we won get into THAT).
Furthermore, observe that the destructors on the objects were never invoked:
If we create 25 fish, followed by another 10 , notice what happens to the time it takes to haul in the fish, as a result of heavy disk swapping:
This is now taking two seconds on average to load one fish! And did the GC start collecting garbage any time soon? No! Conversely, if we dispose of the class as soon as we e done using it (which in our test case is immediately), there is no memory hogging and no performance degradation. So, to put it mildly , it is very important to consider whether or not a class needs to implement the IDispose interface, and whether or not to manually dispose of objects.
Behind The Scenes
Let create one fish and then force the GC to collect it. The resulting trace looks like:
Observe that in this case, the destructor was called and managed resources were not manually disposed.
Now, instead, let create one fish with the dispose flag checked, then force the GC to collect it. The resulting trace looks like:
Observe in this case, that both managed and unmanaged resources are disposed , AND that the destructor call is suppressed.
Problems
As described above, even though an object is disposed, there is nothing preventing you from continuing to use the object and any references you may have acquired to objects that it manages, as demonstrated by this code:
Collapse
private void btnRefTest_Click (object sender, System.EventArgs e)
{
ClassBeingTested cbt = new ClassBeingTested ();
cbt.LoadImage (“fish.jpg”);
Image img = cbt.Image;
cbt.Dispose ();
Trace.WriteLine (“Image size = (” img.Width.ToString () “,” img.Height.ToString () “)”);
}
Of course, the result is:
Solutions
Ideally, one would want to assert or throw an exception when:
Dispose is called and managed objects are still referenced elsewhere
methods and accessors are called after the object has been disposed
Unfortunately (as far as I know) there is no way to access the reference count on an object, so it becomes somewhat difficult to determine if a managed object is still being referenced elsewhere. Besides require that the application “release” references, the best solution is to simply not allow another object to gain a reference to an internally managed object. In other words, the code:
Collapse
public Image Image
{
get {return img;}
}
should simply not be allowed in a “managing” class. Instead, the managing class should implement all the necessary support functions that other classes require, implementing a facade to the managed object. Using this approach, the application can throw an exception if the disposed flag is true – indicating that the object is still being accessed after it has technically been disposed of.
Conclusion – Unit Testing
The reason I went through this rigmarole is that I wanted to demonstrate the inadequacies of unit testing. For example, let us assume that the test class I described above does not implement IDisposable. Here we have an excellent example of how a single test on a class and its functions will succeed wonderfully, giving the illusion that all is well with a program that uses the class. But all is not well, because the class does not provide a means for the application to dispose of its managed resources, ultimately causing the entire computer system to bog down in fragmented memory and disk swapping .
This does not mean that unit testing is bad. It does however illustrate that it is far from a complete picture, and unit testing applications such as NUnit could use considerable growth in order to help the programmer automate more complex forms of unit testing.
And that, my friends, is going to be the topic of the next article.
Downloading The Demonstration Project
I have intentionally left out the “fish.jpg”, being 3MB in size. Please edit the code and use your own JPG if you wish to play with the code.
License
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
About the Author
Marc Clifton
Architect
Interacx < br />
United States
Member
February 15, 2011
correctly implemented the IDisposable the Dispose method using System;
using System.Collections.Generic;
using The System.Text;
namespace NET.MST.Third.FinalizeDispose
{
publicclass FinalizeDisposeBase: IDisposable
{
/ / mark object has been released
privatebool _disposed = false;
/ / Finalize method: destructor
~~ realized FinalizeDisposeBase ()
{
Dispose (false);
}
/ / IDispose Dispose method
publicvoid Dispose ()
{
Dispose (true);
/ / tell the GC for this object the Finalize method is no longer need to call
GC.SuppressFinalize (true);
}
/ / destructor here br />
/ / affirm for virtual methods for subclasses, when necessary, rewrite
protectedvirtualvoid the Dispose (bool isDisposing)
{
/ / When the object has been destructor no longer perform
if (_disposed)
return;
if (isDisposing release managed resource
)
{
/ / / / only executed when the user calls the Dispose method
}
/ / / / mark object has been released
_disposed = true;
< br />}
}
publicsealedclass FinalizeDispose: FinalizeDisposeBase
{
privatebool _mydisposed = false;
protectedoverridevoid Dispose (bool isDisposing)
{
/ / Don dispose more than once.
if (_mydisposed)
return;
if (isDisposing)
{
/ / here the release of hosted and in this type stated in the resources
}
/ / release unmanaged and affirmed in this type resource
/ / call the parent class the Dispose method to release the parent class resource
the
base.Dispose (isDisposing);
/ / set the subclass mark
_mydisposed = true;
}
staticvoid Main ()
{
}
}
}
. NET object actually has two functions for the release of resources: the Dispose and Finalize. Finalize the purpose is used to release unmanaged resources Dispose is to release all resources, including managed and unmanaged.
In this mode, the void Dispose (bool disposing) function to distinguish between a disposing parameter is currently Dispose () call or destructor calls (when disposing to “true”, indicating that the Dispose () is to be the program display call of the need to release the managed resources and unmanaged resources; when disposing as “false”, explain the Dispose () is to be the destructor function (also is the C # Finalize ()) call the, only need to release unmanaged resources).
This is because the Dispose () function is other code in the program explicitly call and demanded the release of resources, Finalize GC call. Other managed object referenced by GC call MyResource may not need to be destroyed, and even if destroyed, will be called by the GC. Finalize the need to release only unmanaged resources can be. On the other hand, in the Dispose () has released the managed and unmanaged resources, so again when the object is collected by the GC to call Finalize is not necessary, so called in the Dispose () GC.SuppressFinalize (this) to avoid duplication call the Finalize.
However, even if the repeated call Finalize and Dispose is not a problem, because the presence of variable _disposed resources will only be released once the extra calls will be ignored in the past.
Therefore, the above model to ensure that:
1, the Finalize only release unmanaged resources;
2, the Dispose release both managed and unmanaged resources ;
3, repeated calls to the Finalize and Dispose is no problem;
the Finalize and Dispose to share the same resources, the release strategy, so they do not conflict.
in C #, this model needs to explicitly, where C # destructor the ~ MyResource () represents the Finalize ().
on the release of resources, the last thing to mention is that the Close function. Semantic and Dispose is very similar, according to the MSDN, this function is to allow users to feel comfortable, because some objects such as files, the user is more accustomed to call the Close ().
Dispose and Close in the end What is the difference?
When we developed the C # code, often encounter a problem, some class offers the Close (), some class provides the Dispose () Dispose and Close in the end What is the difference?
First of all, the Dispose and Close should essentially be the same. Close is for those developers who are not familiar with the Dispose designed. Basically, all the developer know that Close is doing (especially for those who have a background of C developer).
But when we write the code, when, if you want to Close and Dispose of time, pay attention to the Close and Dispose design pattern. Net class is only available Close, and derived from the IDisposable, and hide the Dispose method. Is not that really do not understand?
such class, the key lies in the explicit (explicitly) to achieve the IDisposable. For implicit implementations, you only need to call the “new A (). The Dispose ()”, but is explicitly implement the Dispose will not be a member function of this class. The only call you need to cast to IDisposable job. (New A (). The Dispose () “to compile, however, but” ((the IDisposable) new A ()). The Dispose () “can be compiled). This in line with the requirements of the design: to provide the Close (), hide the Dispose (), and implements the IDisposable interface.
of. net framework, Close () is designed to be public, and Close (hidden) inside the call Dispose (); the Dispose () to call another virtual Dispose (bool ) function. So if you inherit from this class, you must implement the Dispose (bool) method.
caller call Close () when call to the overloaded Dispose (bool) method to release resources.
Please refer to http://blogs.msdn.com/brada/archive/2003/07/06/501 27.aspx
Note:
< br /> 1, the Close () should not be defined as the virtual. This design pattern, the Close () is used to call that hidden Dispose (), the user should not change the behavior of the Close. For this problem, System.IO.Stream to design problems. The only problem is that in order to meet the needs of backward compatibility. . See http://msdn2.microsoft.com/en-us/library/ms227422. Aspx. Documents mentioned in the Close () is virtual, but should not be the override.
sample code: using System;
using The System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Drawing.Imaging;
namespace ConsoleApplication
{
abstractclass MyStream: the IDisposable
{
/ / private field
private IntPtr m_unmanagedResource; the / / unmanaged resource
private Bitmap m_bitmap ; / / the IDisposable managed resources
privatebool m_disposed;
/ / constructor
the public MyStream ()
{
m_unmanagedResource = Marshal.AllocCoTaskMem (100);
m_bitmap = new Bitmap (50, 50);
}
/ / destructor, on behalf of the Finalize ()
~ MyStream ()
{
Dispose (false);
}
/ / realized IDispose in the Dispose method
void IDisposable.Dispose ()
{
Dispose (true);
/ / tell the GC this object Finalize method is no longer need to call
GC.SuppressFinalize (true);
< br />}
/ / destructor work
/ / declared as virtual methods for subclasses necessary to rewrite
protectedvirtualvoid Dispose (bool isDisposing)
{
/ / When the object has been destructor no longer perform
. if ( ! m_disposed)
{
if (isDisposing)
{
/ / free managed resources here
/ / only executed when the user calls the Dispose method
m_bitmap.Dispose ();
}
/ / here to release unmanaged resources
Marshal.FreeCoTaskMem (m_unmanagedResource) The;
/ / mark object has been released
m_disposed = true;
}
}
/ / explicitly (explicitly) to achieve the IDisposable
publicvoid Close ()
{
((the IDisposable) this). the Dispose ();
}
}
/ / /
/ / / subclass inherits from MyStream
/ / /
class MyDerivedStream: MyStream
{
/ / private field
private IntPtr m_anotherMemory;
private Bitmap m_anotherImage;
of privatebool m_disposed;
/ / constructor
public MyDerivedStream ()
{
m_anotherMemory = Marshal.AllocCoTaskMem (20);
m_anotherImage = new Bitmap (24, 24);
}
/ / overloaded Dispose method
protectedoverridevoid Dispose (bool isDisposing)
{
if (! m_disposed)
{
if (isDisposing)
{
/ hosting / release here and affirm in this type resource
m_anotherImage.Dispose () ;
}
/ / release unmanaged and affirmed in this type resource
Marshal.FreeCoTaskMem (m_anotherMemory); < br />
/ / call the parent class Dispose method to release the parent class resource
the
base.Dispose (isDisposing);
m_disposed = true; < br />
}
}
publicstaticvoid Main (string [] args)
{
MyStream aStream = new MyDerivedStream ();
aStream.Close (); / / Allowed
/ / aStream.Dispose (); / / Cannot compile
< br /> ((IDisposable) aStream). Dispose (); / / Allowed
/ /
/ / This one works as well, because newStream calls the explicit implemented < br />
/ / IDisposable.Dispose method
/ /
using (MyStream newStream = new MyDerivedStream ())
{
/ /
/ / Do something
/ /
}
}
}
}
XINGDA Group (BOOMGROUP.) February 16, 2012, was founded in 1996, the headquarters is located in Hangzhou, Zhejiang, known as “paradise,” said an area of ??over 6000 square meters, construction area of ??about 15,000 square meters. Since the company was southbound 10 km in the scenic West Lake, about 150 kilometers east of Shanghai, south 170 kilometers from Ningbo, May 2008, the smooth opening of the Hangzhou Bay Bridge makes the Yangtze River Delta closer links, transportation is very convenient. .
XINGDA Group is a collection of silicone rubber products, rubber products, auto parts, industrial rubber products, plastic products, metal products, mold manufacturing, new building materials and development in one large-scale comprehensive private enterprise. Group under the jurisdiction of Automotive Rubber Products Branch, Industrial Rubber Products Branch, silicone rubber products, branches, four branches of the rubber branch and Die Manufacturing Co., Ltd. of Hangzhou a new vision, new vision Plastics Co., Ltd. Hangzhou, Zhejiang new vision Industrial Co., Ltd. Hangzhou Green Landmark Landscape Decoration Co., Ltd. and a number of subsidiaries.
in rubber products, main products are rubber Yixingguan, sets, plugs, tablets, rings, mats, frames, etc. Industrial shaped pieces, inserts, a variety of reinforcing materials for seals, shock absorbers, rubber sleeve, and a variety of rubber metal parts, special rubber such as silicone rubber, fluorine rubber, butyl rubber, ethylene propylene rubber, neoprene, and other products of research and development, with the advanced level in the same industry. In plastic products, the Group professional provide all kinds of plastic products and parts for industrial, civil and other fields, mainly injection molding, extrusion, blow three manufacture of molding methods. Manufacture of rubber molds, plastic molds and metal molds in the mold manufacturing, not only for intra-group design, but also to undertake outside processing operations. The Group has the right to import and export products have been exported to Europe, America, Oceania, Japan and South Korea, the Middle East, Southeast Asia and other regions and countries.
Group has now established a set of perfect quality system, passed the ISO9001, ISO/TS16949 quality management system certification, ISO14001 environment management system and OHSMS18001 occupational health and safety management system certification. Has established performance testing room, equipped with advanced vulcanization tester, universal material testing machine, the analysis of scales, electronic hydrometer testing equipment and instruments, all kinds of rubber physical properties and chemical properties testing, optimize product performance and acquired the characteristics of rubber products, projectors, and to improve the accuracy of product testing. Various types of rubber physical and chemical properties tested in accordance with the U.S. ASTM2000, SAE-J200 and Japan JIS standard to meet the different needs of customers.
group of “quality first, customer first, scientific management, continuous improvement” business philosophy, brought together a large number of professionals in the industry, the core management team has a wealth of industry experience and in-depth development of the industry understanding. With a mature and stable management team, industry-leading equipment and technical strength, experienced marketing team, and if a good customer reputation, the Group is to build a new brand of the Chinese rubber products, plastic products, metal products, mold processing industry.
Xingda Group (BOOMGROUP) was founded in 1996. Its headquarter located in Hangzhou city, Zhejiang province, which is well known as “paradise” in the world. It covers an area of ??more than 6000 square meters and construction area is about 15,000 square meters.The group is about 10 kilometers north away from the West Lake, about 150 km south from Shanghai city and around 170 kilometers west from Ningbo city. In may 2008, the successful opening of the Hangzhou Bay Bridge makes the links within Yangtze River Delta even more closely.The transportation of us becomes more convenient.
Xingda Group is a large-scale comprehensive private enterprise, which concentrates on silicone products, auto rubber parts, industrial rubber products, plastic injection parts, hardwares, molds manufacturing, new materials development etc. It has several divisons.They are Auto rubber factory, Industrial rubber factory, Silicon rubber factory, Compounded rubber factory, as well as New Far-sight Molds Co., Ltd and New Far-sight Plastics Co., Ltd, Zhejiang New Far-sight industry Co., Ltd and Hangzhou Lvxuan landscape
November 11, 2010
In the fast paced world of plastic molding, injection mold design is one of the most interesting and challenging jobs to be found. You will draw upon a All of your creative reputation, the opportunities as you develop the design for new products. It might look easy because of the powerful CAD programs, but in reality, they are just tools to help you. In the field of injection mold design you often must develop new and original methods of plastic molding. This sometimes requires a lot of creativity and inventiveness. What is a typical day like for injection mold design? Most injection mold designers follow a schedule similar to the mold makers. Because their mold designs are soon going to be manufactured by the mold makers, there is a very close relationship between these two. A mold designer spends most of his time at his computer, using powerful CAD programs such as Unigraphics, AutoCAd, SolidWorks, MasterCam and many, many others. Nowadays, the programs are incredibly fast and powerful. Very often the mold designer will be required to communicate with the various mold makers, CNC programmers, WEDM operators, etc .. This rapport is critical for a successful career as an injection molder Usually the designer does not work quite as many hours per week as the mold maker. Often mold designers have a shop background and help out in the mold making shop as well. This is especially common if there is a slowdown in design and a lot of work in the shop. How do you become an injection mold designer? Essentially, there are two paths in the USA. One is to learn on the job and the other is to learn at a design school. Both are common and work well. Many plastic molding designers come from a mold making background. This is especially helpful to provide a realistic approach to mold design. There is no substitute for practical experience! Several tech schools and universities offer excellent courses on plastic injection mold design. A background in mechanics, spatial relationships, ability to visualize 3D parts, and mathematics are all essential . Is there a future in injection moldingdesign? Like everything else associated with the plastics industry, the answer is yes and no. Yes, because the plastics field is growing all the time and skilled designers are in high demand and low supply. No, because the field is so competitive on a global scale. In this electronic age the designer does not even need to be in the same country as the mold maker. I had this experience at one shop; the designer was in Canada and we were in the USA . It worked well, but required considerable phone time on the part of the project manager. Conclusion Working in injection mold design is challenging, interesting, secure, well paying and in demand. Anyone interested will find many good courses available and companies seeking qualified designers
January 10, 2012
Summary of plastic molding products is plastic as the main structural material obtained by molding products, also known as plastic parts, referred to as plastic parts. Plastic molding products are widely used, especially in electronic instruments, electrical equipment, communication tools, household items for a wide range of applications. A variety of uneven force shell, stand, base, structural parts, trim, etc.; building with a variety of plastic pipe, sheet metal and door and window profiles; hollow plastic containers and a variety of life plastic products.
main processing of plastic parts, plastic forming. Plastic molding is a plastic state, the various forms of plastic raw material (powder, granular, melt or dispersion) melting plasticizing or heating to meet the requirements under a certain pressure requires the shape of the mold or fill to the requirements of the mold cavity, Upon cooling and sizing to obtain the required shape, size, performance plastic parts production process. Which is characterized by the shape and size stability of production and products, to achieve continuous production, a mode, multi-piece production, high production efficiency.
common type of plastic molding process, injection molding, compression molding, blow molding, injection molding plastic molding molding method. Injection molding technology a lot of new technology, such as flow condensate material injection molding, injection molding of thermosetting plastics, exhaust injection molding, reaction injection molding as well as the many varieties of plastic injection molding.
Keywords:
plastic parts injection molding the Repetition machine back
injectiong mold
Abstract:
Plastic molding plastic products is the main structural material obtained by forming products, also known as plastic parts, plastic parts for short. Plastic molding products are widely used, especially in the electronic instruments, electrical equipment, communication tools, daily necessities, such as a large number of applications received. such as a large shell, frame, base, structural parts, decorative parts; all kinds of plastic pipe used in construction, sheet metal and profile windows and doors; hollow plastic containers and plastic products such as life.
The main processing of plastic parts are made of plastic processing method. Plastic molding is to various types of plastic raw materials (powder, granular, melt or dispersion) plastics melt or heating plastic to meet the requirements of state, to a certain shape under pressure after a request to the requirements of mold or mold-filled cavity, stereotypes to be cooling after it has been requested the shape, size, number of properties of plastic parts of the production process . Characterized by the shape of the production of dimensionally stable products, can realize continuous production, more than one mode of production, high productivity
Common type of plastic molding processes are injection molding, compression molding, Blow Molding and so on, plastic injection molding is a molding method of forming a major. Injection molding technology there are many new technical methods, such as material non-condensate flow injection molding, thermoset plastic injection molding, the exhaust injection molding, reaction injection molding, as well as the total number of varieties of plastic injection molding
Key words: strong> Plastic parts Injection molding
strong> < strong> directory
summary strong> strong> ……………………………………………………………….. 2
Introduction strong> ……………………………………………………………….. 5
The first part strong> strong> design issues and design purposes
strong> a content strong> ……… ……………………………………………… 6
two designed to strong> ………………………………… …………………… 6
the second part strong> mold design
strong> one, the product analysis of the process strong> …………………………………………… 7
Second, the injection molding machine of choice strong> ………… ……………………………………. 8
three to determine the mold the basic structure of strong> ………………………………… ……… 10
four, die structure design strong> ……………………………………………….. 10
< br /> five, mold the overall design strong> …………………………………………………… 19
summary strong> ………………………………………………………………….. 21
Reference] < / strong> …………………………………………………………… 22
Acknowledgements strong> …………….. ……………………………………………….. 23
strong> strong> strong> strong> Introduction
strong> mold is a very wide range of important technology and equipment used in industrial production, mold products, parts and components, has a high market efficiency, conservation of raw materials , low cost, to ensure the quality of a number of advantages, is an important means of modern industrial production and the main direction of development. Plastic products, has entered into people lives in various fields, most of the electrical appliances in plastic products. Plastic in its density, good mechanical properties, etc. dominate the world of the future is bound to the world of plastic, the mold is the cornerstone of the plastics industry.
The graduation project, under the careful guidance of Jiang Yuhua teacher repeater back cover injection mold design, in-depth study of the Proe, grasp the general approach of the injection mold design, mold manufacture of special equipment and injection machine works, has laid a solid foundation for future work.
This design lasted five weeks, the process is as follows: the first week in the guidance of their teachers to go on factory visits, the product of the injection molding process and mold manufacturing, initially that require their attention in the design process problems; the second week, a thorough understanding of their specific design requirements to be achieved. Calculated data to determine each of the parts used materials, heat treatment. The third week of product use Proe mold to complete the three-dimensional shape. The fourth week, on various parts drawings, organize information and prepare a design specification; the fifth week, and pay the instructor reviewed and modified, and finally finalized.
Lastly, due to the limited level, coupled with lack of experience, omissions and errors inevitable to ask you teacher correction.
strong> strong> strong> strong> the first part of strong> strong> design contents and designed to
strong> strong> to the repetition of the design elements: strong> back cover injection mold, the product (Figure 1) design an injection mold.
– Figure 1
the purpose of this design: strong> 1, grasp of the design of injection mold method.
understand the working principle of injection molding machine.
3, understand the mold.
4, and further understand the general design method, the general process of skilled design.
5 basic grasp of the proe cad mechanical drawing software.
the the strong> strong> strong> strong> strong> strong> the second part, strong> strong> strong> mold design
strong> a product analysis of the process
strong> 1 , material properties
strong> design of the product materials used for the ABS, all known as acrylonitrile – butadiene – benzene copolymer of styrene to the English full name of the study, the acrylonitrile-butadiene- ABS is a thermoplastic material, its density is 1.03 ~ 1.07g/cm3 tensile strength of 30 ~ 50Mpa, the bending strength 41 ~ 76Mpa, the contraction rate of 0.3 to 0.8%, 0.5% often. The good performance of the material, high impact strength, dimensional stability, ease of molding, heat and corrosion resistance is also good and has a good resistance to cold.
2 strong> , wall thickness of the structural technical
strong> Part basic uniform wall thickness greater than the plastic parts minimum wall thickness of 1.5mm, according to the pro / e simulation, injection molding does not occur to fill the shortage of the phenomenon.
strong> molding characteristics
strong> 1) of its hygroscopicity, plastic prior to molding must be fully dry and warm-up its moisture content should be less than 0.3%.
2) mobility of the medium, overflow side of the value of 0.04mm.
3) read the effect on the quality of plastic parts of the heating temperature of the plastic temperature is easy to decompose (decomposition temperature of 250 ° C). The molding should be a higher heating temperature (mold temperature 50 ~ 80 ° C) and higher injection pressure.
4 strong> strong> ABS strong> injection molding conditions of
strong> machine type: piston, screw can
density: 1.03 ~ 1.05g/cm3
shrinkage: 0.003 ~ 0.008
pre- paragraph 180 in the heat: 80 ~ 85 ° C
barrel temperature: preceding the middle of the 150 ~ 170 ° C
165 ~ 180 ° C
~ 200 ° C
nozzle temperature: 170 ~ 180 ° C
mold temperature: 50 ~ 80 ° C
injection pressure: 60 ~ 100Mpa,
molding: injection time: 20 ~ 90s
high time: 0 ~ 5s
cooling time: 20 ~ 120s
< br /> total cycle time: 50 ~ 220s
, injection machine choose
strong> the quality of a product is 21 grams, according to the following formula, Select the maximum injection volume of the injection machine:
KG public ≥ NG, G waste
where K = 0.8
N cavity number
G said public public for the injection molding machine injection volume
G-quality waste product weight
G for the various parts of cold material
N = 1 according to design requirements and processing economic proe G Waste = 5.628g
G public ≥ (21 5.628) x 1.25
< br /> = 33.285 (g)
means that the injection machine injection amount is greater than 33.285 g. Reference to the mold design and manufacturing Concise Handbook “to select the nominal injection volume of 60 cm 3 of the injection molding machine, the model is XZ-60/40, that is to say the injection machine nominal injection volume of approximately 60 g.
XZ-60/40 injection machine parameters are as follows:
screw diameter: 30 mm
theoretical injection capacity: 60 cm 3
injections Pressure: 180Mpa
clamping force: 400KN
template travel: 250mm
mold thickness: Max 250 mm
minimum 80 mm
Ejector Stroke: 70 mm
nozzle: the ball radius R10
hole diameter D3
positioning hole diameter: D800, 0.06 top (center hole) diameter: the D50
below check all parts of the parameters:
1, injection volume
KG Public = 0.8 × 60
= 48 (g)
NG, parts G to waste = 1 × 21 5.628
< br /> = 33.285 (g)
Obviously KG public NG, parts G to waste, in line with the conditions
2, the injection pressure check
public = 180MPa
the injection pressure P Note 70 ~ 100MPa
clamping force check
F ≥ K, PmA
type F – injection machine rated clamping force (KN)
of Pm – the cavity of the average pressure (MPa)
K – factor of safety, take 1.1 to 1.2
A – plastic parts and gating system in the parting surface of the projected area of ??the C m
by calculating the A = 9492mm2 ≈ 94.8 C m
F = 400KN
K PmA = 1.2 × 35 × 106 × 9 492 × 106 = 39 866 4N
F> K PmA eligible
template installation dimensions
320 × 320 maximum installation size can install a 250 × 250 die
5, the mold thickness
designed mold thickness is 245 mm less than the maximum mold thickness 250mm.
Third, determine the basic structure of the mold
strong> strong> The analysis of the parts forming must use bilateral outward pumping core, while the part of the shell parts requirements smooth surface, no details of traces, optional gate form overlapping gate point gate and submarine gate. Point gate to remove the gate marks left in the products outside the surface of the product is acceptable to the back cover. Must be double-injection mold parting surface, also known as the three-plate injection mold, it adds a movable intermediate plate (also known as the gate board). Mold due to the restrictions set away from the ring-pull, the middle plate and base plate of the fixed mold fixed distance separation, in order to remove the condensate material within the flow channel between the two plates, while the use of plastic parts on the putter will be core prolapse.
In summary, select the double-injection mold parting surface, point the gate feed Bevel column in the fixed mold, the slider in the dynamic simulation of the oblique guide pin pulling mechanism, putting top out.
four, die structure design
strong> 1, to determine the cavity number and configuration
this product from the maximum injection volume and economic considerations, should adopt a single cavity. The product forming area of ??large, complex shape, the distance between the cavity and flow stable and the same pressure to make each part of the product, and should therefore be as short as possible, quickly and evenly filled with every part of plastic melt, so that mold the overall balance and stability.
2, the parting surface
mold closure is in contact with the surface of the cavity and core is called the parting surface. In order to facilitate the drag mold parting surface should be set to the largest place in the plastic parts of the section size, with minimal impact on the appearance of the products. According to the structural characteristics of plastic parts, the main parting surface is located in the upper surface of the plastic parts, perpendicular to the mold opening direction. The mold used is the point gate, in order to remove the material of the runner within the condensate, a push flow channel plate, in this setting fixed mold base plate between the increase in the fixed mold and a vertical parting line, perpendicular to the mold opening direction, See the assembly diagram.
strong> from the site of injection machine nozzle and mold in contact with the gating system design
1) sprue gating system to divert Road up to the plastic melt flow channel. Because the election is a horizontal injection molding machine, the sprue vertical parting surface. The bulk of inverted cone and the cone angle of 3 °, gate kit for cone, the cone angle of 2 °. (Figure 2)
November 24, 2011
sleeve Config: institutions Labelhi-pot: high pressure label Firmwarelabel: burn labels Metalcover: metal lid Plasticcover: plastic lid Tapeforpacking: packing tape Barcode: Barcode Tray: tray Collecto: Holder, set of clamps: fixator, L iron Connecter: connector IDE: integrated circuit devices, intelligent disk devices to SCSI: Small Computer System Interface Gasket: conductive foam AGP: Accelerated Graphics Port PCI: peripheral component expansion interface LAN: LAN USB : General Slim of string-shaped bus architecture: the miniaturization COM: serial communication port LPT: LPT parallel port Powercord: power cord I / O: input, output the Speaker: The speaker of EPE: Carton, foam: carton the Button: button, buttons footstand: the terminology of the name of the QS of the tripod department the: Qualitysystem quality system CS: CoutomerSevice customer service QC: Qualitycontrol quality management of IQC: Incomingqualitycontrol feed test LQC: LineQualityControl production line quality control IPQC to: Inprocessqualitycontrol process test the FQC: Finalqualitycontrol final inspection
Pood English OQC and: Outgoingqualitycontrol shipment inspection QA: Qualityassurance Quality Assurance SQA: Source (supplier) QualityAssurance supply of goods quality assurance (the VQA) the CQA: CustomerQualityAssurance customer quality assurance PQArocessQualityAssurance process quality to ensure that the QE: Qualityengineer Quality Engineering CE: componentengineering parts engineering EE: equipmentengineering Equipment Engineering ME: manufacturingengineering Manufacturing Engineering TE: testingengineering test engineering PPEroductEngineer product engineering IE: Industrialengineer Industrial Engineering ADM: AdministrationDepartment Administration Department an RMA: Customer returned to the maintenance of CSDI: maintenance PC: producingcontrol, raw tube MC the: matercontrol property management GAD : GeneralAffairsDept General Affairs Department, the A / D: Accountant / FinanceDept accounting the LAB: Laboratory, Laboratory of the DOE: Experimental Design HR: human capital the PMC: Planning the RD: R
November 16, 2011
This is two things.
The first thing the day before to, go to the toy factory to the sidewalk to buy a three-year-old birthday gift scooters, two-year-old after midnight from the crane, one-year-old hours of is the tricycle. , Are the car, did not buy the automatic class car, I feel a child, or more training automatic contrived to sweep away. Prior representations and sidewalk on the hours you had a birthday you want to play chess shoes or scooters, the sidewalk did not know that is seen or said to be over, one finds chess shoes, went to the hours put on trial under shoes re-ah, not speech, and her father escorted a good thing, put our feet touch the pain of a difficult, at first to console, should not another big play, as four-year-old birthday gifts, sidewalk despite difficulties, the election was white baby skateboard
the electronic point of the entire group of devices Rectifier
weapons IgnitionModule
reversing apparent control RearViewDisplay
pacer CruiseController
Pacific combines the HID headlights HIDBallastCompleteSetfor
Headlights
tank decorated with exterior LED lights LEDLamp
lights to master LightingController
before the coil module IgnitionCoilModule
goods ExteriorParts
body care hood RadiatorGrille
Ground Antenna
Bridge
, SideProtector
crash pad BumperPad
rearview mirror DoorMirror
whitewash stickers, tags the OrnamentMark
round the the arc FenderTrim
alluvial fan MudGuard
spoiler Spoiler < br />
former bumper GuardAssy of (Front)
the bumper GrardAssy (Rear) installed the product ExteriorParts
built-in products InteriorParts
measuring board InstrumentPanel
local compartment Console
hole plug GrommetPlug
the carpet FloorMat
seat belt SeatBelt
door the handrail DoorArmrest
door handles DoorHandle
car the locks DoorLock
roof the lining RoofLining
windows depreciate the crank WindowLifterHandle
windows the elevator WindowLifter
waterproof lining Weatherstrip
fuel gauge FuelGauge
door the plaque DoorTrim
indoor the mirror RoomMirror
sound speaker
(to cover SpeakerCover
automatic) seat (Electric) Seat
canopy Headlining
ashes cylinder Ashtray
various types of insulation pad AllKindsofSilencer
< br /> trim / molding pressure of Garnish / the Trim
measuring the plaque InstrumentPanelGarnish
Windshield Sunvisor
Moulding
< br /> cigarette lighter CigarLighter
spare tire board TrimforSpareTire
skylights SunRoof
compartment the board RearParcelShelf
compartment trim RearTrunkTrim
built products InteriorParts
measuring board bracket InstrumentalPanelMounting.
other Others
the attendant Machine Tools < br />
jin, Jack
nylon rope, Trinidad and Tobago Long rope NylonRope
consumption, testing and painting facilities Production, TestPainting
Equipment
all kinds of manhole covers Cap Cover,
Button CargoLash The,
Clip discipline Clamp, Clip
oil seal oil soil and standard the mold ClayModelandMasterModel
OilSeal
the hinges DoorHinge
wrong tag Reflector
Glass the glass repair
RepairingMaintenance
electric smelting PowderMetallurgy
Bearings Bearing
plastic PlasticParts
sound insulation material HeatInsulator
electronic mat class of ElectricalParts
Seal, Gasket, Washer., Packing
. brushless CarbonBrush
Tube Pipe, Hose, Tube
copper class Bushing
stretched the spring the Spring
English
mode folder, governance, submit Die, Fixture, Jig, Checking
Gauge
rubber RubberParts
Pump, Pump
bolt / nut / screw Nut / Bolt / Screw
forging (processing) ForgingParts (Processing)
filter class Filter
< br /> lock Lock
mirror class Mirror
smelting (processing) CastingParts (Processing)
hood hinge HingeofEngineHood
< br /> TEUs hinge HingeofTrunkLid
safety lever support MountofBumper
CAD / CAM deck vision of CAD / CAMCarBodyDesign
bus clean and take care of themselves necessities CosmeticsforAutomobile
paint Paints is
decomposition of the wood SyntheticWood
solenoid valve SolenoidValve
hot water valve HeaterValve
refrigerant solenoid valve RefrigerateSolenoidvalve
glass slide GlassRun
double-sided tape AcrylicFoamTape
catalytic converter buffer cotton CatalyticConverterMate
< br /> smoke filter DieselParticleFilter
vehicle destruction weapons Extinguisher
components Data ComponentsMaterials
bus remarks the phone CarHand-to freeMobilePhone
bus nameplate Nameplate taken into consideration the fragmented CarSecuritySystem
bus pilot the fragmented CarNavigationSystem
natural the leather ArtificialLeather
< br />
bus water brain CarComputer
radio, tire pressure detection instrument WirelessTireMonitor
bus built to fight high-profile LeatherforCarInterior
wax machine buffer (CarPolisher,),
the nonmetal nominal address (data) MetalSurfaceTreatment
(Material)
connectors ConnectorClip
< br /> spare tire pressure warning device TireLowPressureIndicator
oil pressure sensor in the measuring sensor WaterTemperatureSensor
OilPressureSensor
butter EngineOil
English goods of Chinese goods title
Chinese
title
English
Active gearbox oil AutomaticTransmissionOil
Zhubian the add the agent OilAdditive
hot to solve FinishedBicycle
HeatTreatment
the Bicycle
vehicle from the crown block class
normal children from the village car by ATB of the crown block RegularBicycle
tricycle Tricycle
third the car TandemBicycle
car JunvenilesBicycle
Indoor Activity Vehicle (Bike) the Exerciser
unicycle Unicycle
chain from the crown block ChainlessBicycle
the MTB MountainBicycle
off-road vehicles TrekkingBicycle
racing (since being car) RacingBicycle
automatic overhead traveling crane ElectricalBicycle
Folding Scooter (Electric) from the crown block FoldingBicycle
Beach the car BeachBicycle
(automatic) KickBoard
Scooter lt;br />
Other
of the special from the crown block OtherSpecial-purpose the
Bicycles
suspension bike SuspensionBicycle
Transmission Transmission
flywheel Flywheel handle the group ChainwheelCrank
chain the Chain
the gearlever ShiftLever
transmission Derailleur
automatically from the crown block the motor ElectricBicycleMotor
automatically since the crown block, grasp the handlebars of the device ElectricBicycleDriver
cone box GearBox
? car WheelandBrake < br />
wheel with Tire
folders the type? car device CaliperBrake
the QR QuickRelease
hub HubFreeHub
< br /> English
hydraulic? car the device HydraulicBrake
feet? car the device CoasterBrake
disc? car device DiskBrake
< br /> Wheels Rim
spoke / spoke cap Spoke / Nipple
cantilevered? car device CantileverBrake
master the PULL ControlCable
? car to make the piece BrakeLiningShoe
Accessories Accessories
bell Bell,
Reflectors Reflector
tea pot-frame BottleCage
playing pump FloorPump, *** Sticker Sticker,
shelves LuggageCarrier,
schedule SpeedMeter
speaker Horn,
lights the Dynamo / LightingSet
assisted round TrainingWheel
alluvial fan MudGuard / the Fender
helmet Helmet
Lock Lock
chain. cover ChainCover
basket Basket
rearview mirror RearMirror < br />
body Body
derrick Frame
the handle HandleBar
axis components (heart) BottomBracketParts
driver with HandleStrap
car components Headset
the fork FrontFork
fork shoulder ForkCrown
fork end RearForkEnd
Rod SeatPost
seat lever the beam SeatPostClamp
parking stent Kickstand
connector LugShell, < br />
his assistant, the handle BarEnd
risers Stem
bolt / nut / screw Nut, / Bolt, / Screw
shock the fork SuspensionFork
shock absorbers ShockAbsorber
tee-wayPipe
five-way tube 5-wayPipe
derrick
information FrameMaterials Others
saddle Saddles
teapot frame BottleCage
holdfast flow Block Pivot
the
given toe ToeClip
shining light the Flasher
toe the entrainment ToeStrap
Grip glove
round plastic parts PlasticParts
pedals Pedal
brushless CarbonBrush
stretched spring Spring
ring cover WheelCover
Forging Parts (Processing) ForgingParts (Processing)
wire Cable,
mode, folder, governance, submit Die, electric vehicles price, Fixture, JigChecking
Gauge
rubber RubberParts
consumption, testing and painting facilities Production, TestPainting
cushion-sets SaddleCover
paint Paints is
inflatable material the Charger
measure recorded TemperatureRecorder
quantitative battery pack meter the BatteryCapacityIndicator
automatically from the crown block pathway envisaged ElectricBicycleCircuit
Design
automatic self crown block battery pack group
ElectricBicycleBatterySet
locomotive class of the Motorcycle
vehicle
toys, limit the dazzle shadow creative street toys. Is the best choice you give the enemy or child birthday gift
choose. Each designed to give children new sad happy not stop play, to see people envy
Mu does not have a large diameter steel pipe rose 50 yuan yesterday ultimate Hyun shadow not only the only sought after and love children, he is gradually
step into our career, you can not do without a new coat, but not been able to limit the dazzle shadow street toy
< br />. Children is now struggling to education no Chi Lingzui on Internet cafes to save pocket money, are possession of a
dreaming limit Hyun shadow toys, there is no change in the thin baby, there is no
When the bedroom Man “did not do a” network young man, do the once debilitating sad child. Come on let you cool the rise of the rise of child
child sad.
Our operations in all ethnic groups in the form of retail wholesale shopping can be! Reminder: who are shop if the whole of the production
products purchased to protect the restaurant are Accessories sale. Scooters PV wear high elasticity light wheel, electric cars, brake
car line, automatic car battery switches and the like ~ ~ ~
I Taobao:
, http://shop.taobao.com
contact: Hao Chaoming
Contact Tel: 15,533,084,337
Contact Location: Handan, Hebei Yongnian Dabei Wang