Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages


Download 1.35 Mb.
Pdf ko'rish
bet98/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   94   95   96   97   98   99   100   101   ...   158
Bog'liq
ourdev 569653

5a
Non-preemptive scheduling
EXAMPLE 1:
- RESOURCE STATION_1 as configured in figure 20
- Execution times: P1 = 2 ms; P2 = 8 ms;
- P2.FB1 = P2.FB2 = 2 ms (see note 3)
- STATION_1 starts at t = 0
SCHEDULE (repeats every 40 ms)
t(ms)
Executing
Waiting
0
P2.FB2@1
P1@2, P2.FB1@2, P2
2
P1@2
P2.FB1@2, P2
4
P2.FB1@2
P2
6
P2
10
P2
P2.FB2@1
14
P2.FB2@1
P2
16
P2
(P2 restarts)
20
P2
P2.FB2@1, P1@2, P2.FB1@2
24
P2.FB2@1
P1@2, P2.FB1@2, P2
26
P1@2
P2.FB1@2, P2
28
P2.FB1@2
P2
30
P2.FB2@1
P2
32
P2
40
P2.FB2@1
P1@2, P2.FB1@2, P2
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 118 –
61131-3 
 IEC:2003(E)
Table 50 - Task features
No.
Description/Examples
5a
Non-preemptive scheduling
EXAMPLE 2:
- RESOURCE STATION_2 as configured in figure 20
- Execution times: P1 = 30 ms, P4 = 5 ms, P4.FB1 = 10 ms (see note 4)
- INT_2 is triggered at t = 25, 50, 90, ... ms
- STATION_2 starts at t = 0
 SCHEDULE
t(ms)
Executing
Waiting
0
P1@2
P4.FB1@2
25
P1@2
P4.FB1@2, P4@1
30
P4@1
P4.FB1@2
35
P4.FB1@2
50
P4@1
P1@2, P4.FB1@2
55
P1@2
P4.FB1@2
85
P4.FB1@2
90
P4.FB1@2
P4@1
95
P4@1
100
P1@2
P4.FB1@2
5b
Preemptive scheduling
EXAMPLE 3:
- RESOURCE STATION_1 as configured in figure 20
- Execution times: P1 = 2 ms; P2 = 8 ms; P2.FB1 = P2.FB2 = 2 ms ( see note 3)
- STATION_1 starts at t = 0
SCHEDULE
t(ms)
Executing
Waiting
0
P2.FB2@1
P1@2, P2.FB1@2, P2
2
P1@2
P2.FB1@2, P2
4
P2.FB1@2
P2
6
P2
10
P2.FB2@1
P2
12
P2
16
P2
(P2 restarts)
20
P2.FB2@1
P1@2, P2.FB1@2, P2
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


61131-3 
 IEC:2003(E)
– 119 –
Table 50 - Task features
No.
Description/Examples
5b
Preemptive scheduling
EXAMPLE 4:
- RESOURCE STATION_2 as configured in figure 20
- Execution times: P1 = 30 ms, P4 = 5 ms, P4.FB1 = 10 ms (note 4)
- INT_2 is triggered at t = 25, 50, 90, ... ms
- STATION_2 starts at t = 0
SCHEDULE
t(ms)
Executing
Waiting
0
P1@2
P4.FB1@2
25
P4@1
P1@2, P4.FB1@2
30
P1@2
P4.FB1@2
35
P4.FB1@2
50
P4@1
P1@2, P4.FB1@2
55
P1@2
P4.FB1@2
85
P4.FB1@2
90
P4@1
P4.FB1@2
95
P4.FB1@2
100
P1@2
P4.FB1@2
NOTE 1
Details of RESOURCE and PROGRAM declarations are not shown; see 2.7 and
2.7.1.
NOTE 2
The notation X@Y indicates that program organization unit X is scheduled or
executing at priority Y.
NOTE 3
The execution times of P2.FB1 and P2.FB2 are not included in the execution
time of P2.
NOTE 4
The execution time of P4.FB1 is not included in the execution time of P4.
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 120 –
61131-3 
 IEC:2003(E)
RESOURCE R1
fast1
+----------+
| TASK |
t#10ms---|INTERVAL |
1---|PRIORITY |
+----------+
slow1
+----------+
| TASK |
t#20ms---|INTERVAL |
2---|PRIORITY |
+----------+
P1
PROGRAM X
Y1 Y2
+-----+ +-----+
| Y | | Y |
---|A C|----+--------|A C|---
---|B D|----|--+-----|B D|---
+-----+ | | +-----+
|slow1| | | |fast1|
+-----+ | | +-----+
| |
| | Y3
| | +-----+
| | | Y |
+--|--|A C|---
+--|B D|---
+-----+
|fast1|
+-----+
END_PROGRAM

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   94   95   96   97   98   99   100   101   ...   158




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling