B¸o c¸o tèt nghiÖp Ph¹m V¨n ThuËn T§H 46
Khoa C¬ §iÖn TR−êng §HNNI - HN
91
AN Q0.0
AN Q0.1
AN T48
TON T47, +20 //2s
NETWORK 36 // Open the door
LD T47
AN M2.0
AN I1.7
= Q0.2
NETWORK 37
LD I1.7
S M1.7, 1
NETWORK 38 // Delay opening door
LD M1.7
TON T48, +70 //7s
NETWORK 39 // Close the door
LD T48
AN I1.6
AN M2.0
= Q0.3
NETWORK 40
LD T48
A I1.6
S M2.0, 1
NETWORK 41 // Delay before lifting elevator-room
LD M2.0
TON T60, +20 //2s
S M2.5, 1
AN I1.6
B¸o c¸o tèt nghiÖp Ph¹m V¨n ThuËn T§H 46
Khoa C¬ §iÖn TR−êng §HNNI - HN
93
AN M2.0
= Q0.3
NETWORK 48
LD T48
A I1.6
S M2.0, 1
S M2.1, 1
NETWORK 49 // Delay before lifting elevator-room
LD M2.0
TON T60, +20 //2s
S M2.5, 1
NETWORK 50 //Arrive at floor 3
LD I0.2
AN Q0.0
AN Q0.1
R M1.3, 1
R M1.4, 1
R M0.6, 1
NETWORK 51 // Delay after stoping elevator-room
LD I0.2
AN Q0.0
AN Q0.1
AN T48
TON T47, +20 //2s
NETWORK 52 // Open the door
LD T47
LDW>= T37, T43 //Comparision of time between calling M1.0 and M0.4
JMP 3 // Jumping to compare with M1.0
NETWORK 60
B¸o c¸o tèt nghiÖp Ph¹m V¨n ThuËn T§H 46
Khoa C¬ §iÖn TR−êng §HNNI - HN
95
LDW>= T40, T43 //Comparision of time between calling M1.3 and M0.4
JMP 4 //Q0_0
NETWORK 61
LDW>= T41, T43 //Comparision of time between calling M1.4 and M0.4
JMP 4 //Q0_0
NETWORK 62
LDW>= T42, T43 //Comparision of time between calling M1.5 and M0.4
JMP 4 //Q0_0
NETWORK 63
LDW>= T45, T43 //Comparision of time between calling M0.6 and M0.4
JMP 4 //Q0_0
NETWORK 64
LDW>= T46, T43 //Comparision of time between calling M0.7 and M0.4
JMP 4 //Q0_0
NOT
JMP 5 //Q0_1
NETWORK 65 //Compare with M1.0
LBL 3
NETWORK 66
LDW>= T40, T37 //Comparision of time between calling M1.3 and M1.0
JMP 4 //Q0_0
NETWORK 67
LDW>= T41, T37 //Comparision of time between calling M1.4 and M1.0
JMP 4 //Q0_0
LDW>= T39, T42 //Comparision of time between calling M1.5 and M1.2
JMP 5 //Q0_1
NETWORK 77
LDW>= T43, T42 //Comparision of time between calling M1.5 and M0.4
JMP 5 //Q0_1
B¸o c¸o tèt nghiÖp Ph¹m V¨n ThuËn T§H 46
Khoa C¬ §iÖn TR−êng §HNNI - HN
97
NETWORK 78
LDW>= T44, T42 //Comparision of time between calling M1.5 and M0.5
JMP 5 //Q0_1
NOT
JMP 4 //Q0_0
NETWORK 79 //Compare with M0.7
LBL 6
NETWORK 80
LDW>= T37, T46 //Comparision of time between calling M1.0 and M0.7
JMP 5 //Q0_1
NETWORK 81
LDW>= T38, T46 //Comparision of time between calling M1.1 and M0.7
JMP 5 //Q0_1
NETWORK 82
LDW>= T39, T46 //Comparision of time between calling M1.2 and M0.7
JMP 5 //Q0_1
NETWORK 83
LDW>= T43, T46 //Comparision of time between calling M0.4 and M0.7
JMP 5 //Q0_1
NETWORK 84
LDW>= T44, T46 //Comparision of time between calling M0.5 and M0.7
JMP 5 //Q0_1
OLD
LD M0.7
A I0.2
OLD
ALD
S Q0.0, 1
R Q0.1, 1
B¸o c¸o tèt nghiÖp Ph¹m V¨n ThuËn T§H 46
Khoa C¬ §iÖn TR−êng §HNNI - HN
99
JMP 7
NETWORK 88 //Control motor lower elevator-room
LBL 5
NETWORK 89
LD T60
LD I0.2
O I0.1
O I0.3
A M1.0
LD I0.2
O I0.3
A M1.1
OLD
LD I0.3
A M1.4
OLD
LD M0.4
O M0.6
O M0.5
A I0.3