Nghiên cứu giảm thiểu dao động sức căng sợi trong quá trình đánh ống tốc độ cao

103 58 0
Nghiên cứu giảm thiểu dao động sức căng sợi trong quá trình đánh ống tốc độ cao

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Nghiên cứu giảm thiểu dao động sức căng sợi trong quá trình đánh ống tốc độ cao Nghiên cứu giảm thiểu dao động sức căng sợi trong quá trình đánh ống tốc độ cao Nghiên cứu giảm thiểu dao động sức căng sợi trong quá trình đánh ống tốc độ cao luận văn tốt nghiệp,luận văn thạc sĩ, luận văn cao học, luận văn đại học, luận án tiến sĩ, đồ án tốt nghiệp luận văn tốt nghiệp,luận văn thạc sĩ, luận văn cao học, luận văn đại học, luận án tiến sĩ, đồ án tốt nghiệp

BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI -o0o LUẬN VĂN THẠC SỸ KHOA HỌC NGÀNH: CÔNG NGHỆ VẬT LIỆU DỆT NGHIÊN CỨU GIẢM THIỂU SỰ DAO ĐỘNG SỨC CĂNG SỢI TRONG QUÁ TRÌNH ĐÁNH ỐNG TỐC ĐỘ CAO TẠ THANH NAM NGƯỜI HƯỚNG DẪN KHOA HỌC: PGS.TS LÊ HỮU CHIẾN HÀ NỘI – 2008 LỜI CẢM ƠN Báo cáo kết nghiên cứu đề tài "Nghiên cứu giảm thiểu dao động sức căng sợi trình đánh ống tốc độ cao " kết học tập nghiên cứu thân, thực Khoa Công nghệ dệt may thời trang, trường Đại học Bách Khoa Hà Nội, Phân Viện Dệt May TP Hồ Chí Minh Trước hết, xin gửi lời cảm ơn đến Quý Thầy Cô Khoa Công nghệ dệt may thời trang trường Đại học Bách Khoa Hà Nội không ngại đường xa đến giảng dạy cho lớp cao học chun ngành thành phố Hồ Chí Minh niên khóa 2006 - 2008 Tôi xin chân thành cảm ơn Thầy PGS.TS Lê Hữu Chiến, Lãnh đạo Phân Viện Dệt May anh chị đồng nghiệp, tận tình hướng dẫn, giúp đỡ tơi hồn thành luận văn Học viên Cao Học Tạ Thanh Nam TÓM TẮT LUẬN VĂN Sức căng sợi thông số quan trọng q trình gia cơng sợi cần kiểm soát thường xuyên Mức độ thường xuyên việc kiểm soát phụ thuộc vào loại q trình kỹ thuật gia cơng sợi đánh ống, xe sợi chập sợi đòi hỏi việc kiểm sốt sức căng sợi tốc độ cao chất lượng bán thành phẩm sản xuất hoàn toàn phụ thuộc vào đồng sức căng sợi Khi xem xét q trình gia cơng dệt kim, dệt thoi, mắc sợi…, sợi làm căng trước cách sử dụng thiết bị thô sơ, việc kiểm tra vận hành cách thiết bị tạo sức căng sợi không liên tục Tuy nhiên, hiệu tất trình phụ thuộc lớn vào sức căng sợi Hiện nay, số thiết bị quấn ống nhà máy chuẩn bị dệt nước ta thường sử dụng phận tạo sức căng khí Khi sợi tở với tốc độ cao, tạo sức căng không đáp ứng yêu cầu công nghệ sức căng sợi không đổi suốt q trình quấn ống Sức căng sợi ln dao động khỏang rộng nên dùng đồng hồ đo sức căng người thợ điều chỉnh cơng nghệ khó khăn việc chỉnh sức căng sợi theo yêu cầu Mục tiêu luận văn để giảm thiểu dao động sức căng sợi máy quấn ống tốc độ cao, cụ thể máy quấn ống DEAWON Pirn Winder DWP-2 Sợi quấn ống máy bán thành phẩm đem xe máy xe Two-for-One Kết sau nghiên cứu chế tạo hệ thống giảm thiểu dao động sức căng sợi trình quấn ống tốc độ cao Đây hệ thống điện tử ứng dụng lý thuyết đại điều khiển tự động vào việc đo lường kiểm soát sức căng sợi máy ống THESIS ABSTRACT The result of the research is to bulid a system to reduce tension variation in the process of winding at a high speed This is a mechatronic system, applying modern theories of automatic control to measuring and controlling the yarn tension on winding machines Yarn tension is one of the most important parameters in several textile processes and needs to be checked regularly The frequency of this check depends on the kind of process Yarn processing techniques such as winding, twisting and cabling require a high speed control of yarn tension, because the quality of package produced completely depends on the uniformity of yarn tension Whereas in processes such as knitting, weaving, and warping, the yarn is pre-tensioned using primitive means and checks on the proper functioning of the tensioning device is intermittent However, the efficiency of all these processes greatly depends on the yarn tension Nowadays, a number of winding machines in pre-weaving plants in our country often use tension-creating devices in mechanical way When the fibers are out at a great speed, tension-creating devices not meet the requirements for the technology of constant yarn tension during the winding process Yarn tension is always fluctuating in a wide range, so when a tension meter is used, the operator will face difficulties in adjusting the required yarn tension The objective of this research is how to minimize the variation of yarn tension on the high-speed winding machine,e.g.on DEAWON Pirn Winder DWP-2 machine.Yarn will be wound a bobbin on the machine and semi-finished products will be twisted on a Two-for-One machine MỤC LỤC CHƯƠNG I : TỔNG QUAN 1.1 Ý nghĩa quan trọng việc tạo kiểm soát sức căng sợi q trình đánh ống 1.2 Phân tích yếu tố ảnh hưởng tới sức căng dao động sức căng sợi máy ống 1.3 Tổng quan hệ thống tạo kiểm soát sức căng sợi hệ máy ống 1.3.1 Đo sức căng sợi 1.3.2 Nguyên lý tạo sức căng sợi 1.3.3 Hệ thống tự động đo lường kiểm soát sức căng sợi 1.4 Các nghiên cứu nước liên quan đến vấn đề nghiên cứu 1.5 Định hướng nghiên cứu, nội dung nghiên cứu mục đích đặt 1.6 Ý nghĩa khoa học thực tiễn đề tài Trang 5 13 14 21 23 25 28 28 CHƯƠNG : NỘI DUNG VÀ PHƯƠNG PHÁP NGHIÊN CỨU 2.1 Đối tượng nghiên cứu 2.2 Lựa chọn phương án nghiên cứu 2.3 Phương pháp nghiên cứu 29 29 29 30 CHƯƠNG : KẾT QUẢ VÀ BÀN LUẬN 3.1 Thiết kế khí 3.2 Thiết kế hệ thống điều khiển a) Sơ đồ nguyên lý mạch cho vi xử lý Atmega16 b) Mạch cầu H động DC Servo c) Sơ đồ nguyên lý mạch cầu H d) Tìm hiểu động DC Servo e) Tìm hiểu điều khiển PID 3.3 Cảm biến lực 3.4 Lưu đồ giải thuật dùng cho hệ thống giảm thiểu sức căng sợi 3.4.1 Lưu đồ giải thuật phần dẻo cho vi xử lý Atmega16 3.4.2 Lưu đồ giải thuật phần mềm giao tiếp máy tính vi xử lý Atemga16 3.5 Kết đo sức căng sợi 3.5.1 Kết đo lực căng sợi từ thực nghiệm sản xuất 3.5.2 Kết đo lực căng sợi từ giảm thiểu dao động sức căng sợi 3.6 Bàn luận 32 32 39 40 43 47 49 51 55 56 56 57 Trang 58 58 59 61 KẾT LUẬN KHOA HỌC I Những kết luận rút từ kết nghiên cứu II Những đề xuất hướng nghiên cứu 63 63 63 PHỤ LỤC MÃ NGUỒN CHƯƠNG TRÌNH PHẦN MỀM I Mã nguồn phần mềm điều khiển nạp cho Atmega16 II Mã nguồn phần mềm giao tiếp máy tính vi xử lý Atemga16 TÀI LIỆU THAM KHẢO 65 65 82 96 MỤC LỤC HÌNH Hình 1: Tỉ lệ sức căng sợi T2/T1 hàm số góc tiếp xúc sợi với bề mặt hệ số ma sát chúng Hình 2: Hình dạng đỉnh sức căng sợi suốt trình tở sợi Hình 3: Giá trị lực căng sợi tăng tăng tốc độ trình tở sợi Hình 4: Sức căng sợi theo khoảng cách từ đầu búp sợi đến sứ dẫn sợi tốc độ khác búp sợi có đường kính khác Hình 5: Sự biến thiên sức căng sợi suốt trình tở sợi từ bề mặt nhẵn bóng đến bề mặt xù xì Hình 6: Nguyên lý hoạt động máy xoắn giả vị trí cảm biến lắp đặt Hình 7: Các đo sức căng sợi hãng Baer, Mercer, Heal, Rothschild, Schmidt Hình 8: a) Đồng hồ đo sức căng sợi cầm tay b) Cảm biến đo sức căng sợi Hình 9: Rothschild Electronic Tensio-Meter R-2000 Hình 10: a) đồng hồ đo sức căng sợi DX2 hãng Schmidt, b) đồng hồ đo sức căng sợi ODT hãng Checkline Hình 11: Mạch cầu điện trở Wheatstone Hình 12: Phân loại hệ thống đo lường kiểm sốt sức căng sợi Hình 13 : Bộ tạo sức căng theo nguyên lý cộng số Hình 14 : Bộ tạo sức căng theo nguyên lý bù hệ số Hình 15 : Bộ tạo sức căng theo nguyên lý cộng số kết hợp với nguyên lý bù hệ số Hình 16 : Những kiểu khác tạo sức căng Hình 17 : Bộ tạo sức căng thực tế Hình 18 : Hệ thống Savio’s ORION Online Tensor® kiểm sốt sức căng sợi quấn ống Hình 19 : a) Cơ cấu bù căng sợi [USP 4778118] b)Bộ cấp sợi sức căng không đổi KTF BTSR Trang 7 10 13 14 15 16 17 18 21 21 22 22 22 23 24 Hình 20: Bộ kiểm sốt balơng vịng sợi (Bal-Con) máy ống Murata No21C Process coner Automatic Winder Hình 21: Biểu đồ sức căng sợi tở sợi khơng có gắn Bal-Con Hình 22: Biểu đồ sức căng sợi tở sợi có gắn Bal-Con Hình 23: Bộ kiểm soát sức căng sợi quấn ống Hình 24: Biểu đồ sức căng sợi quấn ống Hình 25: Bộ Tension Ruler máy VORTEX 861 Hình 26: Biểu đồ sức căng sợi kiểm soát Tension Ruler Hình 27: Biểu đồ sức căng sợi khơng kiểm sốt Hình 28: máy quấn ống DEAWON Pirn Winder DWP-2 Hình 29 : Nguyên lý hoạt động hệ thống giảm thiểu sức căng sợi chọn để chế tạo Hình 30 : Bản vẽ Puly quấn sợi Hình 31 : kích thước động Servo chọn sử dụng Hình 32: vẽ lắp puly quấn sợi động Hình 33: Bát dẩn sợi chạy khỏi puly quấn sợi Hình 34: Bát dẩn sợi chạy vào puly quấn sợi Hình 35: Bản vẽ lắp điều tiết sức căng sợi Hình 36: Bản vẽ lắp kéo sợi Hình 37: Mặt trước hệ thống giảm thiểu dao động sức căng sợi Hình 38: kéo sợi vào họng hút sợi Hình 39: hình mặt bên hệ thống giảm thiểu dao động sức căng sợi Hình 40a : Sơ đồ nguyên lý mạch điều khiển dùng vixử lý ATMega16 Hình 40b : Sơ đồ nguyên lý mạch điều khiển dùng vi sử lý ATMega16 Hình 41 : Sơ đồ mạch in dùng vi xử lý ATMega16 Hình 42 : Sơ đồ nguyên lý mạch cầu H điều khiển động Servo DC Hình 43 : Sơ đồ mạch in mạch cầu H Hình 44 : Đơng DC Servo hãng Nanotec Hình 45 : Lưu đồ đo lường kiểm soát sức căng sợi theo nguyên lý PID Hình 46 : Cảm biến SSM Hình 47 : kích thước Cảm biến Hình 48 : Lưu đồ giải thuật dùng cho vi xử lý ATMega16 Hình 49 : Lưu đồ giải thuật phần mềm giao tiếp máy vi tính vi xử lý ATMega16 Hình 50 : Biểu đồ sức căng máy DeaWon lúc sợi có đường kính 250 mm Hình 51: Biểu đồ sức căng máy DeaWon lúc sợi có đường kính 200 mm Hình 52: Biểu đồ sức căng lúc sợi có đường kính 250 mm Trang 26 26 26 27 27 27 27 28 29 30 32 33 33 34 34 35 37 38 38 39 40 41 42 47 49 50 54 55 55 56 57 58 59 60 Hình 53: Biểu đồ sức căng lúc sợi có đường kính 200 mm MỤC LỤC BẢNG Bảng 1: Sự khác biệt sức căng tở sợi lý thuyết thực nghiệm tính từ nghiên cứu Padfield Bảng 2: Bảng tính thiết bị đo sức căng sợi Bảng 3: Bảng kết lực căng sợi quấn ống máy DeaWon Bảng 4: Bảng kết lực căng sợi sử dụng hệ thống giảm thiểu dao động Trang 60 12 20 59 61 CHƯƠNG I: TỔNG QUAN 1.1 Ý nghĩa quan trọng việc tạo kiểm sốt sức căng sợi q trình đánh ống: Sức căng sợi thông số quan trọng q trình gia cơng sợi cần kiểm soát thường xuyên Mức độ thường xuyên việc kiểm soát phụ thuộc vào loại q trình kỹ thuật gia cơng sợi đánh ống, xe sợi chập sợi đòi hỏi việc kiểm sốt sức căng sợi tốc độ cao chất lượng bán thành phẩm sản xuất hoàn toàn phụ thuộc vào đồng sức căng sợi Khi xem xét q trình gia cơng dệt kim, dệt thoi, mắc sợi…, sợi làm căng trước cách sử dụng thiết bị thô sơ, việc kiểm tra vận hành cách thiết bị tạo sức căng sợi không liên tục Tuy nhiên, hiệu tất trình phụ thuộc lớn vào sức căng sợi Trong q trình quấn ống, thơng số cơng nghệ quan trọng ảnh hưởng trực tiếp đến chất lượng bán thành phẩm suất công đoạn sức căng sợi Nếu sức căng sợi nhỏ, búp sợi không đạt độ cứng cần thiết đơi khơng thực q trình quấn ống Ngược lại, sức căng sợi lớn, sợi bị đứt nhiều, nhiều thời gian dừng quấn sợi để nối sợi, sợi có nhiều mối nối, chất lượng búp sợi suất máy ống giảm đáng kể Vì vậy, tùy theo yêu cầu bán thành phẩm mà sợi phải có sức căng hợp lý suốt trình quấn ống Sự thay đổi sức căng sợi mang lại thay đổi triệt để theo nhiều cách khác Trước tiên ảnh hưởng đến tính chất vật lý sợi tạo độ bền kéo đứt độ đàn hồi Sức căng mức sợi định hướng mắt xích cấu trúc phân tử sợi đó, làm ảnh hưởng đến độ bền sợi Đồng thời, định hướng này, cấu trúc sợi tinh thể hóa chuyển từ trạng thái vơ định hình sang tinh thể, mà điều ảnh hưởng đến vẻ bề ngoài, khả nhuộm màu tính mềm mại vải sản xuất Điều xem ví dụ cho sợi xơ ngắn sợi filament, chúng sử dụng quy trình sản xuất vải thơng thường Nếu sợi sử dụng cho việc sản xuất vải kỹ thuật sản phẩm sợi mành làm lốp ôtô hay sợi kỹ thuật, sức căng sợi ảnh hưởng đến độ bền sợi sản xuất ra, mà điều làm giảm chất lượng sợi cách đáng kể Trang 1.2 Phân tích yếu tố ảnh hưởng tới sức căng dao động sức căng sợi máy ống Để thiết kế phát triển hệ thống đo sức căng sợi động, người ta cần kiến thức toàn diện việc tạo sức căng biến thiên cấu trúc sợi nhờ vào chuyển động chúng bề mặt cứng Do nghiên cứu liên quan đến việc phân tích mang tính lý thuyết thay đổi sức căng xơ sợi xem xét lại Trong suốt đường mình, sợi trình dệt chịu loại lực ma sát: ma sát tĩnh ma sát trượt Lực ma sát tĩnh định nghĩa lực ma sát mà sợi phải chịu qua bề mặt không chuyển động Điều thấy hầu hết trình dệt quấn ống, mắc sợi, dệt thoi dệt kim Ma sát trượt xuất sợi bề mặt mà qua chuyển động tương cọ sát vào Có thể có mức độ trượt định hệ số ma sát trượt nhỏ hệ số ma sát tĩnh Sức căng tạo sợi suốt trình phần ma sát chi tiết tạo sức căng góc tiếp xúc sợi với bề mặt mà qua Nó chịu lực ma sát với bề mặt lực ma sát sơ hặc sợi chạy μθ Phương trình Capstan (T2 = T1 e ) thường sử dụng việc tính tốn sức căng đầu trường hợp sợi qua móc hình trụ (với T1 sức căng đầu vào T2 sức căng đầu sợi) Nhiều nhà nghiên cứu đưa phiên cải tiến phương trình cách xem xét yếu tố khác độ cứng đường kính sợi Tuy nhiên, lý thuyết phát triển ngày không xem xét đến nhiều yếu tố khác loại vật liệu, tốc độ sợi, độ săn sợi, đường kính Capstan, số độ nhám Capstan yếu tố phụ khác điều kiện khí hậu Do đó, dù cịn khơng xác phương trình Capstan vẩn công thức dùng phổ biến nghành công nghiệp dệt ngày Hình cho thấy tỉ lệ sức căng sợi T2/T1 hàm số góc tiếp xúc sợi với bề mặt hệ số ma sát chúng Rõ ràng là, ta thấy từ hình sức căng sợi tăng đáng kể hệ số lực ma sát tăng từ 0.1 đến 0.4 Ngoài yếu tố đề cập đến trên, sức căng sợi thay đổi tở sợi từ búp sợi Sự biến thiên sức căng sợi xem biến đổi ngắn hạn hay dài hạn Sự biến đổi ngắn hạn đỉnh đồ thị sức căng mà xảy chu kỳ tở sợi suốt trình tở sợi từ trước sau từ sau trước búp sợi Sự biến đổi dài hạn xem biến thiên sức căng sợi xảy giảm đường kính búp sợi Lý thuyết cho Trang End Sub Private Sub PaintTension(ByVal Tension As Double) Dim Y1, Y2 As Integer Dim pMyPen As New Pen(Color.Black) Dim Speed As Double If Tension < 100 Then Tension = pMyPen.DashStyle = DashStyle.Solid Y1 = Y0 + Cao - PixelDonVi * Tension Y2 = Y0 + Cao - OldTension * PixelDonVi If OldThoiGian = ThoiGian Then gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + ThoiGian, Y2) Else gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + OldThoiGian, Y2) End If OldTension = Tension Speed = Val(txtSpeed.Text) If Speed > Then pMyPen.Color = Color.Red pMyPen.DashStyle = DashStyle.Solid Y1 = Y0 + Cao - PixelDonVi * Speed Y2 = Y0 + Cao - OldSpeed * PixelDonVi If OldThoiGian1 = ThoiGian Then gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + ThoiGian, Y2) Else gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + OldThoiGian1, Y2) End If OldSpeed = Speed End If PtTension.Image = BitmapTension OldThoiGian1 = ThoiGian OldThoiGian = ThoiGian End Sub Private Sub PaintSpeed(ByVal Speed As Double) Dim Y1, Y2 As Integer Dim pMyPen As New Pen(Color.Red) pMyPen.DashStyle = DashStyle.Solid Y1 = Y0 + Cao - PixelDonVi * Speed Y2 = Y0 + Cao - OldSpeed * PixelDonVi If OldThoiGian1 = ThoiGian Then gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + ThoiGian, Y2) Else gMyGraphics.DrawLine(pMyPen, X0 + ThoiGian, Y1, X0 + OldThoiGian1, Y2) End If PtTension.Image = BitmapTension ' PtTension.Image.r.Refresh() OldSpeed = Speed OldThoiGian1 = ThoiGian End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click gMyGraphics.DrawLine(Pens.Blue, 0, 0, 100, 100) PtTension.Image = BitmapTension End Sub Trang 85 Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click ThoiGian = PaintXY() comm.PortName = "Com1" comm.Parity = "None" comm.StopBits = "One" comm.DataBits = "8" comm.BaudRate = "19200" comm.DisplayWindow = txtTension comm.DisplaySpeed = txtSpeed comm.OpenPort() comm.WriteData("@1500000") 'Timer2.Enabled = True End Sub Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click comm.WriteData("@2xxxxxx") ' comm.ClosePort() Timer1.Enabled = False End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ' ThoiGian = ThoiGian + If ThoiGian = 700 Then ThoiGian = ' PaintTension(Val(txtTension.Text)) ' PaintSpeed(Val(txtSpeed.Text)) End Sub Private Sub txtTension_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTension.TextChanged PaintTension(Val(txtTension.Text)) End Sub Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked End Sub Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click comm.WriteData("@3xxxxxx") End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub txtSpeed_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSpeed.TextChanged PaintTension(Val(txtTension.Text)) If Val(txtSpeed.Text) Then Label4.Text = Val(txtSpeed.Text) * 30 & " rpm" End If End Sub Trang 86 Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick MsgBox(ThoiGian) End Sub End Class Trang 87 Modun : giao tiếp điều khiển cổng COM : Imports System Imports System.Text Imports System.Drawing Imports System.IO.Ports Imports System.Windows.Forms Imports VB = Microsoft.VisualBasic '**************************************************************************** Public Class CommManager #Region "Manager Enums" ''' ''' enumeration to hold our transmission types ''' Public Enum TransmissionType Text Hex End Enum ''' ''' enumeration to hold our message types ''' Public Enum MessageType Incoming Outgoing Normal Warning [Error] End Enum #End Region #Region "Manager Variables" 'property variables Private _baudRate As String = String.Empty Private _parity As String = String.Empty Private _stopBits As String = String.Empty Private _dataBits As String = String.Empty Private _portName As String = String.Empty Private _transType As TransmissionType Private _displayWindow As TextBox Private _displaySpeed As TextBox Private _GraphTension As PictureBox Private _msg As String Private _type As MessageType 'global manager variables Private MessageColor As Color() = {Color.Blue, Color.Green, Color.Black, Color.Orange, Color.Red} Private comPort As New SerialPort() Private write As Boolean = True Dim StReceive As String Dim T1 = Dim T2 = Dim dem As Double = #End Region #Region "Manager Properties" ''' ''' Property to hold the BaudRate ''' of our manager class ''' Public Property BaudRate() As String Get Return _baudRate End Get Trang 88 Set(ByVal value As String) _baudRate = value End Set End Property ''' ''' property to hold the Parity ''' of our manager class ''' Public Property Parity() As String Get Return _parity End Get Set(ByVal value As String) _parity = value End Set End Property ''' ''' property to hold the StopBits ''' of our manager class ''' Public Property StopBits() As String Get Return _stopBits End Get Set(ByVal value As String) _stopBits = value End Set End Property ''' ''' property to hold the DataBits ''' of our manager class ''' Public Property DataBits() As String Get Return _dataBits End Get Set(ByVal value As String) _dataBits = value End Set End Property ''' ''' property to hold the PortName ''' of our manager class ''' Public Property PortName() As String Get Return _portName End Get Set(ByVal value As String) _portName = value End Set End Property ''' ''' property to hold our TransmissionType ''' of our manager class ''' Public Property CurrentTransmissionType() As TransmissionType Get Return _transType Trang 89 End Get Set(ByVal value As TransmissionType) _transType = value End Set End Property ''' ''' property to hold our display window ''' value ''' Public Property DisplayWindow() As TextBox Get Return _displayWindow End Get Set(ByVal value As TextBox) _displayWindow = value End Set End Property ''' ''' property to hold our display Speed window ''' value ''' Public Property DisplaySpeed() As TextBox Get Return _displaySpeed End Get Set(ByVal value As TextBox) _displaySpeed = value End Set End Property ''' ''' Property to hold the message being sent ''' through the serial port ''' ''' ''' ''' Public Property Message() As String Get Return _msg End Get Set(ByVal value As String) _msg = value End Set End Property ''' ''' Message to hold the transmission type ''' ''' ''' ''' Public Property Type() As MessageType Get Return _type End Get Set(ByVal value As MessageType) _type = value End Set End Property #End Region #Region "Manager Constructors" ''' Trang 90 ''' Constructor to set the properties of our Manager Class ''' ''' Desired BaudRate ''' Desired Parity ''' Desired StopBits ''' Desired DataBits ''' Desired PortName Public Sub New(ByVal baud As String, ByVal par As String, ByVal sBits As String, ByVal dBits As String, ByVal name As String, ByVal rtb As TextBox) _baudRate = baud _parity = par _stopBits = sBits _dataBits = dBits _portName = name _displayWindow = rtb 'now add an event handler AddHandler comPort.DataReceived, AddressOf comPort_DataReceived End Sub ''' ''' Comstructor to set the properties of our ''' serial port communicator to nothing ''' Public Sub New() _baudRate = String.Empty _parity = String.Empty _stopBits = String.Empty _dataBits = String.Empty _portName = "COM1" _displayWindow = Nothing 'add event handler AddHandler comPort.DataReceived, AddressOf comPort_DataReceived End Sub #End Region #Region "WriteData" Public Sub WriteData(ByVal msg As String) Select Case CurrentTransmissionType Case TransmissionType.Text 'first make sure the port is open 'if its not open then open it If Not (comPort.IsOpen = True) Then comPort.Open() End If 'send the message to the port comPort.Write(msg) 'display the message _type = MessageType.Outgoing _msg = msg + "" + Environment.NewLine + "" DisplayData(_type, _msg) Exit Select Case TransmissionType.Hex Try 'convert the message to byte array Dim newMsg As Byte() = HexToByte(msg) If Not write Then DisplayData(_type, _msg) Exit Sub End If 'send the message to the port comPort.Write(newMsg, 0, newMsg.Length) 'convert back to hex and display _type = MessageType.Outgoing _msg = ByteToHex(newMsg) + "" + Environment.NewLine + "" Trang 91 DisplayData(_type, _msg) Catch ex As FormatException 'display error message _type = MessageType.Error _msg = ex.Message + "" + Environment.NewLine + "" DisplayData(_type, _msg) Finally _displayWindow.SelectAll() End Try Exit Select Case Else 'first make sure the port is open 'if its not open then open it If Not (comPort.IsOpen = True) Then comPort.Open() End If 'send the message to the port comPort.Write(msg) 'display the message _type = MessageType.Outgoing _msg = msg + "" + Environment.NewLine + "" DisplayData(MessageType.Outgoing, msg + "" + Environment.NewLine + "") Exit Select End Select End Sub #End Region #Region "HexToByte" ''' ''' method to convert hex string into a byte array ''' ''' string to convert ''' a byte array Private Function HexToByte(ByVal msg As String) As Byte() If msg.Length Mod = Then 'remove any spaces from the string _msg = msg _msg = msg.Replace(" ", "") 'create a byte array the length of the 'divided by (Hex is characters in length) Dim comBuffer As Byte() = New Byte(_msg.Length / - 1) {} For i As Integer = To _msg.Length - Step comBuffer(i / 2) = CByte(Convert.ToByte(_msg.Substring(i, 2), 16)) Next write = True 'loop through the length of the provided string 'convert each set of characters to a byte 'and add to the array 'return the array Return comBuffer Else _msg = "Invalid format" _type = MessageType.Error ' DisplayData(_Type, _msg) write = False Return Nothing End If End Function #End Region #Region "ByteToHex" ''' Trang 92 ''' method to convert a byte array into a hex string ''' ''' byte array to convert ''' a hex string Private Function ByteToHex(ByVal comByte As Byte()) As String 'create a new StringBuilder object Dim builder As New StringBuilder(comByte.Length * 3) 'loop through each byte in the array For Each data As Byte In comByte builder.Append(Convert.ToString(data, 16).PadLeft(2, "0"c).PadRight(3, " "c)) 'convert the byte to a string and add to the stringbuilder Next 'return the converted value Return builder.ToString().ToUpper() End Function #End Region #Region "DisplayData" ''' ''' Method to display the data to and ''' from the port on the screen ''' ''' _ Private Sub DisplayData(ByVal type As MessageType, ByVal msg As String) '_displayWindow.Text = msg _displayWindow.Invoke(New EventHandler(AddressOf DoDisplay)) End Sub #End Region #Region "OpenPort" Public Function OpenPort() As Boolean Try 'first check if the port is already open 'if its open then close it If comPort.IsOpen = True Then comPort.Close() End If 'set the properties of our SerialPort Object comPort.BaudRate = Integer.Parse(_baudRate) 'BaudRate comPort.DataBits = Integer.Parse(_dataBits) 'DataBits comPort.StopBits = DirectCast([Enum].Parse(GetType(StopBits), _stopBits), StopBits) 'StopBits comPort.Parity = DirectCast([Enum].Parse(GetType(Parity), _parity), Parity) 'Parity comPort.PortName = _portName 'PortName 'now open the port comPort.Open() 'display message _type = MessageType.Normal _msg = "Port opened at " + DateTime.Now + "" + Environment.NewLine + "" DisplayData(_type, _msg) 'return true Return True Catch ex As Exception DisplayData(MessageType.[Error], ex.Message) Trang 93 Return False End Try End Function #End Region #Region " ClosePort " Public Sub ClosePort() If comPort.IsOpen Then _msg = "Port closed at " + DateTime.Now + "" + Environment.NewLine + "" _type = MessageType.Normal DisplayData(_type, _msg) comPort.Close() End If End Sub #End Region #Region "SetParityValues" Public Sub SetParityValues(ByVal obj As Object) For Each str As String In [Enum].GetNames(GetType(Parity)) DirectCast(obj, ComboBox).Items.Add(str) Next End Sub #End Region #Region "SetStopBitValues" Public Sub SetStopBitValues(ByVal obj As Object) For Each str As String In [Enum].GetNames(GetType(StopBits)) DirectCast(obj, ComboBox).Items.Add(str) Next End Sub #End Region #Region "SetPortNameValues" Public Sub SetPortNameValues(ByVal obj As Object) For Each str As String In SerialPort.GetPortNames() DirectCast(obj, ComboBox).Items.Add(str) Next End Sub #End Region #Region "comPort_DataReceived" ''' ''' method that will be called when theres data waiting in the buffer ''' ''' ''' Private Sub comPort_DataReceived(ByVal sender As Object, ByVal e As SerialDataReceivedEventArgs) 'determine the mode the user selected (binary/string) Select Case CurrentTransmissionType Case TransmissionType.Text 'user chose string 'read data waiting in the buffer Dim msg As String = comPort.ReadExisting 'display the data to the user _type = MessageType.Incoming _msg = msg StReceive += msg DisplayData(MessageType.Incoming, msg + "" + Environment.NewLine + "") Exit Select Case TransmissionType.Hex Trang 94 'user chose binary 'retrieve number of bytes in the buffer Dim bytes As Integer = comPort.BytesToRead 'create a byte array to hold the awaiting data Dim comBuffer As Byte() = New Byte(bytes - 1) {} 'read the data and store it comPort.Read(comBuffer, 0, bytes) 'display the data to the user _type = MessageType.Incoming _msg = ByteToHex(comBuffer) + "" + Environment.NewLine + "" DisplayData(MessageType.Incoming, ByteToHex(comBuffer) + "" + Environment.NewLine + "") Exit Select Case Else 'read data waiting in the buffer Dim str As String = comPort.ReadExisting() 'display the data to the user _type = MessageType.Incoming _msg = str + "" + Environment.NewLine + "" DisplayData(MessageType.Incoming, str + "" + Environment.NewLine + "") Exit Select End Select End Sub #End Region #Region "DoDisplay" Private Sub DoDisplay(ByVal sender As Object, ByVal e As EventArgs) Dim ViTrib, ViTria As Integer Dim Luc As String = "" Dim Speed As String = "" ViTrib = InStr(StReceive, "b@") ViTria = InStr(StReceive, "a@") If (ViTrib 0) And (ViTria 0) Then If ViTria > ViTrib Then Speed = Mid(StReceive, ViTrib + 3, ViTria - ViTrib - 3) If Val(Speed) = Then Debug.Print(Speed & "bb") StReceive = Mid(StReceive, ViTria + 2) ViTrib = InStr(StReceive, "b@") If ViTrib > Then Luc = Mid(StReceive, 2, ViTrib - 1) StReceive = "" End If Else Luc = Mid(StReceive, ViTria + 3, ViTrib - ViTria - 2) StReceive = Mid(StReceive, ViTrib + 2) ViTria = InStr(StReceive, "a@") If ViTria > Then Speed = Mid(StReceive, 2, ViTria - 2) If Val(Speed) = Then Debug.Print(Speed & "aa") StReceive = "" End If End If End If _displayWindow.SelectedText = String.Empty ' _displayWindow.SelectionFont = New Font(_displayWindow.SelectionFont, FontStyle.Bold) ' _displayWindow.SelectionColor = MessageColor(CType(_type, Integer)) Trang 95 If Val(Luc) Then _displayWindow.Text = Format(Val(Luc) / 10, "#.##") '.AppendText(_msg) _displaySpeed.Text = Speed dem = dem + 'T2 = VB.Timer If dem = 33 Then 'T2 = VB.Timer 'MsgBox(dem) 'T1 = VB.Timer ThoiGian = ThoiGian + 'If ThoiGian = 700 Then ThoiGian = dem = End If End If _displayWindow.ScrollToCaret() End Sub #End Region End Class Trang 96 TÀI LIỆU THAM KHẢO Vivek Prasad Shankam Narayana – Novel Method for Dynamic Yarn Tension Measurement and Control in Direct Cabling Process Godawat, P., “Experimental Verification of Non-Linear Behavior of Over-end Yarn Unwinding From Cylindrical Packages”, Master’s Thesis, North Carolina State University, 2003 Kurilenko, Z., N., Matyushev, I., I., Goncharenko, A., F., Mel’nikov, V., I., “Yarn tension during unwinding from a package”, Khimicheskie Volokna, No 3, May-June 1980 Popova, G., K., Efremov, E., D., “The yarn tension in unwinding from cone bobbin under warping conditions”, Technology of Textile Industry, U.S.S.R., Vol 1, 1970 Schmenk, B., Wulfhorst, B., Gries, T., Schedukat, N., “New developments for online quality control in high speed false-twist texturing”, Man-made Fiber Yearbook, August 2003 Moser, B., “Basics of friction in textile technology”, Melliand Textilberichte, Vol 70, January 1989 Takashi IMAMURA, Tessuya KUROIWA, Kazuhiko TERASHIMA, Hidehiro TAKEMOTO – Design and tension control of filament winding system Ulugbek R Umirov, Seong Hyun Jung, Chang Wook Han, Jung Il Park School of Electrical Engineering and Computer Science Yeungnam University, Gyeongsan -Tension Control for High Quality Take-up of Yarn Transport Machine National Textile Center Research Briefs – Fabrication Competency: June 2003 - Nonlinear Dynamics of High-Speed Transport for Staple Yarns 10 By Kumeo Nakajima and Katsutoshi Kuribayashi , Members, Textile Machinery Society of Japan - Problems Concerning Detecting Device for Speed and Tension Control of Running Yarns and Fabrics Trang 97 11 Stuart R Ball - Analog Interfacing to Embedded Microprocessor Systems 12 Hanoi University Of Technology; Faculty of Textile, Garment Technology and Fashion Design – The influence of technological parameters on yarn tension in the winding process Giang Thu Huong and Coworker 13 Hanoi University Of Technology; Faculty of Textile, Garment Technology and Fashion Design – Determination of yarn tension in the winding process Giang Thu Huong and Coworker 14 Ngô Diên Tập – Kỹ Thuật Vi điều khiển với AVR, nhà xuất Khoa học kỹ thuật, Năm 2003 15 DataSheet ATMega16 hãng ATMEL 16 DataSheet IR2110 17 DataSheet IRF640 18 Help CodeVisionAVR Trang 98 CÁC TRANG WEB THAM KHẢO http://www.btsr.com/ http://www.saurer.com/ http://www.temco.de/ http://www.checkline.com http://www.tensitron.com http://www.rothschild.com http://www.hpinfotech.com http://www.nanotec.de http://hubbard.engr.scu.edu/embedded/avr/boards/index.html 10 http://www.hiendaihoa.com/Solution_details.php?gp_id=24 11 http://www.dientuvietnam.net/ 12 http://picvietnam.com/forum/ 13 http://www.microsyl.com/ 14 www.lancos.com 15 www.imagecraft.com Trang 99 ... giảm thiểu dao động sức căng sợi Hình 38: kéo sợi vào họng hút sợi Trang 38 Hình 39: hình mặt bên hệ thống giảm thiểu dao động sức căng sợi Tỉ lệ tốc độ động truyền động cho puly quấn sợi động. .. Quấn ống tốc độ cao + Sản lượng cao + Giảm balơng vịng sợi ống sợi + Giảm độ dao động sức căng sợi từ lúc ống sợi đầy hết ống sợi Trang 25 Hình 20: Bộ kiểm sốt balơng vịng sợi (Bal-Con) máy ống. .. tính tốn thống kê số liệu nhằm đánh giá dao động sức căng sợi Tất nghiên cứu nhằm mục đích giải giảm thiểu dao động sức căng sợi điều tiết sức căng sợi cách tích cực suốt q trình quấn ống mà không

Ngày đăng: 22/02/2021, 21:09

Tài liệu cùng người dùng

Tài liệu liên quan