BỘ GIÁO DỤC VÀ ĐÀO TẠO
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP. HỒ CHÍ MINH
THI MƠN HỌC: LẬP TRÌNH ĐỒ HỌA
Ngành:
KỸ THUẬT CƠ ĐIỆN TỬ
Lớp:
19DCTJA1
Giảng viên hướng dẫn: PHẠM QUỐC PHƯƠNG
Sinh viên thực hiện: Lê Trần Quang Duy
Mã SV: 1911820427
Lớp: 19DCTJA1
Tp.HCM, ngày 15 tháng 10 năm 2022
BỘ GIÁO DỤC VÀ ĐÀO TẠO
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP. HỒ CHÍ MINH
THI MƠN HỌC: LẬP TRÌNH ĐỒ HỌA
Ngành:
KỸ THUẬT CƠ ĐIỆN TỬ
Lớp:
19DCTJA1
Giảng viên hướng dẫn: PHẠM QUỐC PHƯƠNG
Sinh viên thực hiện: Lê Trần Quang Duy
Mã SV: 1911820427
Lớp: 19DCTJA1
Tp.HCM, ngày 15 tháng 10 năm 2022
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Đề thi: thiết kế Front Panel nhận dạng 3 màu
Yêu cầu:
- Color 1 => Y0 (Speech: color1)
-- Color
Color 23 =>
=> Y1
Y2 (Speech:
(Speech: color2)
color3)
MSSV:1911820427
Pixel 800 x 600
Color 1: R: 82
G: 04
B: 27
1
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Color 2: R: 92
G: 14
B: 37
2
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Color 3: R: 72
G: 04
B: 17
3
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
NỘI DUNG THIẾT KẾ PHẦN MỀM VÀ MƠ HÌNH PHẦN MỀM
1. Chương trình PLC
Thứ tự thực hiện:
Bước 1: Chạy phần mềm GX-Works 3
Hình 1. Phần mềm GX-Works 3
Bước 2: “Project” => PLC iQ-F (FX-5U)
Bước 3: Viết chương trình PLC
Hình 2 Code PLC
Bước 4: Chạy Simulation
Bước 5: Click chuột phải chọn Connection => Directly Connect to CPU
4
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Hình 3 Kết nối trực tiếp với CPU
Bước 6:Nhập ID Address of Adapter
Bước 7:Click chuột phải chọn “Communication Test” để kiểm tra thành cơng
hay chưa
2.Chương trình MX OPC Serve
Thứ tự thực hiện:
Bước 1:Chạy phần mềm MX-OPC
Bước 2: Click chuột phải tạo New MX Device
Hình 4 Tạo New MX Device
Bước 3:Select transfer setup => Chọn Dev => Chọn configure
5
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Bước 4: chọn PC side I/F: “Enthernet board”
Hình 5 Kết nối với Enthernet board
Bước 5: chọn Connect module: “CPU module”
Hình 6 Kết nối với module CPU
Bước 6: chọn Protocol “TCP” => Next
Bước 7: Click chuột trái chọn “Find CPU” => “OK”
Hình 7 Tìm kiếm địa chỉ
Bước 8: Click chuột phải chọn “Host station”
6
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Hình 8 Lựa chọn Sation
Bước 9: Finish
Bước 10: Click chuột trái chọn Comm.Test the connection để kiểm tra thành
công hay chưa
Bước 11: “OK” => “Save”
Bước 12: Click chuột phải chọn “New data Tag” để tạo các tag
Hình 9 Tạo tag
Bước 13: Gán “Name” và “I/O Address”
Hình 10 Gán tên và địa chỉ
7
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Bước 14: Chạy “Monitor View” để giám sát các “Tag”
Hình 11 Trạng thái các tag
3.Chương trình LABVIEW
Thứ tự thực hiện
Bước 1: chạy phần mềm Labview
Hình 12 Phần mềm Labview
Bước 2: Chọn “Blank project”
Bước 3: Chọn “File”
Bước 4: Chọn “New IV”
Bước 5: Viết chương trình Labview
Bước 6: Kết nối các “Tag” từ MX OPC sang “Labview”
Hình 13 Kết nối với I/O Server
Bước 7: Chọn “OPC Cilent”
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
8
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
Hình 14 Tạo I/O Server
Bước 8: Click chuột trái chọn “Mitsubishi.MXOPC.6” => “OK”
Bước 9: Click chuột phải chọn “Create Bound Variables”
Hình 15 Tạo Bound Variables
Bước 10: Add các “Tag” từ MX OPX sang “Labview” => “OK”
Hình 16 Thêm các tag vừa tạo qua Labview
Bước 11: “Tạo New VI”
Bước 12: Thiết kế “Front Panel” và chạy chương trình
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
9
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau
MON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mauMON.hoc.lap.TRINH.do.hoa.de.thi.thiet.ke.front.panel.nhan.dang.3.mau