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

OWEN Logic

07

2011

OWEN Logic

..................................................................................................................................4
.....................................................................................................4
1. .........................................................................................6
1.1.
1.2.
1.3.
1.4.

.................................................................................................................. 6
........................................................................................ 6
............................................ 6
............. 7

2. .......................................................................................7
2.1. ..................................................................................................................... 7
2.2. ........................................................................................................................... 7
2.3. ................................................................................................. 8
3. .........................................................................................................9
3.1.
3.2.
3.3.
3.4.
3.5.
3.6.
3.7.
3.8.

........................................................................................... 9
......................................................... 11
................................................................ 13
...................................... 13
.......................................................................................................... 14
.................................................... 17
.............................................................................. 18
........................................................ 26

4. . .................................................. 27
4.1. ........................................... 27
4.2. ................................... 30
. ........................................ 34
.1 .................................................................................................... 34
(NOT) ......................................................................................................... 34
(AND) ........................................................................................................... 34
(OR) ........................................................................................................ 35
(XOR) ............................................................................ 35
.2 ..................................................................................... 35
(ADD) ................................................................................................................ 35
(SUB) .............................................................................................................. 35
(MUL) .............................................................................................................. 36
(DIV)..................................................................................................................... 36
(MOD) .............................................................................................. 36
.3 .............................................................................. 37
(EQ).......................................................................................................................... 37
(GT) ...................................................................................................................... 37
(SEL) ...................................................................................................................... 37
.4 .............................. 38
(SHL)..................................................................... 38
(SHR) .................................................................. 38
(EXTRACT) ................................................................................................... 38
(PUTBIT) ....................................................................................................... 39
(DC32).......................................................................................................... 39
(CD32) ............................................................................................................. 40
. ...................................................... 41
RS- (RS) ............................................................... 41

OWEN Logic

SR- (SR) .................................................................. 41


(RTRIG) ........................................................... 42
(FTRIG) ................................................................ 42
D- (DTRIG).............................................................................................................. 42
(TON) .......................................................................... 43
(TOF)......................................................................... 43
(BLINK) ........................................................... 44
(CT) ................................................................. 44
(CTN) ....................................................................................... 44
(CTU) ......................................................................................... 45
(CLOCK) ..................................................................................... 45
(CLOCK WEEK) ................................... 46
............................................................................... 47

OWEN Logic

OWEN Logic
( OWEN Logic)

( , 1
).
, .
OWEN Logic -,
-10 -20 (
www.owen.ru).

WEN Logic

FBD (Function Block


Diagram)

(
, )


()


OWEN Logic
.
(
), :
1
(. 1), 0
(. 0).

.
.
.

,
,
110.
,
.

.

(
).
,
.

() .
,

,

.
,
4

OWEN Logic

).

OWEN Logic

1.
1.1.
OWEN Logic ,
,
.
,
.
,
, .
,
, www.owen.ru.

1.2.

OWEN Logic


.

. .
:
1) OWEN Logic ;
2) ;
3) ( )
;
4) ;
5) ;
6) .

FBD.

1.3.

, .
1.1.
:
1
( , , I1,, I8).
2
, .

1.1 ,
S1Sn

OWEN Logic

3
(
Q1, , Q4).
N 1 (

).

.

1.4.

OWEN Logic
MS Windows 98/2000/XP/Vista.
.NET Framework 2.0 ( .NET Framework
).
:
Pentium 2 ;
64 ;
30 ;
- -10;
;
800x600 .

2.
2.1.
OWEN Logic
Setup OWEN Logic.exe (
- -10)
, .

OWEN Logic ( 2.1).

2.1

2.2.
WEN Logic
OWEN OWEN Logic OWEN Logic

OWEN Logic

2.3.

-.
, -10.
!

,
WEN Logic.




.
,
2.2.

-
(
2.2
).
.

OWEN Logic

3.
3.1.
OWEN Logic
, 3.1.

3.1 ( )

:
( )

;
: , , , , ;

( 3.1).
3.1


|
|
|
C

| C


.




( , ).


OWEN Logic

3.1

10


(
, )

(
)


()


,
( ,
)

( ) ,

,
.

,
.

OWEN Logic

(
);

( );
,
OWEN Logic ( 3.2).
(1)

(2)

(3)

(4)

(5)

(6)

(7)

3.2 OWEN Logic

:
(1)
;
(2)
.
, ,
;
(3)
;
(4) (5) :
: 0100 % : 0100 % (
,
). OWEN Logic , ,
, ;
(6)
OWEN Logic ,
;
(7)
.
,
, ,
.

.

3.2.
OWEN Logic ( )
,
( 3.3).

11

OWEN Logic

3.3

,
, (),
I, Q (
3.4).

()
.

.
. (
) ,
.

3.4 ( )

12

OWEN Logic


( ) ,

( :, 3.5).

3.5



.
: *.owl. ,
, , _Logic.owl.

3.3.
, ,
OWEN Logic.
,
( ) ,
.
. ,
.

3.4.

,
. ,

.

(
3.7).

). (

(1) (2) (3) (4)

(6)

(5)
3.7

:
(1) ;
(2) ;
(3) ,
13

OWEN Logic

;
(4)
;
(5)
;
(6)
TON, TOF, BLINK.

,
CLOCK CLOCK WEEK
( 3.8).

3.8

,
, , :
1) (

( );
2) ,
( 3.9);

3.9

3) , ,
;
4)
.
.
( ) .

3.5.
3.5.1.
110,

, 3.10.
14

OWEN Logic

3.10

. ,

, .,

.
,
, . ,
, .

:
1


, ,

.
2

, 3.11.

3.11

3
.
, 3.12.

15

OWEN Logic

3.12 Modbus

4 /
, 3.13;

3.13 :

,
.
, Modbus ,
Modbus.
Modbus 3.14.

modbus
3.14 Modbus

3.5.2. RS-485


RS-485,


RS-485 ,
3.15.

110
.

16

3.15
RS-485

OWEN Logic

3.6.
.
:
1) COM- ;
2) ;
3) ,
(. . 2.3);
4)
,
.
.
.
!
, .

17

OWEN Logic

3.7.

:
1)
, 3.16.


3.16

()
;
2) , ,
(),
( );
3) ( )
(

);
4) ( ) (
)
.
, 3.17;

18

OWEN Logic

3.17

5)
( )
;
6)
,
;
7) , ,
. -
, (. .
)
, ,

.

( 3.18).

3.18

()
. ,
.
,
. ,
.

;
8)
( ).
,
, ;
19

OWEN Logic

9)

( ) ;
10)

( ), 3.19;

3.19

11)
,
, .

;
12)
/ ,
.

,
. ,
10:00:00,
09:59:45 ( 15 ),
( 3.20)
-15 /.

3.20

13)

(,
) ( ),
20

OWEN Logic

( ).
, . .
.

:
1
,
,

, 3.21.
1

3.21

2

(, V1). .
3
,
,

.
4

,
V1;
14)

()
21

OWEN Logic

, .
, . ;
15)

.
.
, 3.22
TI BLINK1.
! ,
, .

3.22 (Write
to FB)

, , Write to
FB (. 3.23).

3.23 TON

16) :
)
.
22

OWEN Logic

(. 3.24).

3.24

. OWEN Logic
.
)
(. 3.25);

3.25

,
, .
) (. 3.26);
) / (. 3.27);
)

(. 3.28).
,

TON, TOF ..

23

OWEN Logic

3.26

3.27

24

OWEN Logic

3.28

Ctrl+Alt+S;
)
(.
3.29) .

3.29

, .
:
. ,

.

.
25

OWEN Logic

3.8.

.
( , ,
/ .).
, ,
( )
, .
:
1) ,
(. . 3.2);
2)
:
)
(
);
) ,
, , 3.30;

2
3

3.30

) ,
.

;
3) .

,
;
4) .
5)
.

, 4.
26

OWEN Logic

4. .
,

OWEN Logic. ( 110), OWEN Logic.

4.1.

. ,
, .
,
, , :
1) (F1)
(SB1);
2) ,
,
1 ,
;
3) 2
3
;
4)

(SA1), .

;
5)
.


, ,
110, .
110-24.8.4-
, 4.1 (
).


,
(. ).
, 4.2.
Q2
( D1D6). Q1
D7
, , D1
D6.

27

OWEN Logic

4.1 ,
SA1 OFF-N; SB1 OFF-N; HL1

4.2
_Logic

:
1) ( 2 ) (SB1),
. 1 (D2).
D2 . 1, D2 . 1,
28

OWEN Logic

(D3) 1 .

(D6) Q2;
2) F1
. 1 D1 . 0
(D2),
D2. Q2;
3) 2 , D4
. 1, (D5)
3 . (D6) Q2 (
F1);
4) (SA1) . 1 (D6)
Q2 ( SA1);
5) . 1 Q2
(D8), . 1 (
D7) Q1 . 1 ( Q1
).
, , ,
4.3.

4.3 _Logic OWEN Logic


( CLOCKW1)

29

OWEN Logic

4.2.

(, )
.
:
1) : ,
(SA1);
2) ,
(SB1),
(15 , 10
). 5
(SB2);
3)
( );
4)

F1)
(HL1)
( 3 );
5) (SB3);
6) (SB4)
.


( ) ,
110.
110-24.8.4
, 4.4.

4.4 , SA1 OFF-N;


SB1SB4 OFF-N; M1 ; HA1 ;
HL1

30

OWEN Logic

,
4.5 ( Q1Q3
).

4.5
_Logic

:
I2 ( ): (SB1)
S (D1) . 1 RS- D1
. 1. ,
SA1:
SA1 ( ), . 1
D8, D9 Q1 (
1 );
SA1 ( ), . 1
D3 D4, D5.
I3 ( ): (SB2)
F1 R (D1) . 1
RS- (D1) . 0 ( Q1 ).
I1 ( ):
D1 SA1 (
):
. 1 SA1 D3 D4
( 5 ). ,
31

OWEN Logic

(D2), R D1 .
. 1 D3 D5
: . 1 15 , . 0 10 . c
(D8) Q1
M1.
SA1 ( )
D3 D1 D6
Q1, . .
M1.
I6 ( ):
F1 S (D9) . 1 RS- D9
. 1, D10 : . 1
3 , . 0 3 . (D12)
Q2 HA1.
I7 ( ):
(SB3) R (D9) . 1 RS-
. 0 D10 .
I8 ( ):
(SB4) . 1 (D11)
Q3 HL1 .
Q3 , F1 .
(SB4) . 1 (D12)
Q2 HA1 .
, , ,
4.6.
.
1. , ,
. ,

.
2.
, (CT),
D1.

32

OWEN Logic

4.6 _Logic
OWEN Logic

33

OWEN Logic

.
.1
,

, :
(AND) 1;
(OR) 0.

.

, , .1.

.1

(NOT)
I1
0
1

Q
1
0

.
1 ( ),
0 ( ) .
,
.

(AND)
I1
0
0
1
1

I2
0
1
0
1

Q
0
0
0
1

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

34

OWEN Logic

(OR)
I1
I2
Q
0
0
0
0
1
1
1
0
1
1
1
1

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

(XOR)
I1
I2
Q
0
0
0
0
1
1
1
0
1
1
1
0

. 1 ( ),
1.
.
,
.

.2
(ADD)


.

4294967295 (32 ), 32 .
24 +2 + 4 + 7 = Var1:

(SUB)


35

OWEN Logic

.
(V1)
(V2), ,
0x100000000 (4294967296) :
(V1 + 0x100000000) V2 = Q.
24 2 = Var1 = 22:

, V1 V2:
2 24 = Var1 = 4294967274.

(MUL)


.

4294967295 (32 ), 32 .
24247 = Var1:

(DIV)


.
,
.
0 0FFFFFFFF.
24/2 = Var1:

(MOD)


.

36

OWEN Logic

22 3 (Var1 = 1):

.3
(EQ)
V1 = V2; Q = 1
V1 > V2; Q = 0
V1 < V2; Q = 0
. 1,
.
:

(GT)
V1 = V2; Q = 0
V1 > V2; Q = 1
V1 < V2; Q = 0
. 1,
(V1) (V2).
:

(SEL)
V1 = 0; Q = V2
V1 = 1; Q = V3
V2,
V1 0, V3, V1 1.
:

37

OWEN Logic

.4

(SHL)


X N .
38() = 00100110():

(SHR)


X N .

152()
=
10011000():

(EXTRACT)

N
X. .
. (0 1).
81() =
1010001():
38

OWEN Logic

(PUTBIT)

X
N , B (. 0 1).
. (0 1).
. 1
38() = 100110():

(DC32)

5 4 3 2 1
0 0 0 0 0
0 0 0 0 1
0 0 0 1 0
0 0 0 1 1
1 0 0

1 1 1 0 1
1 1 1 1 0
1 1 1 1 1


32 31
6 5 4 3
0 0
0 0 0 0
0 0
0 0 0 0
0 0
0 0 0 1
.
0 0
0 0 1 0
0 0 .
1
.

0 0
0 0 0 0
0 1
0 0 0 0
1 0
0 0 0 0

2
0
1
0
0

1
1
0
0
0

0 0
.

0 0

0 0


0x1F (11111b).
.
:

39

OWEN Logic

100001b & 11111b


33

DC32

010b

(CD32)


.
,
1 ,
.

.

40

OWEN Logic

.
RS- (RS)


.
.
1 S.

R.

SR- (SR)


.
.
1 S.

S.

41

OWEN Logic

(RTRIG)


.
.
.

(FTRIG)


.
.
.

D- (DTRIG)


D,
.
Q 1
1 D. 0
0
D.
.
S Q
; R
Q 0.
42

OWEN Logic

()


.
.
Q 1 (I).
Q
T, 0.
= 0 4147200000 ,
48 .

(TON)

.
.
Q 1
(I). 1
,
.
0 4147200000 , 48 .

(TOF)

.
.
1 I,
(T)
.
0 T.
0 4147200000 , 48 .
43

OWEN Logic

(BLINK)

.
Q
( 1) (
0) I
( 1). .
0 4233600000 ,
49 .

(CT)

N (
). .
Q 1
(T), I
N ( ).
N 0 65535.

(CTN)

,
.
(U), Q.
, D ( ),
44

OWEN Logic

Q.
R 1, Q
N.
.
U D
U.
N 0 65535.

(CTU)

, .
Q
. 1,
N (N ).
N 0 65535.
0 R.

R.

(CLOCK)


. .
() ()
.
0,00 24 .

( .1), ,
.2 ( ).

45

OWEN Logic

.1

.2

(CLOCK WEEK)


, .
. :

(), ()
.
0,00 24 .
46

OWEN Logic

01
02
03


15.02.2010
25.02.2010
30.06.2010

04
05
06

30.08.2010
29.09.2010
07.03.2011

07

29.05.2011




,



SEL

TOF, TON, TP (48 )


BLINK (49 )


-

47

Оценить