1. Date: 07.03.2012
File: PRO1_06E.1
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Operaciones binarias
I0.0 I0.1 Q 8.0
Q 8.1
SR
S Q
R
I1.2
I1.3
M0.0
Q 9.3
I 1.0
( MCR< )
(MCRA)
Q 8.0
I 0.0
I 1.1
( )
2. Date: 07.03.2012
File: PRO1_06E.2
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Se ejecuta el OB1 (cíclico)
Se ejecutan los FCs, FBs, OBs, etc; según
se vallan llamando
Ejecución cíclica del programa
Módulos de
salida
U E0.1
U E0.2
= A8.0
OB 1
Tiempo de ejecución del programa
La CPU ejecuta el (OB 100) justo después del encendido
Se leen los datos de las señales de entrada y se guardan en la
área de imagen de entradas (PII)
Se lee el área de imagen de salidas (PIQ) y se escriben
en las salidas
Ciclo
de
la
CPU
Módulos de
entrada
3. Date: 07.03.2012
File: PRO1_06E.3
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Proceso de asignación
Byte0
Byte 1
Byte 2
:
:
:
Área de memoria de la CPU
Byte 0
Byte 1
Byte 2
:
:
:
PII PIQ
Programa de
usuario
Área de memoria de la CPU
:
:
U E 2.0
= A 4.3
:
:
:
:
1
1
4. Date: 07.03.2012
File: PRO1_06E.4
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Programa compuesto: Programa estructurado
Estructura del programa
:
Todas las instrucciones
se encuentran en un
solo bloque
Todas las características del
programa son implementadas en
un bloque y son llamadas
secuencialmente
Funciones genéricas son llamadas y
se le asignan diferentes datos
reales.
.
OB 1 OB 1
Receta A
Receta B
Mezclador
Llenadora
OB 1
Bomba
Llenadora
Programa lineal
5. Date: 07.03.2012
File: PRO1_06E.5
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Unidades Software
Errores FB
FB
FB
FC
SFC
SFB
FB asociado a un
Bloque de datos
Denominacion
OB
Bloque de
organización
Ciclo
Tiempo
Proceso
OB = Bloque de organizacion
FB = Bloque de función
FC = Función
SFB = Bloque de función del sistema
SFC = Función del sistema
Sistema operativo
6. Date: 07.03.2012
File: PRO1_06E.6
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Contactos NO, NC, sensores y símbolos
Estado de
la señal
Consulta de la señal
Comando Resultado
Consulta de la señal
Comando resultado
SI
Hay voltaje?
NO
SI
NO
1
0
1
“SI“
1
LAD:
0
&
FBD:
U IEx.y
STL:
UN IEx.y
STL:
&
FBD:
LAD:
“NO”
0
“SI”
1
“NO”
0
“NO”
0
“SI”
1
“SI”
1
“NO”
0
Proceso Interpretación del programa (PLC)
Activado
Desactivado
Estado del
sensor
activado
Desactivado
NO
Tipo de
sensor
NC
7. Date: 07.03.2012
File: PRO1_06E.7
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Ejercicio
Transcriba los siguiente esquemas a los diferentes lenguajes de programación (LAD y STL)
E1.0 E1.1 A 4.0 E1.0 E1.1 A 4.0
....... I1.0
....... I1.1
....... A 4.0
A 4.0
E 1.0
E1.1
&
A 4.0
E1.0
E1.1
&
A 4.0
E1.0
E1.1
&
....... I1.0
....... I1.1
....... A 4.0
....... I1.0
....... I1.1
....... A 4.0
Programas
I1.0
S1
I1.1
S2
I1.0
S1
I1.1
S2
I1.0
S1
I1.1
S2
A 4.0
PLC
Lámpara
Lámpara Lámpara
A 4.0
PLC
A 4.0
PLC
FDB
STL
LAD
E 1.0 E 1.1 A4.0
E1.0 E1.1 E 1.0 E1.1 E1.0 E1.1
8. Date: 07.03.2012
File: PRO1_06E.8
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Direccionamiento de los módulos S7-300
PS CPU SM SM SM SM SM SM SM
Módulos
1 2 4 5 6 7 8 9 10
Numero de
slots
Dirección 0.0
Dirección 0.7
Dirección 1.0
Dirección 1.7
9. Date: 07.03.2012
File: PRO1_06E.9
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Direccionamiento DI/DO en configuración multinivel
Bastidor
0
Slot 1 2 3 4 5 6 7 8 9 10 11
Bastidor
3
96.0
a
99.7
100.0
a
103.7
104.0
a
107.7
108.0
a
111.7
112.0
a
115.7
124.0
a
127.7
IM
PS
Bastidor
2
64.0
a
67.7
68.0
a
70.7
72.0
a
75.7
76.0
a
79.7
80.0
a
83.7
84.0
a
87.7
88.0
до
91.7
92.0
a
95.7
IM
PS
Bastidor
1
IM 32.0
a
35.7
36.0
a
39.7
48.0
a
51.7
52.0
a
55.7
56.0
a
59.7
60.0
a
63.7
PS
0.0
a
3.7
20.0
a
23.7
24.0
a
27.7
28.0
a
31.7
12.0
a
15.7
16.0
a
19.7
4.0
a
7.7
8.0
a
11.7
IM
CPU
PS
10. Date: 07.03.2012
File: PRO1_06E.10
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
L1
(A 8.0)
S1 (E 0.0)
S2 (E 0.1)
L2
(A 8.1)
Esquema
Operaciones binaria lógicas: AND, OR
E 0.2
E 0.3
>=1
=
A 8.2 O E0.2
O E0.3
= A 8.2
E0.0 E0.1 A 8.0
A 8.1
LAD
=
A 8.0
&
E 0.0
E 0.1
=
A 8.1
FBD
U E0.0
U E0.1
= A 8.0
= A 8.1
STL
E0.2
E0.3
A 8.2
L3 (A 8.2)
S3
(E 0.2)
S4
(E 0.3)
OR
AND
11. Date: 07.03.2012
File: PRO1_06E.11
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Operación binaria (XOR)
X E0.4
X E0.5
= A8.0
E 0.4
E 0.5
XOR
=
A 8.0
E0.4 EI0.5
E0.4 E0.5
A 8.0
LAD
>=1
=
A 8.0
&
E 0.4
E 0.5
&
E 0.4
E 0.5
FBD STL
U E0.4
UN E0.5
O
UN E0.4
U E0.5
= A8.0
12. Date: 07.03.2012
File: PRO1_06E.12
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Ejercicio
U E 1.0
UN E 1.1
U M 4.0
= A 8.0
= A 8.1
U E 2.0
Ejemplo 1
Estado
de
la
señal
0
0
0
0
Resultado
de
la
consulta
Estado
del
RLO
Estado
de
la
señal
Resultado
de
la
consulta
Estado
del
RLO
1
Ejemplo 2
1
1
1
Estado
de
la
señal
Resultado
de
la
consulta
Estado
del
RLO
1
Ejemplo 3
0
1
0
13. Date: 07.03.2012
File: PRO1_06E.13
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Asignación, seteo y reseteo
(S)
A8.1
E 1.2 E 1.3
E 1.2
&
S
A 8.1
E 1.3
U E 1.2
U E 1.3
S A 8.1
Seteo
(R)
A 8.1
E 1.4
E 1.4
>=1
R
A 8.1
E 1.5
O E 1.4
O E 1.5
R A 8.1
Reseteo E 1.5
( )
A 8.0
E 1.0 E 1.1
E 1.0
&
=
A 8.0
E 1.1
U E 1.0
U E 1.1
= A 8.0
Asignación
LAD FBD STL
14. Date: 07.03.2012
File: PRO1_06E.14
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Set/ Reset Flip-Flop
SR
R Q
S
E1.2
E1.3
M0.0
=
A9.3
Prioridad
Reset
SR
S Q
R
E1.2
E1.3
M0.0
A 9.3 U E 1.2
S M 0.0
U E 1.3
R M 0.0
U M 0.0
= A 9.3
RS
S Q
R
E1.3
E1.2
M0.0
=
A9.3
Prioridad Set RS
R Q
S
E1.3
E1.2
M0.0
A 9.3 U E 1.3
R M 0.0
U E 1.2
S M 0.0
U M 0.0
= A 9.3
LAD FBD STL
15. Date: 07.03.2012
File: PRO1_06E.15
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Conector
LAD
E 1.0 E 1.1
( )
M0.0 E 2.0 E 2.1
( )
M 1.1
NOT ( )
A4.0
U E 1.0
U E 1.1
= M 0.0
U M 0.0
U E 2.0
U E 2.1
NOT
= M 1.1
U M 1.1
= A 4.0
STL
E 1.0
E 1.1
&
&
E 2.0
E 2.1
M0.0
M1.1 A 4.0
=
FBD
16. Date: 07.03.2012
File: PRO1_06E.16
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Comandos asociados al RLO
LAD FBD STL
U E0.0
U E0.1
NOT
= A8.0
=
A8.0
&
E0.0
E0.1
( )
A8.0
NOT
E0.0 E0.1
NOT
Palabra de
estado
15 8 0
BR RLO
No disponible No disponible
CLR CLR
No disponible No disponible
SET SET
E1.6
( SAVE ) SAVE
&
E1.6
SAVE
U E1.6
SAVE
=
A8.1
BR
BR
( )
A8.1
BR
U BR
= A 8.1
17. Date: 07.03.2012
File: PRO1_06E.17
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Función Máster Control Relay
MCR<
&
E0.0
MCRA
S
&
E0.4
A16.0
MCR>
&
=
M5.5 M69.0
E4.7
MCRD
& =
E0.7
A8.5
M0.6
=
FBD
MCRA // Activacion
U E0.0 // incluido MCR
MCR( // Abrir MCR
U E0.7 // NO Contac
= A8.5 // Salida
= M0.6 // Salida
U E0.4 // NO Contact
S A16.0 // Set
)MCR // Cerrar MCR
UN M5.5 // NC Contac
UN E4.7 // NC Contac
= M69.0 // Salida
MCRD // Desactivacion
STL
LAD
( MCRA )
E0.7
( )
A8.5
( )
M0.6
E0.4
( S )
A16.0
( )
M69.0
E4.7
M5.5
( MCR< )
( MCRD )
( MCR> )
E0.0
18. Date: 07.03.2012
File: PRO1_06E.18
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Salto incondicional (Independiente del RLO)
(SPA )
NEW1
Network 1
Network 2
:
:
:
:
Network x
NEW1
( )
M69.0
E4.7
M5.5
LAD
NEW1
SPA
....
NEW1
&
M5.5
E 4.7 =
M69.0
Network 1
Network 2
:
:
:
:
Network x
FBD
Network 1
SPA NEW1
Network 2
:
:
:
:
Network x
NEW1: UN M5.5
UN E4.7
= M69.0
STL
19. Date: 07.03.2012
File: PRO1_06E.19
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Salto condicional (Dependiendo del RLO)
U E0.0
U E0.1
SPB NEW1
NEW1
E 0.0 E 0.1 &
E0.0
E0.1 SPB
NEW1
(SPB)
SALTAR SI
RLO=1
U E0.2
U E0.3
SPBN NEW2
SPBN
E0.2
E0.3
NEW2
NEW2
E 0.2 E 0.3
SALTAR SI
RLO=0
(SPBN)
&
LAD FBD STL
20. Date: 07.03.2012
File: PRO1_06E.20
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Detección de flanco RLO
P
E1.0 E1.1 M1.0 M8.0
N
E1.0 E1.1 M1.1 M8.1
LAD
E1.0
E1.1 P =
&
M1.0 M8.0
E1.0
E1.1 N =
&
M1.1 M8.1
FBD
U E1.0
U E1.1
FP M1.0
= M8.0
U E 1.0
U E1.1
FN M1.1
= M8.1
STL
E1.0
E1.1
RLO
M1.0
M8.0
M8.1
M1.1
Ciclo OB1
Ejemplo
21. Date: 07.03.2012
File: PRO1_06E.21
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Ejercicio: Programa de llenadora
A 0.1 Marcha adelante
A 0.2 Marcha atrás
Sensor de
botellas E0.6
E 0.0 =
E 0.1 =
Botón Start (Normalmente abierto)
Botón Stop (Normalmente cerrado)
Operación ON/OFF
E 0.4 = Botón marcha adelante
(Normal abierto)
Botón marcha atrás
(Normal abierto)
E 0.5 =
M
A 0.0= Indicación maquina
(encendida/apagada)
E0.2 Parada Emergencia (Normalmente Cerrado)
E0.3 Guarda Motor (Normalmente Cerrado)
22. Date: 07.03.2012
File: PRO1_06E.22
SIMATIC S7
Siemens AG 1999. All rights reserved.
Information and Training Center
Knowledge for Automation
Ejercicio: Taladradora
En el estado de reposo la taladradora estará arriba, pisando el final de carrera (E0.1)
Si se pulsa la marcha (E0.0) la taladradora bajará accionado por el motor de bajada (A4.0).
Cuando se active el final de carrera de abajo (E0.2), la taladradora subirá de nuevo. Si en algún
momento se pulsa el interruptor de parada (E0.3), la taladradora deberá subir.