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

/

: and PC-
+ +

,

/ ,
, .



:
(//HMI)
.

(Ethernet ...)

HMI

Hardware PLC
CPU
&
RAM

TwinCAT (Soft )

Windows

System
Manager

CPU

Hardware


Schalter

+24 V

Lampe

a)

b)

0 / 24V

1 bit

Bit

0 .. 10V

16 bit

Word

a
b
c

ab / ba

32 bit

DWord

BOOL

I
BYTE
B

1.0
INT

AT

:
W

20

;
REAL

TIME

STRING
7

Lampe AT %QX0.0 : BOOL;

1. .

Switch AT %IX0.0 : BOOL;

Analog_Value AT %IW2:INT;
Temperature AT %IW100 : INT;

2. ..

a
b

Pulse AT %IB3 : UINT;

PWM_Output AT %QB10 : INT;

Windows

Power
RUN/ST

, System Manager

......
10

PLC Control 1

II/O-Lightbus

01
02
X0 00

CYC
ERR
WD

24V 0V

BC 2000

BECKHOFF

PE PE

11

PLC Control 2

Name:
(Main program)
Priority:
Interval:

12

?
:
: .
.

13

?
TwinCAT soft :
: Windows
, HMI
.

Windows NT
HMI

Windows NT
HMI

HMI

14

TwinCAT - 1 PLC
4 runtime
runtime 4
+ + CAM
+ HMI

: 2ms+ 1ms.
Windows NT
and HMI

Server

z.B.: 1ms

( 1ms )

Server
( )

2ms

3ms

4ms

( 2ms )

5ms

t
t
15

16

PLC Control buttons

File

Projekt

(Return)

/
17

PLC Control -

(POUs)


(Datatypes)

(Resources)

18

PLC Control

19

1:
1.

2.

3.

20

System Manager :

21

System Manager:

22

System Manager:

1.1.

2.2.

in/out...
in/out...
3.3.


4.4.

1..3
1..3

......
TwinCAT
TwinCAT

/
/
23

(INPUTS & OUTPUTS)


System Manager
PLC Control

System
Manager

24

1. 2x
3. 1x

2. 1x

25


System Manager

26

Information data
flow

27



,

, .
28

1.1.

.
.
2.2.

AND
AND
3.
3.

AND
AND

29

1.

: . (%I,%Q)

2.

3.

( ,
...)

4.

5.

, runtime

1.

2.

,
...
30

, ,

1.1.

2.2.

2.2.

1.1.

2.2.

1.1.

2.2.

3.3.

FBs
FBs


LD
LDVar1
Var1
ADD
ADDVar2
Var2
GE
Limit
GE Limit
ST
STFreigabe
Freigabe

31


Start

T /10ms

32

1.

2.

3.

Input help
33

34

System Manager
PLC Control

(rebuild all and
save).
System Manager:

,

!!!

35

1.1.

.
.

2.2.

TON
TON

3.3.

11
22

T_P
T_P


36

3

( LED_3)


( LED_2)

Start < 1s

Start > 1s

T=1s
Start
Led_3

T=1s
Start

T=1s

Led_2

T=1s

37

IL & ST

FBD, LD

SFC
.

38

Var_Declaration

:

.
VAR_INPUT:

VAR_OUTPUT:

39


T_pause_IN

QQ

T_pause
T_pause

:
:

. .

->
->
T_pause.Q
T_pause.Q

T_pause_ET

T_pulse_IN

T_pulse_ET

T /60ms
40

FBs
n-1 cycle

n cycle

41

FB
View
Instance? (
FB)
1.

Online ?

2.

3.

.. FB,

42


LS_IN

LS_Out

Act_Z

= 10

=0

T /10ms
43

1.

CTU
2. (CU)

3.

(PV),

44

Win NT Logon

TwinCAT


Run-Time


45

TwinCAT

Automatical
start of
TwinCAT

Automatical
Log on via
Win NT

46

Boot
:
1.

2.

,

-

3.

4.

47

Run-Time [1..4]

1.

2. Run-Time
Boot

Run-Times

48