Struktury automatizace průmyslového podniku

Struktury automatizace průmyslového podniku Struktury automatizace průmyslového podniku

moodle.dce.fel.cvut.cz
from moodle.dce.fel.cvut.cz More from this publisher
12.01.2014 Views

30.9.2013 Types of Scans • Periodic task (periodická úloha) Like the continuous task, a periodic task executes all of its code from top to bottom. However, when a periodic task completes its scan, it waits a preconfigured time interval before restarting. program scans 1. A periodic task is always required for all numeric control algorithms, e.g. PID controller. 2. The periodic task lets you control a process that might occur at a significantly faster rate than the normal scan of the continuous task can attain. 3. In a periodic task, we must insert I/O instructions if we need actual data, otherwise it uses I/O data of the continues task. 36 Types of Scans • Event task (úloha řízená událostí, přerušeni) Lets you execute a piece of code based on the detection of some incident that occurs in the control system. Events Program scans 1. The event task either immediately take control at a high priority 2. But interrupts are potentially dangerous sources of errors 37 18

30.9.2013 Continues, Periodic, and Even Tasks • Picture taken from Rockwell Automation: Using Event Tasks with Logix5000 Controllers, Publication LOGIX-WP003A-EN-P June, 2003, page 15 38 Přehledné programovací jazyky Function Block Diagram (FBD) graphical languages Sequential Flow Chart (SFC) AUTO DI CALC1 CALC PUMP START STEP V ACT IN1 OUT >=1 MAN_ON IN2 DO V T1 STEP A T2 N D ACTION D1 D1_READY ACTION D2 D2_READY Ladder Diagram (LD) CALC1 STEP B T3 N D ACTION D3 D3_READY ACTION D4 D4_READY AUTO CALC PUMP ACT MAN_ON IN1 IN2 OUT textual languages Structured Text (ST) VAR CONSTANT X : REAL := 53.8 ; Z : REAL; END_VAR VAR aFB, bFB : FB_type; END_VAR Instruction List (IL) A: LD %IX1 (* PUSH BUTTON *) ANDN %MX5 (* NOT INHIBITED *) ST %QX2 (* FAN ON *) bFB(A:=1, B:=‘OK’); Z := X - INT_TO_REAL (bFB.OUT1); IF Z>57.0 THEN aFB(A:=0, B:=“ERR”); ELSE aFB(A:=1, B:=“Z is OK”); END_IF http://www.isagraf.com 39 19

30.9.2013<br />

Continues, Periodic, and Even Tasks<br />

• Picture taken from Rockwell Automation: Using Event Tasks with Logix5000 Controllers,<br />

Publication LOGIX-WP003A-EN-P June, 2003, page 15<br />

38<br />

Přehledné programovací jazyky<br />

Function Block Diagram (FBD)<br />

graphical languages<br />

Sequential Flow Chart (SFC)<br />

AUTO<br />

DI<br />

CALC1<br />

CALC<br />

PUMP<br />

START STEP<br />

V<br />

ACT<br />

IN1 OUT >=1<br />

MAN_ON<br />

IN2<br />

DO<br />

V<br />

T1<br />

STEP A<br />

T2<br />

N<br />

D<br />

ACTION D1 D1_READY<br />

ACTION D2 D2_READY<br />

Ladder Diagram (LD)<br />

CALC1<br />

STEP B<br />

T3<br />

N<br />

D<br />

ACTION D3 D3_READY<br />

ACTION D4 D4_READY<br />

AUTO<br />

CALC<br />

PUMP<br />

ACT<br />

MAN_ON<br />

IN1<br />

IN2<br />

OUT<br />

textual languages<br />

Structured Text (ST)<br />

VAR CONSTANT X : REAL := 53.8 ;<br />

Z : REAL; END_VAR<br />

VAR aFB, bFB : FB_type; END_VAR<br />

Instruction List (IL)<br />

A: LD %IX1 (* PUSH BUTTON *)<br />

ANDN %MX5 (* NOT INHIBITED *)<br />

ST %QX2 (* FAN ON *)<br />

bFB(A:=1, B:=‘OK’);<br />

Z := X - INT_TO_REAL (bFB.OUT1);<br />

IF Z>57.0 THEN aFB(A:=0, B:=“ERR”);<br />

ELSE aFB(A:=1, B:=“Z is OK”);<br />

END_IF<br />

http://www.isagraf.com 39<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!