Thông tin tài liệu
VIETNAM NATIONAL UNIVERSITY, HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY o0o - DESKTOP PROJECT REPORT Course: Industrial Automation CLASS: TT01 INTRUCTOR: Dr Truong Dinh Chau Vy Đức Kiên 1951010 HO CHI MINH CITY, OCTOBER 2022 Contents I P&ID Diagram II Working principle III State diagram IV Output table for M1_1, M1_2, M2_1, M2_2, V3_1, V3_2 and Agitator V Code I P&ID Diagram The system consists of tanks, in which Tank is filled by pump M1_1 and M1_2, and Tank is filled by pump M2_2 and M2_1 Two level sensors are installed on each tank to indicate maximum and minimum liquid level Valve V3_1 and V3_2 are used to drain Tank The process is controlled by a PLC II Working principle - When START is pressed, M1_1 pumps into Tank After 10 seconds, M2_2 starts pumping until HI_1 is TRUE (Tank is full) - When HI_1 is TRUE, both M2_1 and M2_2 start pumping into Tank until HI_2 is TRUE (Tank is full) - When HI_2 is TRUE, agitator starts mixing for 10s and turns off, then both V3_1 and V3_2 are opened to let the mixture out of Tank until LO_2 is TRUE (Tank is empty) At the same time M1_1 and M2_2 also start refilling Tank until it becomes full again, then stop - When LO_2 is TRUE, V3_1 and V3_2 are closed, M2_1 and M2_2 start pumping into tank again, and the process repeats itself - The system stops at any state when the STOP button is pressed Pressing START after that will start the system at its initial state S0 III State diagram S0: Initial state S1: M1_1 is ON S2: M1_1 and M1_2 are ON S3: M1_1 and M1_2 are OFF, M2_1 and M2_2 are ON S4: M2_1 and M2_2 are OFF, Agitator is ON S5: Agitator is OFF, V3_1 and V3_2 are ON; M1_1 and M1_2 are ON until tank is full IV S0 S1 S2 S3 S4 S5 Output table for M1_1, M1_2, M2_1, M2_2, V3_1, V3_2 and Agitator M1_1 1 0 M1_2 0 0 M2_1 0 0 M2_2 0 0 V3_1 0 0 V3_2 0 0 Agitator 0 0 V Code Code for main function block: "T10s_1".TON(IN := "S1", PT := T#10s); "T10s_2".TON(IN := "S4", PT := T#10s); // TRANSITION EQUATIONS "T00" := "FirstScan"; "T01" := "S0" AND "START"; "T12" := "S1" AND "T10s_1".Q; "T13" := "S1" AND "HI_1"; "T23" := "S2" AND "HI_1"; "T31" := "S3" AND "LO_1"; "T34" := "S3" AND "HI_2"; "T45" := "S4" AND "T10s_2".Q; "T53" := "S5" AND "LO_2"; "T10" := "S1" AND "STOP"; "T20" := "S2" AND "STOP"; "T30" := "S3" AND "STOP"; "T40" := "S4" AND "STOP"; "T50" := "S5" AND "STOP"; // STATE EQUATIONS "S0" := ("S0" OR "T00" OR "T10" OR "T20" OR "T30" OR "T40" OR "T50") AND NOT "T01"; "S1" := ("S1" OR "T01" OR "T31") AND NOT "T12" AND NOT "T13" AND NOT "T10"; "S2" := ("S2" OR "T12") AND NOT "T23" AND NOT "T20"; "S3" := ("S3" OR "T23" OR "T13"OR "T53") AND NOT "T34" AND NOT "T31" AND NOT "T30"; "S4" := ("S4" OR "T34") AND NOT "T45" AND NOT "T40"; "S5" := ("S5" OR "T45") AND NOT "T53" AND NOT "T50"; // OUTPUT EQUATIONS "M1_1" := "S1" OR "S2" OR ("S5" AND NOT "HI_1"); "M1_2" := "S2" OR ("S5" AND NOT "HI_1"); "M2_1" := "S3"; "M2_2" := "S3"; "AGITATOR" := "S4"; "V3_1" := "S5"; "V3_2" := "S5"; Code for water level simulation in tank 1: "R_TRIG_DB"(CLK := "Clock_1Hz"); IF "M1_1" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_1" := "LEVEL_TANK_1" + 2; IF "LEVEL_TANK_1" >= 100 THEN "LEVEL_TANK_1" := 100; END_IF; END_IF; IF "M1_2" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_1" := "LEVEL_TANK_1" + 2; IF "LEVEL_TANK_1" >= 100 THEN "LEVEL_TANK_1" := 100; END_IF; END_IF; IF "M2_1" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_1" := "LEVEL_TANK_1" - 2; IF "LEVEL_TANK_1" 98 THEN "HI_1" := TRUE; ELSE "HI_1" := FALSE; END_IF; IF "LEVEL_TANK_1" < THEN Recommandé pour toi Suite du document ci-dessous Thichquamonmakthichhoc Electromagnetic field 864 Fundamentals of digital logic with verilog design third edition Digital System 12 100% (5) Final Assignments of General Phyisics Labs General Physics Labs 22 100% (2) 100% (3) De thi Library cal1 - tài liệu General Physics Labs 100% (1) "LO_1" := TRUE; ELSE "LO_1" := FALSE; END_IF; Code for water level simulation in tank 2: "R_TRIG_DB_1"(CLK := "Clock_1Hz"); IF "M2_1" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_2" := "LEVEL_TANK_2" + 2; IF "LEVEL_TANK_2" >= 100 THEN "LEVEL_TANK_2" := 100; END_IF; END_IF; IF "M2_2" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_2" := "LEVEL_TANK_2" + 2; IF "LEVEL_TANK_2" >= 100 THEN "LEVEL_TANK_2" := 100; END_IF; END_IF; IF "V3_1" AND "R_TRIG_DB".Q THEN "LEVEL_TANK_2" := "LEVEL_TANK_2" - 3; IF "LEVEL_TANK_2"
Ngày đăng: 23/05/2023, 15:05
Xem thêm: