Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


PLCs: How to program?, Apuntes de Ingeniería Infórmatica

Asignatura: Adquisició i Monitorització de Senyals Biomèdics, Profesor: Joan Trias, Carrera: Enginyeria Química, Universidad: UPC

Tipo: Apuntes

2016/2017

Subido el 06/11/2017

oriol_bosch_pi
oriol_bosch_pi 🇪🇸

4.9

(7)

14 documentos

1 / 30

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
07/08/2016
1
v2
THEME 2_1
PLCs: how to program?
© EEBE/UPC
v2
CONTROLLERS Programmable Logic Wired Logic
Controllers: before, now and after
9
18
6
10
14
2
Relays
Centralized
control
Low speed
15
3
16
(n) Suggested Roadmap
Scalable
High speed
Modular
Architecture
Scan cycle
Low flexibility High cost
Low
lifetime
PLC
1
4 7
5
13
19
17
20
High
lifetime
High flexibility
Centralized or
distributed
control
History Now and future
GRAFCET
Command law
Metalanguage
Language
Wire contacts
schematics
Schematics using
IEC symbology
Language
Wire contacts
schematics
IEC-61131-3
standard
KOP
AWL
FUP
Structured
Not scalable
Compact
Low size
applications Low/high size
applications
8
11
12
21
22
23
24 25
26
27
28
© EEBE/UPC
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Vista previa parcial del texto

¡Descarga PLCs: How to program? y más Apuntes en PDF de Ingeniería Infórmatica solo en Docsity!

v

THEME 2_

PLCs: how to program?

© EEBE/UPC

v

Wired Logic CONTROLLERS Programmable Logic

Controllers: before, now and after

9

18

6 10

14

2

Centralized^ Relays

control Low speed

15

3

16

(n) Suggested Roadmap

Scalable^ High speed

Modular

Architecture

Scan cycle

Low flexibility Low High cost

lifetime

PLC

1

4 7

5

13

17 19

20 High

lifetime

High flexibility

Centralized or distributed

control

History Now and future

GRAFCET

Command law

Metalanguage

Language

Wire contacts schematics

Schematics using IEC symbology

Language

Wire contacts schematics

IEC standard- 61131 - 3

KOP AWL FUP

Structured

Not scalable

Compact

applications^ Low size Low/high size applications

8

11 12 21 22 2423 26 25

27 28

© EEBE/UPC

v

IEC NEMA

© EEBE/UPC

v

2 Motor 2 ON 3 SW

(^1) SW

(^0) SW1^ M·P Motor 1 ON

PROGRAM (1ST APPROXIMATION)

M0.

M0.

M0.

M0.

PLC (^) M P M0.1 M0.2 M0.3 M0.

M0.0^ M0.0 SW1^ M0.2 M0.

M0.

M0.

M0.1 SW2 M0.3 M0.

M0.

M0.2 SW1 M0.1 M0.

M0.

PLC

© EEBE/UPC

v

HOW USE MARKS? As we say, when we work with PLCs we assign a mark toevery stage.

2 Motor 1 ON 3

SW

SW

1

0

M·P SW

Motor 2 ON

Motor 1 ON

M0. M0. M0. M0.

Typically uses M0.0, M0.1, and so on. Remember: after M0.7 we have M1.

(M0.8 not exists; in general, marks >Mx.7 not

exists)

© EEBE/UPC

v

HOW USE MARKS?

2 Motor 1 ON 3

SW

SW

1

0

M·P SW

Motor 2 ON

Motor 1 ON

M0. M0. M0. M0.

Now, we assign for every transition (typically a sensor) an input point. M I0. P I0. SW1 I0. SW2 I0. SW3 I0.

© EEBE/UPC

v

HOW USE MARKS?

2 Motor 1 ON 3

SW

SW

1

0

M·P SW

Motor 2 ON

Motor 1 ON

M0. M0. M0. M0.

And every action (typically an actuator) to an output point. M I0. P I0. SW1 I0. SW2 I0. Motor 1 Motor 2 QQ0.00.1^ SW3^ I0.

© EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

M P M0.0 S

I0.0 I0.

Stage 0: SET M AND NOT PRESET Stage 1

© EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

Stage 2: SET Stage 1 AND SW2RESET Stage 3

M P M0.0 S

R

M0.1^ I0.0^ I0.1M0.

M0.0 SW1 M0.1 S

M0.3^ I0.

M0.2 M0.1 R

M0.1 SW2 M0.2 S

I0.

M0.3 M0.2 R

© EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

Stage 3: SET Stage 2 AND SW3RESET Stage 1

M P M0.0 S

R

M0.1^ I0.0^ I0.1M0.

M0.0 SW1 M0.1 S

M0.3^ I0.

M0.2 M0.1 R

M0.1 SW2 M0.2 S

I0.

M0.3 M0.2 R

M0.2 SW3 M0.3 S

I0.

M0.1 M0.3 R © EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

Now, we canwrite outputs:

M P M0.0 S

R

M0.1^ I0.0^ I0.1M0.

M0.0 SW1 M0.1 S

M0.3^ I0.

M0.2 M0.1 R

M0.2 SW3 M0.3 S

I0.

M0.1 M0.3 R

M0.1 SW2 M0.2 S

I0.

M0.3 M0.2 R

M0.

M0.

Q0.

© EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

Now, we canwrite outputs:

S

R

M0.1^ I0.0^ I0.1M0.

M0.0 SW1 M0.1 S

M0.3^ I0.

M0.2 M0.1 R

M0.2 SW3 M0.3 S

I0.

M0.1 M0.3 R

M0.1 SW2 M0.2 S

I0.

M0.3 M0.2 R

M0.

M0.

Q0.

M0.2 Q0.

M P M0.

© EEBE/UPC

v

2 EV1 ON

SW

1 SW

M·P

SW1 Motor 1 ON

M0.

M0.

M0.

M0.

M P II0.00.

SW1 SW2 II0.20.

SW3 I0.

Motor 1 Motor 2 QQ0.00.

Other structures

5 EV2 ON

4 SW

SW1 Motor 2 M0.4 ON M0.

Motor 1 ON

SW M0.

SW

SW5^ Motor 1^ ON

SW4 SW5 II0.50.

EV 1 EV 2 QQ0.50.

© EEBE/UPC

v

Other structures

(^2) EV1 ON 3 SW

SW2^1

0 M·^ P SW1 Motor 1 ON

M0. M0. M0. M0.

5 SW4EV2 ON

M0.4^4 SW1^ Motor 2 ON M0. 6

Motor 1 ON M0.6^ SW

SW2 Motor 1 ON SW

M P II0.00. SW1 SW2 II0.20. SW3 SW4 II0.40. SW5 I0.

P S

M0.1 M0.0 R

M0.0 SW1^ M0.1 S

M0.

M0.2 M0.1 R

M0.2 SW3 M0.3 S

M0.6 M0.3 R

M0.1 SW2 M0.2 S

M0.3 M0.2 R

M0.

M^ M0.

M0.1 SW

M0.0 SW1 M0.4 S

M0.

M0.5 M0.4 R

M0.3 SW5 M0.6 S

M0.1 M0.6 R

M0.4 SW4 M0.5 S

M0.6 M0.5 R

M0.

M0.

M0.

© EEBE/UPC

v

(^2) EV1 ON 3 SW

SW2^1

0 M·^ P SW1 Motor 1 ON

M0. M0. M0. M0.

5 SW4EV2 ON

M0.4^4 SW1^ Motor 2 ON M0. 6

Motor 1 ON M0.6^ SW

SW2 Motor 1 ON SW

Motor 1 Motor 2 EV 1 QQQ0.50.00. EV 2 Q0.

P S

M0.1 M0.0 SW1M0.0 R M0.

M0.6^ S

M0.2 M0.1 R

M0.2 SW3 M0.3 S

M0.6 M0.3 R

M0.1 SW2 M0.2 S

M0.3 M0.2 R

M0.

M^ M0.

M0.1 SW

M0.0 SW1 M0.4 S

M0.

M0.5 M0.4 R

M0.3 SW5 M0.6 S

M0.1 M0.6 R

M0.4 SW4 M0.5 S

M0.6 M0.5 R

M0.

M0.

M0.4^ Outputs Q0.

Motor 2

M0.2 Q0.5 EV

M0.5 Q0.6 EV

M0.

M0.2 M0.

Q0.0 Motor 1

P

P

P

P © EEBE/UPC

v

(^2) EV1 ON 3 SW

SW2^1

0 M·^ P SW1 Motor 1 ON

M0. M0. M0. M0.

5 SW4EV2 ON

M0.4 4 SW1^ Motor 2 ON M0. 6

Motor 1 ON M0.6^ SW

SW2 Motor 1 ON SW

P S

M0.1 M0.0 SW1M0.0 R M0.

M0.6^ S

M0.2 M0.1 R

M0.2 SW3 M0.3 S

M0.6 M0.3 R

M0.1 SW2 M0.2 S

M0.3 M0.2 R

M0.

M^ M0.

M0.1 SW

M0.0 SW1 M0.4 S

M0.

M0.5 M0.4 R

M0.3 SW5 M0.6 S

M0.1 M0.6 R

M0.4 SW4 M0.5 S

M0.6 M0.5 R

M0.

M0.

Outputs

PE M0.

RESET_BF 7

Motor 1 Motor 2 EV 1 QQQ0.50.00. EV 2 Q0.

M0.4 Q0.1 Motor 2

M0.2 Q0.5 EV

M0.5 Q0.6 EV

M0.

M0.2 M0.

Q0.0 Motor 1

P

P

P

P © EEBE/UPC

v

(^1) t/5s

M·P

SW

EV1 ON

M0.

M0.

M0.

M P II0.00.

SW1 SW2 II0.20.

Timers

M0.3^3 t/8s M0. M0.5^5 SW

EV 1 EV 2 QQ0.50.

TIM1 ON^ TIM2 ON^ EV2^ ON

P S

M0.1 M0.0 SW1 M0.0 R

M0.5^ S

M0.2 M0.1 M0.1 R M0.

S

M0.5 R

M^ M0.

M0.

M0.0 SW1 S

M0.

M0.4 M0.3 M0.3 R M0.

S

R

M0.2^ M0.4^ M0.5 S

M0.1 M0.3^ M0.5 R

M0.1 Q0.5 EV

M0.3 Q0.6 EV

PE M0.

RESET_BF 6

P

P

M0.

M0.

SW

© EEBE/UPC

v

t/5s

M·P

SW

EV1 ON

M0.

M0.

M0.

M P II0.00.

SW1 SW2 II0.20.

Timers

t/8s

M0.3^3

M0.

M0.5^5 SW

EV 1 EV 2 QQ0.50.

TIM1 ON TIM2 ON^ EV2^ ON

M0.0 SW1 S

M0.

M0.2 M0.1 R

M0.2 S

M0.5 R

M0.0 SW1 S

M0.

R

M0.4 S

A more compactsolution (fraction):

M0.

M0.

© EEBE/UPC

v

Slopes In many applications it is more interesting to know if a sensorgoes from zero to one if a state has zero or one. In this case, we use positive slopes (from zero to one) and negative slopes (fromone to zero).

M0.0^ P M0.0^ N

SW1 SW

In previous case, SW1 is the input under inspection (for to knowif changes form zero to one – P contact– or from one to zero – N contact–. M0.0 is the previous value from SW1. This contact in series with a line, passes to one only during onescan cycle, sufficient for memorize if necessary.

© EEBE/UPC

v

Always true In many applications isnecessary (for example, for not have Boole problems) tohave a forced transition called ALWAYS TRUE or =1. Inwired controllers there is a wire, connected in serieswith previous stage instead of a sensor. In PLC programs,we use a special mark. This mark is configurable by theuser but in this subject, we use usually M100.0 specified for your teacher). (or other

M0.1^1 SW

M0. M0.

M0.0 SW1 M0.1 S

M0.

M0.2 M0.1 R

M0.2 M100.0 M0.3 S

M0.1 M0.3 R

M0.1 SW2 M0.2 S

M0.3 M0.2 R

SW

© EEBE/UPC

v

Counters

1 C3>

M·P

SW

EV1 ON

M0.

M0.

M0.

M P II0.00.

SW1 SW2 II0.20.

EV 1 EV 2 QQ0.50.

C3=C3- 1

The number of counters in the S7-1200 only is limited by available memory size in DB area. Are typeIEC (standard format), his format is 16 bit and resides in DB (Data Block) memory area.

Counters in a GRAFCET have the double condition ofsensors and actuators at same time (as timers).

Example

C3=

SW

M0.3^3

Yes, there are a Boole error but C3=

this is only an example

about counters.

© EEBE/UPC

v

Have 3 counter types: • CTU is an UP counter.

  • CTDCTUD is a down counter. is an up/down counter. In lab practices you know more details about counters.

All of them arecommonly used.

CU = Count up, CD = count down, R = Reset to initial value, LOAD = initial value,

PV = preset value.

Q = true when final count or zero, CV 0 count value.

See programming manual for more information.

Counters (^) Counter_Name CU R PV^ CTU CV Q Counter_Name CD LOAD PV^ CTD CV Q Counter_Name CU LOAD

CTUD CV Q PV

2 C3>0^ CD^ R

M·P

SW

EV1 ON

M0.

M0.

M0.

C3=C3- 1

C3=

SW

M0.3^3

C3=

© EEBE/UPC

v

M P II0.00.

SW1 SW2 II0.20.

EV 1 Q0.

P S

M0.1 M0.0 SW1 M0.1M0.0 R

M0.3^ S^ R

M0.2 M0.

M0.1 M0.2 S

M^ M0.

M0.

M0.1 M0.3 R

M0.2 Q0.5 EV

P M0.

RESET_BF 4

Counters

C3>

M·P

SW

EV1 ON

M0.

M0.

M0.

C3=C3- 1

C3=

SW

M0.3^3

C3=

C

CD

LOAD

Q

CV

CTD

PV

M0.

M0.

M0.

C3 >

M0.3 M0.2 R

M0.2 SW2 M0.3 S

M0.1 C3 ==

0 Yes, is a Boole error

P

© EEBE/UPC

v

CONSIDERATIONS

About Stop, Emergency Stop, programming and PLC connection

© EEBE/UPC

v

2 Motor 1 ON 3

SW

1 SW

M·P

SW

Motor 2 ON

Motor 1 ON

M0.

M0.

M0.

M0.3 M I0.

P SW1 II0.10.

SW2 SW3 II0.30.

Motor 1 Motor 2 QQ0.00.

M P M0.0 S

I0.

This connection to open contact the implies that P button I0.1 input of the PLC, P, must be a normally closed contact. If will act on the given input signal PLC not press P, being normally closed, and allowing only depend SET M0.0 press M, which is normally open.

1M 0.0 0.1 0.2^ S-7 1200 CPU 1214

M P

© EEBE/UPC

v

For RESET_BF, is the same: you must program a closed contactand must be consistent with pushbutton type. P

I0.

M0. RESET_BF 4

1M^ S-7 1200 CPU 1214 I0.0 I0.1 I0. M (^) P

© EEBE/UPC

v

While P pushbutton is used to stop the process, for example, atthe end of the cycle, PE is the emergency stop pushbutton and comes attached to an European Norm. EN 60204-1:1992 9.2.5.4 norm, says: Emergency stop Emergency stop functions should be wired so as to remove power from all actuators, and an electromechanical directly drop Controller power should not be removed.-out relay may be used for this function, but the The Controller and input circuit via a secondary contact on the Emergency should be informed of this action by using Stop.

What happen with PE pushbutton?

© EEBE/UPC

v

In this scenario, we can choose very few things ... Manufacturershas independent double section, NO+NC, NC+NC, etc.^ What happen with PE pushbutton?

© EEBE/UPC