Вы находитесь на странице: 1из 158

SCADA Trace Mode

:
. .
. .

2010

SCADA Trace Mode/ . . . , . . .


: , 2010. 158 .
: , , SCADA, .
SCADA
, Trace Mode.
, SCADA
Trace Mode,
,

Trace Mode.
, Trace Mode FBD ,
.


I SCADA

SCADA

SCADA

13

15

17

21

II Trace Mode

23

Trace Mode

23

26

26

28

29

33

38

Trace Mode

41

Texno ST

43

Texno FBD

55

Texno SFC

59

Texno IL

67

73

82

III

84
3

Trace Mode 6

84

1.

88

2.

106

3. Texno St
Texno FBD

115

4. Texno IL
Texno SFC

127

136

1. Trace Mode

145

2. FBD

148

3. FBD

150

4. FBD

153

5. FBD -

156

158

I SCADA

SCADA


. ,
.
- ,
, .
.
,
, , .
,
, ,
.

.

( ).
, .
,
,
.

( ).
.
,
.
, , .
.

.
. (
)
5

, .
,
, ,
, .
[6]:
,
, .

, ,
, ,
, .

, ,
.
.
. 1.1.
: , ,
.

. 1.1
6

:
1.

2.

3.



.
:
1.

2.

(, );

3.

4.

5.

;
6.
.


, .
SCADA ,
,
.

, , .
/
.
, ,

, .
,
.
7

, , ,
, .
,
.

,
, .
,
,
, ,
.
SCADA. ,
,
.
,
. SCADA.
SCADA
,
, .
SCADA: Genesis,
Trace Mode, InTouch, Citect, IGSS.
SCADA
:
1. ;
2. ;
3. ;
4. ;
5. ;
6. , ;
7. ;
8. ;
8

9. .
SCADA :
1. ,

;
2. , ,
;
3. ,
;
4. ,
,
;
5.
;
6. , ,
;
7. ,
,
,
.

SCADA

SCADA
, . SCADA
,
, ,
,
, , ,
.
9

.
(InTouch, Genesis 32)
- .
, (Trace Mode,
Genie).

, , ,
. SCADA
.
:
1. (Trace Mode, Genie),
;
2. (InTouch,
Citect).
() ,
.
(InTouch) (Citec), .
() , ,
, ,
-.
, SCADA
:
1. ,
(. 1.2);
2. , ,

.


(. 1.3), . ,
. 1.3 .
, , .
, ,
10

.
, , ,
, .

. 1.2

. 1.3
INTouch ,
(, , , ),
(). ,
, , , .

.
11

Citec InTouch
,
.
: (, ,
), (, ),
, , .
,
, , ,
. ,
,
. ,
SCADA,
, .
Trace Mode
, , , ,
, , ,
, (), ,
, , .

, .
:
, , .

.
,
.
Genie ,
, , ,
, , ,
,
.
(/).

12


, . SCADA

. ,
,
,
. SCADA
() .
() ,
,
, , ,
.
,
.
.
, ,
.
,
.
SCADA InTouch
.
, , InTouch .
,
InTouch ,
.
InTouch
. 1
999. , ,
.

13

InTouch
.
.
InTouch :
.
, .

.
SCADA.
SCADA Citect .
.
.
Citect
.

. : , ,
, .
, ,
,
. ,

.
Citect :
, , .
255 . .
1 255.
, .
Citect
: .
: ,
, , , ,
, ,
, .
Trace Mode
. ,
14

.

HEX16 HEX32.

,
HEX16(32).
.
.
: , , , , ,
.

,
.
( ).
, SMS,
.
.
Genie .
,
.
.
.
,
,
.


.
SCADA
,
. .
15

. 1.4 :
() .

. 1.4


. ,

. ,
, ,
, .
SCADA .
,
, .

, .
,
, .
SCADA InTouch
. 8
.
.
, ,
InTouch .
SCADAc Citect
. ,

16

.
.
SCADA Trace Mode , .
,
, .
,
.
,
.
. InTouch Citect X-Y,
Y X. Trace Mode
,
, ,
.
SCADA Genie
, X Y Trace Mode.
8 .

SCADAc .
.
SCADA
,
, :
1. , ;
2. , .
,
.
, ,
.
(. 1.5).
,
17

. .
,
.

. 1.5
, ,
, Visual Basic.
SCADA
, , , DDL SQL
.
SCADA InTouch .
,
, ,
, . .
,
, ,
. , ,
, if
, .
InTouch ,
, .
, ,
, , .
Quick Functions, ,
.
18

Citect Cicode.
VisualBasic C.
,
. ,
.

( ),
, , .
Citect , , ,
, .
, , .
, , ,
, .
.
SCADA Genie .

(. 1.5, ). ,
,
.
- ,
VisualBasic.
, .
SCADA Trace Mode
, ST, IL, FBD, LD IEC61131-3. TexnoST
, Pascal C.
, Pascal, C.
, , ,
, =, :=.
,
, . .
Texno IL .
. ,
. ,
.
, .
19

, ,
, , .

.
Texno FBD (. 1.5, ).
,
, ,
.
Texno LD ,
.
, Texno FBD, ,
.
Texno SFC .
(. 1.6).
.
Trace Mode(TexnoST, Texno IL, Texno FBD, Texno LD),
.
, ,
, .
,
Trace Mode(TexnoST, Texno IL, Texno FBD, Texno LD). ,
(),
Trace Mode.

. 1.6 Texno SFC


20

SCADA .
,
, .
: ,
, .
.
,
, , . ,
, SCADA.
-: html
, . SCADA
MS Exsel, pdf-, html- .
:
1. ;
2. ;
3. ;
4. ;
5. .
SCADA :
1. ;
2. ;
3. ;
4. ;
5. .
SCADA Trace Mode -html
. , :
, , ( ), ,
21

. html-,
, .
,
, SCADA . SCADA
,
, .
,
. Trace Mode
, Web-,
. ,
, . Trace
Mode 1.
SCADA Genie .
,
. Genie 3.0
.
, , .
,
.

, , .
, , .
. 1.7.

. 1.7 Genie
22

II Trace Mode

Trace Mode

SCADA Trace Mode,


. SCADA

:
1. ;
2. ;
3. ;
4. IBM
MicroPC, ADAM, PCL, MIC2000,
, , L-card.
Trace Mode:
,
,

.

Trace Mode.
, ,
.
,
, ,
.
, ,
FBD- IL-, .
,
.
23

(Input)
(Output). ,
, .
:
1. In ;
2. A ;
3. R ;
4. Q .
(
, /, )
( ).
. 2.1.

. 2.1
.
:
A = In KX + Z,
KX ;
Z .
.
(
),
, .
,
,
DPic().

24

,
, APert.
, DSmoot
(0;1].
DSmoot (.) 0.
.
.

.
. 2.2.

. 2.2
,
, (
).
.
.
. :
Y = (A + Z) KX
Trace Mode :
1. FLOAT ( , 4 );
2. HEX 16 ( , 2 );
3. HEX 32 ( , 4 );
4. Double FLOAT ( , 8 );
5. TIME (, );
6. (
/ );
7. CALL ( ).
25


. . 2.3 .
.
, .

,
. ()
().

. 2.3


. ,
. .
. 2.4.
(float, hex 16 ).
, ,
, .
26

,
. :
1.

(HL) ;

2.

(HA) ;

3.

(HW) ;

4.

(LW) ;

5.

(LA) ;

6.

(LL) ;

7.

[;] , (;
] [; ) , [; ) (; ]
, [; ]
.

. 2.4

27

,
. . 2.4

Trace Mode ,
. .
, ,
, .
.
, . 2.5.
.

.
. .
: IN
, OUT
-, IN/OUT ,
, .
.
,
. 2.6, ().

28

. 2.5

. 2.6

,
, , , , ,
, .

29

( 2.1) .
,

.
.
.


.
(. 2.7),
. ,
.
, (). ,

.
, .
2.1
Trace Mode

X-Y

0
30

1
2
3
4
5
6
7


() .
, .
, . 2.5.
, ()
. ,
. 2.5.
.
. :

(, ). ,
, . (, )
(, ), .
(, ) (,
) .
(, ), .


,
.
,
.

31

. 2.7

,
, (mousePressed)
(mouseReleased) .
,
mousePressed mouseReleased.

, ; true () false ().
,
. ,
, .
Arg & (& )
, ,
& = true,
.

^ ,
^ ).

32

Arg >=
, ,
.
Arg == ,
,
. Arg >=
, Arg ==
,
.

: ,
, , , .

.
,
.

, , 2.2.
.
,
.
, ,
, .
, .
2.2

33


, ,
.
.

, , 2.3.

.

.

.
2.3

,
, , , , . ,
, 2.4.

34

2.4


.
, ,
.
, , .
( ).
, , .
,
2.5. ,
(), , ,
, .
:
, .
. 0,
, .
0 ( 0)
. 0
. 2.8, 0 . 2.9.
.

, .
False,
35

. True,
, .
, , , ,
, .

2.5

36

. 2.8 0

. 2.9 0

.
:
1. ;
2. ;
3.
;

.
, ,
, .
, ,
37

, .
, .
, ,
.

,
,
. , ,
, ,
.

, .
( )
(. 2.10) : ,
, .
.
. 0,
. 1
. , ,
2 .

. 2.10
(

.). ,
, , .
38

,
. ()
(. 2.11).
, ,
.

. 2.11

,
(. 2.12)
.
.

. 2.12
,
, ,
.
.
.
.
,
(. 2.13).
, .
( )
( ).

39


(, ,
).
true .
(
)
,
, (. 2.14),
.

.2.13

40

. 2.14

Trace Mode

SCADA ,

, , . Trace
Mode IEC6113-3:
1. Texno ST (Structured Text);
2. Texno SFC (Sequential Function Chart);
3. Texno FBD (Function Block Diagram);
4. Texno LD (Ladder Diagram);
5. Texno IL (Instruction List).


.
.
41

, IN,
OUT. ,
, ,
IN/OUT.
( ).
.
(. 2.15)

.

. 2.15.

. , . 2.5.
(. ).

.
( . 2.5).
.
()
.

. (. 2.16).
.
42

. 2.16

Texno St Texno FBD,


TexnoIL, TexnoSFC..
Texno ST

:
1. ;
2. ;
3. : + - * / < = > ! : & | ^ % ( ) [ ] , ; #.

, _, .
.
: and, array, bool, break,
by, byte, case, constant, continue, date, date_and_time, dint, do, dt, dword, else,
elsif, end_case, end_for, end_function, end_function_block, end_if, end_program,
end_repeat, end_struct, end_type, end_var, end_while, exit, false, for, function,
function_block, goto, handle, if, int, lreal, mod, not, of, or, program, real, repeat,
return, rol, ror, shl, shr, sint, string, struct, time, time_of_day, to, tod, true, type,
udint, uint, until, usint, var, var_arg, var_global, var_inout, var_input, var_output,
while, word, xor.
: + - * ** / < <= <>
<< > >= >> ! != = == : := & | ^ % ( ) [ ] . .. , ;.
43

//
. /* */.
.
,
, .
,
.
- ,
, .
;.
.
Texno ST :

PROGRAM
{ }
{ }
END_PROGRAM

, ,
.

.
Texno ST .
. .
, ,
.
: 123, 350, 498.
2#,
. :
2#1011, 2#0111, 2#1001.
44

8#,
. :
8#145, 8#0277, 8#756.

16#, .

af, A F. : 16#149,
16#A145E, 16#a145e.
.
. : .123, 0.456,
489. . (
E ). : 1.23E-6, 6.7504E4, 6.798e-5.
,
, . :
t#<>d<>h<>m<>s<>ms
:
time#<>d<>h<>m<>s<>ms

. 2 , 31
, 25 10
t#2h31m25s10ms time#2h31m25s10ms.
d#<>-<>-<>,
date#<>-<>-<>. 25 2001
d#2001-9-2001 date#2001-9-2001.
tod#<>:<>:<>
time_of_day#<>:<>:<>. 19 15 42
tod#19:15:42, time_of_day#19:15:42.
dt#<>-<><>-<>:<>:<>, date_and_time#<>-<><>-<>:<>:<>. , 12 1995 13
47 13 dt#1995-2-12-13:47:13
date_and_time#1995-2-12-13:47:13.
45

,

. : , `
`. ,
$. ,
, -.

:
$r ;
$n ;
$t ;
$u UNICODE ,
;
$ ( ).

.
, .
:
1. ;
2. ;
3. ;
4. ;
5. ;
6. , ;
7. .
2.6,
2.7, 2.8,
2.9.

46

2.6

**

2.7

&

^ xor

<< shl

>> shr

rol


47

ror

2.8

==

!= <>

<

>

<=

>=

2.9

&& and

|| or

! not


. :
{} = {}

48

{} := {}
, ,
.
5 .
, ,
2.10.
2.10

1

**

!, not, -, , +

<<, >>, shl, shr, rol, ror

&, |, ^, xor

*, /, %, mod

+, -

==, !=, <>, <, <=, >, >=

&&, and

||, or

10

=, :=

ST- :
sin, cos, tan, asin, exp, log.
Trace Mode,
.
:
1. return
2. if
49

3. case
4. while
5. repeat
6. for
7. break
8. exit
9. continue
10.
11.
12.got
if.
if
end_if . :
if {} then { };
end_if;

, .
if :
if {} then { 1};
else { 2} ;
end_if;
if .
, 1,
2.
if :
if { 1} then { 1};
50

elseif { 2} then { 2};

elseif { N} then { N};


else { N+1};
end_if;
if i-
, i- .
, ,
else.
Texno ST case.
case end_case.
ase :
case {} of
{ }:{ };

{ }:{ };
end_case;
,

,
.
case :
case {} of
{ }:{ };
{ }:{ };
else { };
end_case;
51

case
,
,
else.

.
case
, .
:
{ } .. { }
Texno ST while,
repeat, for. while :
while {} do { };
end_while;

.
.
repeat :
repeat { };
until {} end_repeat;
repeat ,
, ,
, .
for :
for { } := { 1} to
{ 3} do { };

{ 2} by

end_for;

1,
,
52

2. 3,
,
2.
3 ,
2. for
, .
break exit .
continue .
.
Texno ST. ,
, (. 2.17, 2.18)
, . 2.19. ,
.
,
.

. 2.17

. 2.18

53

. 2.19

X Y,
Y . Z. Sum
.
:
PROGRAM
VAR_INPUT X : REAL; END_VAR
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_INOUT Sum : REAL; END_VAR

if Y == 0 then Z = X / 1e-9;
else Z = X / Y;
end_if;
Sum = S+ Z;
S = Sum;
END_PROGRAM

54

, .
.
. ,
. ,
, ,
(. 2.20).

. 2.20
: #1.tms compiled
successfully, .

Texno FBD

FBD .
, .
Texno ST.
,
. . 2.21.

. 2.21 Texno ST
.
.
.
55

,
.
, ,
,
, ,
. , In
In/Out. .
: X, Y. , ,
: ( )
, 0 ,
.
,
.
.
, ,
Out In/Out.
FBD
,

FBD . FBD
(. 2.22). (,
, ) .
, .

drag-and-drop. ,
.
.
. ,
.

56

. 2.22 FBD


. ,
. ,
.
, .
,
, ,
.

() .
, .
, ()
.
(. 2.23).

57

. 2.23 ()

1e-9. ,
, .
, . 2.23.
.
1-9.
,
Texno ST, Texno FBD (. 24).

. 2.24 FBD

58

Texno SFC

SFC ,
. ,
, Trace Mode,
. ,
. . 2.25

. 2.25
SFC . 2.26.
.
, .
, ,
, , ,
.

. 2.26 SFC
. ()
.
,
59

. .
.
,
. ()
,
, ().
SFC . ,

. SFC . 2.27.

. 2.27 SFC
. 2.27, SFC
. ,
.
/.
, ,
, .
. 2.28, .
, ,
(. .2.28, ).
.
(. 2.28, ). 1
. ,
( ),
.
, (
) .
, (. 2.29).
, .
60

. 2.28

. 2.29 SFC
. ,
- (
1, ) ,
(
0 1),

/. (. 2.30),
, .

. , 3,
61

1. ,
1 ( 2), ,
, , 3
, . ,
1 2 .

( ).
, Trace Mode.
()
(),
.
, ,
( ).
SFC .
, .
()
().
.
.

. 2.30
X0 X1
Y Y .
62

Y 10-9,
Z.
Sum.
X0 X1. Z,
: Z . , 10-9
: Z . . 2.31.
,
X0 X1, 1
(. 2.32). ,
S,
(. 2.33).

. 2.31

. 2.32

. 2.33
SFC . 2.34.
, Texno ST.

63

. 2.33 SFC
, 0 1 :
SFC_STEP " 0 1"
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_OUTPUT Sum : REAL; END_VAR
VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

1 = X0 + X1;

END_SFC_STEP

, Z :
SFC_TRANSITION "Z != 0" FROM( INITIAL_STEP ) TO( STEP_1 )
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
64

VAR_OUTPUT Sum : REAL; END_VAR


VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

Z != 0

END_SFC_TRANSITION
: ,
!
, Z :
SFC_STEP "(0+1)/Z"
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_OUTPUT Sum : REAL; END_VAR
VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

Sum = S + 1 / Z;
S = Sum;

END_SFC_STEP

, 10-9 :
65

SFC_TRANSITION "Z == 0" FROM( INITIAL_STEP ) TO( STEP_2 )


VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_OUTPUT Sum : REAL; END_VAR
VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

Z == 0

END_SFC_TRANSITION
, 10-9 :
SFC_STEP "(X0+X1)/1e-9"
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_OUTPUT Sum : REAL; END_VAR
VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

Sum = S + 1 / 1e-9;
S = Sum;

END_SFC_STEP
66

Texno IL

Texno IL .
,
,
. . ADD 10 15
Add 10 15 .
,
.
:
1.

2.

(. Texno ST);

3.

4.

N, C, X,
. N
, ,
, ,
X , ,
true.
:
OR b// b
ORN b// b
,
(, )
, ,
. ,
, ,
.
:
67

ADD 10 15// 10 15
:
LD 10// 10
ADD 15// 10 15
Texno IL.
2.11.
2.11

LD

LD
{}

ST

ST {}

:
LD X//
MULT K// X K
ST X// , .
2.12
2.12

S {}

68

true
R

R {}


false

AND

AND {
1} { 2}

OR

OR { 1}
{ 2}

XOR

XOR
{ 1}
{ 2}

:
S X// X true
R Y// Y false
AND X Y//X Y

2.13.
2.13

ADD

ADD
{ 1}
{ 2}

SUB

SUB { 1}
{ 2}

2
1

69

MUL

MUL
{ 1}
{ 2}

DIV

DIV { 1}
{ 2}

1
2

:
MUL X K
ADD C
2.14.
2.14

GT

GT { 1}
{ 2}

GE

GE { 1}
{ 2}

EQ

EQ { 1}
{ 2}

NE

NE { 1}
{ 2}

LE

LE { 1}
{ 2}

true,
1
2

true,
1
2

true,
1
2

true,
1
2

true,
1
2

70

LT

LT { 1}
{ 2}

true,
1
2

2.15.
2.15

JMP

JMP {}

CAL

CAL {

()}

RET

RET

:
JMPC ,
;
JMPX ,
true;
CALC ,
;
CALX ,
true
RETC ,
;
71

RETX , ,
true.
:
EQ Z 0// Z
JMPC label// label

label: LD 1e-9// Z 10-9


ST Z

,
Texno SFC, Texno IL.
S Texno IL, S
Sum0. Texno IL :
PROGRAM
VAR_INPUT Y : REAL; END_VAR
VAR_OUTPUT Z : REAL; END_VAR
VAR_OUTPUT Sum : REAL; END_VAR
VAR_INPUT X0 : REAL; END_VAR
VAR_INPUT X1 : REAL; END_VAR
VAR 1 : REAL := 0; END_VAR

ADD X0 X1//
ST 1// 1
NE Y 0//
JMPC __Y// Z, Z
// 1-9
72

DIV 1 1e-9
ST Z// Z
JMP //
__Y: DIV 1 Y// Z
ST Z// Z
: ADD Z Sum0//

ST Sum0//
Sum S S
ST Sum

END_PROGRAM

Trace Mode

SDADA Trace Mode


. ,
, Trace
Mode.
:
1.

2.

3.
,
@Message;
4.

,
:
73

Date Time Category Name Coding Text UserID T_ack N


:
Date ;
Time ;
Category .
:
1.

<> ;

2.

<M> ;

3.

<W> ;

4.

<E> ;

5.

<I> ;

6.

<A> ;

7.

<R> ;

8.

<S>

9.

<_> ( )

10.

<-> ;

11.

<!> ;

12.

<?>

Name ;
< prj >_< >
Coding ;
Text ;
UserID ;
T_ack DD_HH_MM:SS;
N .
74

:
1.

, :

1.1
Error
;
1.2

Login ;

1.3

Logout ;

1.4

Failed Login ;

1.5
Failed Logout
;
2.

, :
2.1

2.2
;
2.3
3.

Start ;
Continue
Stop ;


. ,
:
(HL) ;
(HA) ;
(HW) ;
(LW) ;
(LA) ;
(LL) ;
.

75


, Trace Mode
(.2.34).

. 2.34


.
[;],
1, ,
,
0,
. , (; ) (-; )
,
.

,
.
,
(; ] [; ) .
[; ) (; ] ,
.
[; ]
.


. ,
76


, ,
.
.

.

.
(. 2.35)
, ,
,
, .
. ,
.

. 2.35

77

:
1. AR + G + Prn;
2. AR + Prn;
3. AR;
4. AR + G + GSM;
5. AR + GSM;
6. AR + GSM + PRN;
7. AR + G + GSM + PRN;
8. G;
9. AR + Net;
10.AR + G + Net;
11.AR + GSM + Net;
12.Net;
13.Net + GSM;
14.AR + Play;
15.AR + G + Play;
16.AR + Net + Play;
17.Play;
18.AR + G + PlayStop;
19.AR + G + PlayLoopStop.

:
1. AR ;
2. G ,
;
78

3. PRN ;
4. GSM SMS;
5. Net ;
6. Play, PlayStop, PlayLoopStop :
{ }.wav.
,
.

, . 2.36.
,
.

. 2.36


// (2.37).
.

.
.
true.

79

. 2.37


2.16.
2.16

.

%b

%B

%d

(0023)

%I

(01 12)

%j

(001 366)

%m

(01 12)

%M

(00 59)

AM/PM 01 12

80

%S

%U

(00 53);

%w

(06, 0 )

%W

(0053);

%y

(00 99)

%Y

(0000 9999)


.
,
.

. 2.38

81

Trace Mode
(
).
:
1 ;
Pentium-4
2 600 000 .
,
, .

, ,
.
.
(. 2.39)
, , , ,
.
true.

. 2.39
(. 2.40)
,
.
82

.
.

.

. /

R ( )
. ,
R , ,
. ,
R .

. 2.40

83

III

Trace Mode 6

setup1.msi. .
(. 3.1)
Next.

. 3.1
.
, I agree
Next (. 3.2).

84

. 3.2
(. 3.3).
,
. Everyone ( )
Just me ( ).
Next (. 3.4).
: ,
. Next
(. 3.5). .
, . 3.6.
Close.

85

. 3.3

. 3.4
86

. 3.5

. 3.6

87

: SCADA TRACE MODE 6,


,
TRACE MODE.

: , (,
, ),
, , ;
,
, .

1.
Trace Mode.
Trace Mode 6 ( tmdevenv.exe).
.
, . 3.7.

. ,

.

88

. 3.7 Trace Mode


2.
.
(. 3.8). .
.
RTM.

. 3.8
.
RTM .
. RTM
. 3.9.
89

. 3.9
3.
. RTM .
.
.
_FLOAT (. 3.10).

. 3.10
4.
K Z.
:
Y = KX + Z,
Y ;
;
90

;
Z .
[0; 100].
K Z,
(
).
: [-10; 10].
0,2, Z -10.
5.
.
(#1 . 3.11).
(. 3.12)

. 3.11

91

. 3.12
.
. 0,
1, . 0, K
Z. , input.
6.
. .
/ .
. .
(. 3.13).
( 1) ,
, , .

92

. 3.13
. .
.
(. 3.14).
,
, , .

. 3.14
7.

. .
RTM .

/ (. 3.9).
. ,
93

(. 3.15).

. 3.15

.
8.
. ,
.
.
(. 3.16).

94

. 3.16
,
. , .
.
(. 3.17).

. 3.17
95

9.


,
.
,
.
(. 3.18).

. 3.18

10.
.
,
.
(. 3.19).
.
,
.
.
96

,
. HL, HA, HW, LL, LA, LW
, :
< LL < LA < LW < HW < HA < HL <


. 3.20.

. 3.19

97

. 3.20

11.
.
.
.
. .

. IN
ARG_000.
. .
RTM , .
(. 3.21).
. ,
. 3.22.
. .
.
98

. 3. 21

. 3.22

12.
.
.
, XY
,
.
.
,
.
,
(. 3.23).

99

. 3.23

13.
. .
. .
,
. .
.
(. 3.24).

. 3.24
.
. ,
. .
100

. ,
. 3.22.
. ,
. 3.25.

. 3.25

. .
. ,
. ,
. 3.26.

. 3.26
101

14.
.
. ,
. ,

. (. 3.27).
.

. 3.27
15.
. ,
. RTM .
, .
.
(. 3.28).
. ,
. 3.22.
. ,
. 3.29.

102

. 3.28

. 3.29

16.
.
.
RTM .
. , rtc.exe,


. .

103

, ,
(. 3.30).

. 3.30

104


1.

SCADA-.

2.

SCADA-.

3.

SCADA-.

4.

, ?

5.

6.

7.

8.

9.

10.

11.

SCADA?

12.

105

: ,
.

:
1. . ,
,
;
2. , ,
.
3. , ,
, , . .
4. , ,
.

1.
,
. ,
.
2.
.
3.

.
4.
.
5.
,
. ,
1 5 . 3.31
106

. 3.31 15
6.

.
a.
.
.
, : ,
, . . (. 3.32).
.

. 3.32

107

b.
.
.
,
: , , , , , , , , , , .
.
.
. .
, . 3.33.
.
. 0.
(. 3.34).
. ,

. ,
,
.
true. , , .
, ,
. .

. 3.33

. 3.34
108


.
,
.
. .
, .
, .
,
. true .
, , .
, , .
, . 3.35

. 3.35
c.
.
. .
,
.
. .
,
. ,
, .
true. ,
, .
. , . 3.36

109

. 3.36
d.
.
. .

.
.
. ,
. ,
, , .
,
. .
,
. ,
.
, . ,
. 3.37

. 3.37
110

7.

.
a.
.
. . .
(. 3.38).

. 3.38
, ,
.
(. 3.39).

. 3.39

. .

.
. ,
.
b.
. .
.
, :
, , , . .
,
.
,
111

.
.
. 3.40

. 3.40
. ,
.
,
. .
, 3.37.
.
. .
.
. ,
,
. .
. , ,
, (. 3.41).

. .
, , , .
.

112

. 3.41
8.
. ,
.
. 3.42.

. 3.42
113

1.

2.

, , ?

3.

4.

5.

Trace Mode?

6.

7.

, ?

8.

9.

10.

11.
Mode?

Trace

114

3
Texno ST Texno FBD.

: Texno ST Texno FBD Trace Mode,


.

:
1.
,
( ),
, , ,
, ,
,
.
.
2.
, ,
, , ,
,
, ,
, .
3.
FBD ,
. 10,
10.
,
.
4.
ST,
.
1, 1.

.

115

:
1.

1 3 .
2.

:
_ = _ +
+ _

_
,
;
_ ,
, ;
_
, .
3.

_
_,

.

1.
. ,
2 . ,
. .
.
1, .
, .
2.
.
, , .
,
, ,
116

. Input (. 1).
, : ,
. ,
, ,
.
Intput.
.
. 1
().
3.
.
.
,
: . .
(. 3.43).
.
. , ,
,
, ,
. .
mousePressed (. 3.44).
.
.
,
( . 3.45).

(. 3.46).

. 3.43
117

. 3.44

. 3.45

. 3.46
4.
. ,
, .
. 3.47. , ,
( ), ,
. , ,
118

. ,
, ,
. 3.48

. 3.47

. 3.48
5.
K .
FBD
:
Y = KX + C,
Y ;
;
;
C .
FBD , ,
[-1; +1]. K
Z,
( ).
119

: [0; 1].
0,5, Z 0,5.
6.
FBD . RTM
.
.
(. 3.49). ,
, , , .
- .
. ,
float. 1,
().
.

, (
) . , . 3.50.

. 3.49
.
. .
In , , Out
, In/Out
.
. 3.51.

120

. 3.50

. 3.51 Texno FBD


# .
FBD
(. 3.52).

. 3.52
121



FBD , FBD (. 3.52)
.

. 3.52 FBD
.
.
. FBD
(. 3.53): ( ),
( ), ( ).
.

() .
, ()
.
() ()
. .
(. 3.53).
,
.
. IN2 IN0
10, .
IN2 IN0
, .
K
122

. , ,
[0;1] , . 3.53.
.
.
. ,
.
: #1.tms compiled successfully,
. : 0011
, .

. 3.53 Texno FBD


7.
ST .
RTM . ,
. 1 .

. .
, ,
, , ,

(. 3.54).

123

. 3.54 Texno ST
.
,
,
, (. 3.55).

. 3.55
#.
ST.
, . 3/56.

. 3.56 Texno ST
,
124

8.
. ,
(. 1). . 3.57

. 2.54

125

1.

2.

Trace Mode.

3.

4.

5.

6.

, if ST.

7.

, case ST.

8.

, whule ST.

9.

, repeat ST.

10.

, for ST.

11.

FBD ?

12.

FBD , .

13.
FBD , ,
.
14.

SCADA-?
15.

16.

126

4
Texno IL Texno SFC
: Texno IL Texno SFC,
, Texno IL, SFC, FBD.

:
1.
,
( Trace Mode
Texno ST Texno FBD). ,
Texno ST Texno FBD;
2.
, ,

;
3.
Texno SFC,
:
3.1
:
, Texno
IL; 10,
(10),
1, 1,

;
3.2
:
Texno FBD
( );
true;
3.3
: ,
1, , Texno IL:
,

,
127

,
;
3.4
: ,
0, Texno IL:
,
,
,
.
: , ,
1 3 .

1.
. ,
3 . .
2.
. .
1 .
.
.
: , , , , , , ,
. .
, .
, .

, .
. 2.55.

. 3.55
128

. ,
. 3.56, _b1 ,
(. 3.57).

. 3.56

. 3.57
3.
SFC . .
, 3. ,
3, ,
,
. . 3.58.
,
(. 3.55).
# .
SFC .
: (. 3.59).
.
, , .
.

/. .
129

.
, , true.
.

, . .
.

, .
SFC . 3.60.

. 3.58

. 3.59 Texno SFC

130

. 3.60 SFC

a.
.
SFC .
. .
TexnoIL.

,
:
SFC_STEP " "
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : REAL; END_VAR
4.

GE 1//
JMPC _//
> 1
LD 1
131

ST //
_: GE 1
JMPC _// ,
> 1
LD 1
ST //
_: GE _ 10
JMPC // > 10
LD 10
ST _//
:
END_SFC_STEP
b. .
. FBD.
FBD , . 3.61

. 3.61
true
. ST.
:
SFC_TRANSITION "true" FROM( INITIAL_STEP ) TO(
STEP_1 )
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
132

VAR_OUTPUT _ : REAL; END_VAR


VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : REAL; END_VAR
true
END_SFC_TRANSITION
c.
.
. IL.
:
SFC_STEP " "
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : REAL; END_VAR
MUL _ //

ADD __//

ST __//

ST _
MUL //
ST _//

END_SFC_STEP

. ST.
:
133

SFC_TRANSITION " " FROM(


STEP_1 ) TO( STEP_2 )
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : BOOL; END_VAR

END_SFC_TRANSITION
d.

.
. IL.
:
SFC_STEP "
"
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : REAL; END_VAR
MUL _ //

ADD __//

END_SFC_STEP

134


.
ST. :
SFC_TRANSITION "
" FROM( STEP_1 ) TO( STEP_3 )
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : BOOL; END_VAR
!
END_SFC_TRANSITION
5.
. .

3.

,
.

. 3.62
135

1.

SFC .

2.

, , .

3.

IL.

4.

.
5.

6.

7.

IL .

8.

SCADA-?
9.

5

: , ,
, .

:
1.

( Trace Mode Texno IL Texno SFC);
2.

3.
,
;
136

4.
,
, ;
5.


;
6.
SPAD ,
.

1.
. ,
4. .
, .
10 40. ,
:
SFC_STEP " "
VAR_OUTPUT : REAL; END_VAR
VAR_INOUT _ : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INOUT : REAL; END_VAR
VAR_INPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_OUTPUT _ : REAL; END_VAR
VAR_INPUT : BOOL; END_VAR

GE 1
JMPC _
137

LD 1
ST
_: GE 1
JMPC _
LD 1
ST
_: GE _ 10
JMPC
LD 40
ST _
:

END_SFC_STEP
2.
.
RTM .
.
, , . 3.63.
.

. 3.63
3.
. RTM
(. 3.64). .
138

_.
_ .
__FLOAT (. 3.65).

. 3.64

. 3.65
4.
.
,
.
.
(. 3.66).
, , . 3.67

139

. 3.66

. 3.67

5.
. RTM.
.
//. ,
. 3.68. .
, . 3.69.

140

6.

. 3.68

. 3.69

7.
.
,
, . 3.70.

. 3.70
141

8.
.
( ,
).
, . 3.71.

. 3.71

9.
.
,
,
,
.
(. 3.72). ,
,
.

142

. 3.72

1.

SCADA.

2.

Trace Mode.

3.

Trace Mode.

4.

Trace Mode.

5.

Trace Mode.

6.

Trace Mode.

7.

Trace Mode.

8.

.
143

9.

SCADA.

10.

SCADA.

11.

12.
.

13.

SCADA, .

14.

15.
.

SCADA

16.

html .

17.

144

1
Trace Mode

145

146

147

2
FBD

X+Y

X Y

X, Y ,

A, B, C,
D

A, B, C, D ,

X , Y
Y
,

X-Y

X*Y

X
Y

X, Y , O

X/Y

X Y

X , Y
,

X%Y


X Y

, Y
,

X**Y

X
Y

X , Y
,

ABS

X ,

FLOOR

148

1/

O = 1/ X

SQRT

,

X

X**2

HYPOT

X, Y
,

K*X+C

,
,

149

3
FBD

==

IN1, IN2
1, IN1
IN2, , EQ
0

<>

IN1, IN2
1, IN1

IN2,
, NE

>

IN1, IN2
1, IN1

IN2,
, GT

<

1, IN1
IN2,

0

>=

IN1, IN2
1, IN1

IN2,
, GE

<=

1, IN1
IN2,

150

IN1, IN2

, LT

IN1, IN2

==0

<>0

, LE

1, INP
0,
0

INP

,
==0

1, INP
0,
0

INP

,
<>0

INP > 0, SN+=


1, SN-= 0;

SIGN

CMP

CMPN

INP
INP < 0, SN+= 0, , SN+
SN-= 1.
SN

INP = 0, SN+ =

SN- = 0.

INP
c PDk,


PDk,
INP.
PDk
INP,
Q .
INP Pd,
QT
1,
QT>PT, QE
151

INP, PDk
, Q

INP, PD, PT
, QT,
QE

CMPE

1,
QT

INP PD.
QT, QE
0
INP.
CMPN

INP PD, QT
QE 0
INP,
PD

INP, PD, PT
, QT,
QE
MON ;
DAY
;

ALARM

DOF
;
H ;
M;
S

152

4
FBD

SEL

IN0, IG=
0 IN1, IG= 1

IG
, IN0,
IN1 ,
SEL

nSEL

REG ,


,
.
BLK ,
REG= 0

,

REG= 1
I0I5 ;
.
BLK
I0I5

;
.
VAL
0,
;


NUM
,

MAX

IN1, IN2
,
MAX

MIN

IN1, IN2
,

MIN

153


INP

LIMIT

MAX


,
MIN

NUM

;

MUX

MUX7

INNUM,
NUM= 0,1,2
IN0IN2
Q
;

MUX,

IN

NUM

;
IN0IN6
;
Q

1,
INP>MAX;

NLIM

0,
MIN<=INP;
2,
INP<MAX
154

MIN

;
INP
;
MIN

:
Q0i= INPi;
Q1i= INPi-1;

LTN
Q2i= INPi-2;
Q3i= INPi-3,

INP ;
Q0Q3

INP

i-

FRWD



,
Q

INP

155

INP ;
Q

5
FBD -

G01

1/0

G1

8-

: 0, 20, 21,
22,,27, 26,, 20,
21 . .


[0;1]

RND


[0;1]

PILA

PV

PV

GP01

0
1
1
156

PRB

1;

TIME

DATE

PRB.
PRB

0
1000

0/1

S ;

;
H
DAY
;
MON ;
YR

TSTEP

IIM

GSIN

PT
(
,

PT
;

157

SIN

1. . ., . . . . SCADA-:
/ . . , . . , . . .
.: , 2004. 176;
2. . ., . .
/ . . , . . . :
, 2003.127;
3. . SCADA/ . //
. 1998. 3. 44;
4. ., ., . Trace Mode
Windows NT/ . , . , . //
. 1998. 3. 56;
5. . Windows- Trace Mode 4.20/ .
// . 1996.
1. 102;
6. . : / .
.// . 2000.
1. 38;
7. . SACADA- :
/. // .
1996. 1. 32;

158

Оценить