0% found this document useful (0 votes)
12 views12 pages

Color Detection System Program

The document describes a program that uses color detection sensors to identify different colors. It includes 15 networks that use inputs from sensors to detect colors like green, blue, and red and output signals to corresponding lights. Timers and counters are used to control the timing of the color detection and light activation. The program uses subroutines and interrupt routines to organize the control logic.

Uploaded by

20201084
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views12 pages

Color Detection System Program

The document describes a program that uses color detection sensors to identify different colors. It includes 15 networks that use inputs from sensors to detect colors like green, blue, and red and output signals to corresponding lights. Timers and counters are used to control the timing of the color detection and light activation. The program uses subroutines and interrupt routines to organize the control logic.

Uploaded by

20201084
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

plsp theo mau sac / MAIN (OB1)

Block: MAIN
Author:
Created: 04/21/2024 03:19:09 pm
Last Modified: 05/10/2024 11:56:32 am

Symbol Var Type Data Type Comment


TEMP
TEMP
TEMP
TEMP

PROGRAM COMMENTS
Network 1 Network Titl e
Khoi dong, dung he thong

Start_ht :I0.7 Stop_ht :I1.0 M0.0


/

M0.0

Symbol Address Comment


Start_ht I0.7
Stop_ht I1.0

Network 2

Stop_ht :I1.0 Bang_tai :Q0.4


R
1

Symbol Address Comment


Bang_tai Q0.4
Stop_ht I1.0

Network 3
Phat hien va day phoi

Start_ht :I0.7 tg_maudo :M0.1


R
1
Stop_ht :I1.0 tg_xanhlacay :M0.2
R
1
tg_xanhnuocbi~ :M0.3
R
1

Symbol Address Comment


Start_ht I0.7
Stop_ht I1.0
tg_maudo M0.1
tg_xanhlacay M0.2
tg_xanhnuocbien M0.3

1 / 12
plsp theo mau sac / MAIN (OB1)

Network 4

M0.0 T38 T38


/ IN TON

160 PT 100 ms

Network 5
khoi donng he thong bang tai chay

M0.0 T38 xilanh_day_phoi :Q0.0


>=I
100

Symbol Address Comment


xilanh_day_phoi Q0.0

Network 6
Phat hien vat bang tai dung de nhan dien mau sac

M0.0 Bang_tai :Q0.4


P S
1

Symbol Address Comment


Bang_tai Q0.4

Network 7
Gap cam bien bang tai dung

M0.0 cam_bien_dung~ :I1.1 T37


IN TON

+0 PT 100 ms

Symbol Address Comment


cam_bien_dung_bangtai I1.1

Network 8
Sau 5s bang tai chay

M0.0 cam_bien_dung~ :I1.1 Bang_tai :Q0.4


P R
1

Symbol Address Comment


Bang_tai Q0.4
cam_bien_dung_bangtai I1.1

2 / 12
plsp theo mau sac / MAIN (OB1)

Network 9
Phat hien mau o

M0.0 T37 Bang_tai :Q0.4


S
1

Symbol Address Comment


Bang_tai Q0.4

Network 10
Phat hien mau xanh la cay

M0.0 maudo :I0.3 tg_maudo :M0.1


S
1
tg_xanhlacay :M0.2
R
1
tg_xanhnuocbi~ :M0.3
R
1

Symbol Address Comment


maudo I0.3
tg_maudo M0.1
tg_xanhlacay M0.2
tg_xanhnuocbien M0.3

Network 11
Phat hien xanh nuoc bien

M0.0 xanhlacay :I0.4 tg_xanhlacay :M0.2


S
1
tg_maudo :M0.1
R
1
tg_xanhnuocbi~ :M0.3
R
1

Symbol Address Comment


tg_maudo M0.1
tg_xanhlacay M0.2
tg_xanhnuocbien M0.3
xanhlacay I0.4

3 / 12
plsp theo mau sac / MAIN (OB1)

Network 12
phan loai do

M0.0 xanhnuocbien :I0.5 tg_xanhnuocbi~ :M0.3


S
1
tg_maudo :M0.1
R
1
tg_xanhlacay :M0.2
R
1

Symbol Address Comment


tg_maudo M0.1
tg_xanhlacay M0.2
tg_xanhnuocbien M0.3
xanhnuocbien I0.5

Network 13
Pl xanh do

M0.0 cb_phathiendo :I0.0 tg_maudo :M0.1 xilanh_do :Q0.1

Symbol Address Comment


cb_phathiendo I0.0
tg_maudo M0.1
xilanh_do Q0.1

Network 14
PL xanh nuoc bien

M0.0 cb_phathienxan~ :I0.1 tg_xanhlacay :M0.2 xillanh_lacay :Q0.2

Symbol Address Comment


cb_phathienxanhlacay I0.1
tg_xanhlacay M0.2
xillanh_lacay Q0.2

Network 15

M0.0 cb_phathienxan~ :I0.2 tg_xanhnuocbi~ :M0.3 xillanh_nuocbi~ :Q0.3

Symbol Address Comment


cb_phathienxanhnuocbien I0.2
tg_xanhnuocbien M0.3
xillanh_nuocbien Q0.3

4 / 12
plsp theo mau sac / SBR_0 (SBR0)

Block: SBR_0
Author:
Created: 04/21/2024 03:19:09 pm
Last Modified: 04/22/2024 09:30:21 pm

Symbol Var Type Data Type Comment


EN IN BOOL
IN
IN_OUT
OUT
TEMP

SUBROUTINE COMMENTS
Network 1 Network Titl e
Network Comment

5 / 12
plsp theo mau sac / INT_0 (INT0)

Block: INT_0
Author:
Created: 04/21/2024 03:19:09 pm
Last Modified: 04/22/2024 09:30:21 pm

Symbol Var Type Data Type Comment


TEMP
TEMP
TEMP
TEMP

INTERRUPT ROUTINE COMMENTS


Network 1 Network Titl e
Network Comment

6 / 12
plsp theo mau sac / USER1

Symbol Address Comment


Start_ht I0.7
Stop_ht I1.0
Bang_tai Q0.4
xilanh_day_phoi Q0.0
maudo I0.3
xanhlacay I0.4
xanhnuocbien I0.5
cam_bien_dung_bangtai I1.1
cb_phathiendo I0.0
cb_phathienxanhlacay I0.1
cb_phathienxanhnuocbie I0.2
n
xilanh_do Q0.1
xillanh_lacay Q0.2
xillanh_nuocbien Q0.3
tg_maudo M0.1
tg_xanhlacay M0.2
tg_xanhnuocbien M0.3

7 / 12
plsp theo mau sac / POU Symbols

Symbol Address Comment


SBR_0 SBR0 SUBROUTINE COMMENTS
INT_0 INT0 INTERRUPT ROUTINE COMMENTS
MAIN OB1 PROGRAM COMMENTS

8 / 12
plsp theo mau sac / USER1

Address Format Current Value New Value


Signed
Signed
Signed
Signed
Signed

9 / 12
plsp theo mau sac / USER1

//
//DATA PAGE COMMENTS
//
//Press F1 for help and example data page
//

10 / 12
plsp theo mau sac / System Block

PLC

Type: CPU 224 REL 02.01

Ports

Port 0 Port 1
PLC Address: 2 .
Highest Address: 31 .
Baud Rate: 9.6 kbps .
Retry Count: 3 .
Gap Update Factor: 10 .

Retentive Ranges

Data Area Offset Number of Elements


Range 0 VB 0 8192
Range 1 VB 0 0
Range 2 T 0 32
Range 3 T 64 32
Range 4 C 0 256
Range 5 MB 14 18

Password

Privileges: Full (Level 1)

Digital Output Table

Freeze Outputs in last state: No

7 6 5 4 3 2 1 0
Q0.x . . . . . . . .
Q1.x . . . . . . . .
Q2.x . . . . . . . .
Q3.x . . . . . . . .
Q4.x . . . . . . . .
Q5.x . . . . . . . .
Q6.x . . . . . . . .
Q7.x . . . . . . . .

Q8.x . . . . . . . .
Q9.x . . . . . . . .
Q10.x . . . . . . . .
Q11.x . . . . . . . .
Q12.x . . . . . . . .
Q13.x . . . . . . . .
Q14.x . . . . . . . .
Q15.x . . . . . . . .

Analog Output Table

Freeze Outputs in last state: Yes

AQW0: . AQW16: . AQW32: . AQW48: .


AQW2: . AQW18: . AQW34: . AQW50: .
AQW4: . AQW20: . AQW36: . AQW52: .
AQW6: . AQW22: . AQW38: . AQW54: .
AQW8: . AQW24: . AQW40: . AQW56: .
AQW10: . AQW26: . AQW42: . AQW58: .
AQW12: . AQW28: . AQW44: . AQW60: .
AQW14: . AQW30: . AQW46: . AQW62: .

Digital Input Filters

I0.0 - I0.3: 6.40


I0.4 - I0.7: 6.40
I1.0 - I1.3: 6.40
I1.4 - I1.5: 6.40

11 / 12
plsp theo mau sac / System Block

Analog Input Filters

AIW0: x AIW16: x AIW32: x AIW48: x


AIW2: x AIW18: x AIW34: x AIW50: x
AIW4: x AIW20: x AIW36: x AIW52: x
AIW6: x AIW22: x AIW38: x AIW54: x
AIW8: x AIW24: x AIW40: x AIW56: x
AIW10: x AIW26: x AIW42: x AIW58: x
AIW12: x AIW28: x AIW44: x AIW60: x
AIW14: x AIW30: x AIW46: x AIW62: x

Number of samples: 64
Deadband: 320

Pulse Catch Bits

I0.0: . I1.0: . I2.0: .


I0.1: . I1.1: . I2.1: .
I0.2: . I1.2: . I2.2: .
I0.3: . I1.3: . I2.3: .
I0.4: . I1.4: . I2.4: .
I0.5: . I1.5: . I2.5: .
I0.6: . I1.6: . I2.6: .
I0.7: . I1.7: . I2.7: .

Background Time

Communication Background Time: 10%

EM Configuration

Position Configuration Address


0 unused
1 unused
2 unused
3 unused
4 unused
5 unused
6 unused

Configure LED

Turn on LED when an item is forced in the PLC Yes


Turn on LED when a module has an I/O error No

Increase Memory

Disable Edit in Run to Increase Memory: No

12 / 12

You might also like