Está en la página 1de 3

Totally Integrated

Automation Portal

Proyecto1_CAMIN / PLC_1 [CPU 1214C AC/DC/Rly] / Bloques de programa


Main [OB1]
Main Propiedades
General
Nombre Main Número 1 Tipo OB
Idioma KOP Numeración Automático
Información
Título "Main Program Sweep Autor Comentario
(Cycle)"
Familia Versión 0.1 ID personali‐
zado

Segmento 1: ENCLAVAMIENTO
Se realiza el enclavamiento con 2 sensores

%I0.0 %I0.1 %Q0.0


"SENSOR_A" "SENSOR_B" "BOBINA_A"

%Q0.0
"BOBINA_A"

Segmento 2: BLOQUE SET RESET (SR) y BLOQUE RESET SET (RS)

%I0.0 %Q0.1
"SENSOR_A" "BOBINA 2"
S

%I0.1 %Q0.1
"SENSOR_B" "BOBINA 2"
R

%M0.0
%I0.0 "Tag_1"
"SENSOR_A" RS
R Q

%I0.1
"SENSOR_B"
S1

%M0.1
%I0.1 "Tag_2"
"SENSOR_B" SR
S Q

%I0.0
"SENSOR_A"
R1

Segmento 3: TEMPORIZADORES TON TOF y TP


Totally Integrated
Automation Portal

%DB2
"IEC_Timer_0_DB"
%I0.0 TON
"SENSOR_A" Time
IN Q
T#10s PT ET #Tiempo

%DB1
"Temporizador3"
%I0.1 TOF
"SENSOR_B" Time
IN Q
T#10s PT ET #Tiempo2

%DB3
"Temporizador4"
%I0.0 TP
"SENSOR_A" Time
IN Q
T#10s PT ET #Tiempo3

Segmento 4: CONTADORES CTU (ASCEDENTE) y CTD (DESCENDENTE)

%DB4
"CONTADOR1"
%I0.0 CTU
"SENSOR_A" Int
CU Q
CV #Conteo1
%I0.1
"SENSOR_B"
R
5 PV

%DB5
"CONTADOR2"
%I0.0 CTD
"SENSOR_A" Int
CD Q
CV #Conteo2
%I0.1
"SENSOR_B"
LD
5 PV

%DB6
"CONTADOR3"
%I0.0 CTUD
"SENSOR_A" Int
CU QU
QD false
%I0.1 CV #Conteo3
"SENSOR_B"
CD

%I0.2
"SENSOR_C"
R

%I0.3
"SENSOR_D"
LD
10 PV
Totally Integrated
Automation Portal

Segmento 5: COMPARACION ==, >,>=,<,<=, <>,

%M10.0
10
"Tag_4"
>
Int
10

%M10.1
10
"Tag_5"
>
Int
5

Segmento 6: APLICACION: CONTEO DE CAJAS CON REINCIO AUTOMATICO

%DB7
"CAJAS"
%I0.0 CTU
"SENSOR_A" Int
CU Q
%I0.1 CV #ContadorCajas
"SENSOR_B" R
20 PV

%M0.2
#ContadorCajas #ContadorCajas "AMARILLO"
>= <
Int Int
10 15

%DB8
"CONTADOR5"
TOF %M0.3
#ContadorCajas #ContadorCajas Time "ROJO"
>= <
IN Q
Int Int
15 20 T#3s PT ET #Tiempo4

También podría gustarte