VIETNAM NATIONAL UNIVERSITY, HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY ---o0o--- DESKTOP PROJECT REPORT Course: Industrial Automation CLASS: TT01 INTRUCTOR: Dr.. Truong Dinh Chau HO
Trang 1VIETNAM NATIONAL UNIVERSITY, HO CHI MINH CITY
UNIVERSITY OF TECHNOLOGY -o0o -
DESKTOP PROJECT REPORT Course: Industrial Automation
CLASS: TT01
INTRUCTOR: Dr Truong Dinh Chau
HO CHI MINH CITY, OCTOBER 2022
Trang 22
I.P&ID Diagram 3
II Working principle 3
III State diagram 4
IV Output table for M1_1, M1_2, M2_1, M2_2, V3_1, V3_2 and Agitator 4
V Code 5
Trang 33
I
The system consists of 2 tanks, in which Tank 1 is filled by pump M1_1 and M1_2, and Tank 2 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 2 The process is controlled by a PLC
II Workingprinciple
- When START is pressed, M1_1 pumps into Tank 1 After 10 seconds, M2_2 starts pumping until HI_1 is TRUE (Tank 1 is full)
- When HI_1 is TRUE, both M2_1 and M2_2 start pumping into Tank 2 until HI_2 is TRUE (Tank 2 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 2 until LO_2 is TRUE (Tank 2 is empty)
At the same time M1_1 and M2_2 also start refilling Tank 1 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 2 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
Trang 44
III
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 1 is full
IV Output table for M1_1, M1_2, M2_1, M2_2, V3_1, V3_2 and Agitator
Trang 55
V
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");
Trang 6Recommandé pour toi
6
"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" <= 0 THEN
"LEVEL_TANK_1" := 0;
END_IF;
END_IF;
IF "LEVEL_TANK_1" > 98 THEN
"HI_1" := TRUE;
ELSE
"HI_1" := FALSE;
END_IF;
IF "LEVEL_TANK_1" < 2 THEN
Suite du document ci-dessous
Trang 7Fundamentals of digital logic with verilog design third edition
Final Assignments of General Phyisics Labs
De thi Library cal1 - tài liệu
4
864
12
22
Trang 87
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" <= 0 THEN
"LEVEL_TANK_2" := 0;
END_IF;
END_IF;
IF "V3_2" AND "R_TRIG_DB".Q THEN
"LEVEL_TANK_2" := "LEVEL_TANK_2" - 3;
IF "LEVEL_TANK_2" <= 0 THEN
"LEVEL_TANK_2" := 0;
END_IF;
END_IF;
Trang 98
"HI_2" := TRUE;
ELSE
"HI_2" := FALSE;
END_IF;
IF "LEVEL_TANK_2" < 2 THEN
"LO_2" := TRUE;
ELSE
"LO_2" := FALSE;
END_IF;
Code for Agitator animation (FBD):
Trang 109
VI
Initial state, the START button is not pressed:
START button is pressed, M1_1 and M1_2 are ON:
When Tank 1 is full, M2_1 and M2_2 are ON:
Trang 1110
When Tank 2 is full, AGITATOR is ON:
Trang 1211
Tank 1: