Account
Please wait, authorizing ...

Don't have an account? Register here today.

×

The sequence of the web washing machine.

Written by David Posted on 5 June, 2011 at 12:01

I have created a sequence in plc control to continue with the web washing machine. At first I thought about doing this sequence in vb.net, but I found it more interesting to do it with plc control. Thus, by the way, we see a sequence created in ST (Extruded Text). After having the washing machine running, I will do the monitoring in vb.net and the saving in MySql.

The sequence is a beta version that we will modify on the fly. In the next step I will create the interface in vb.net.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144 145

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
	VAR_GLOBALAT %Q*:BOOL; (*Solenoid valve drawer*)
	AT %Q*:BOOL;	(*Drum solenoid valve*)
	AT %Q*:BOOL;	(*Drum engine*)
	AT %Q*:BOOL;	(*Drain motor*)
	AT %Q*:BOOL;	(*Door lock*)
	AT %Q*:BOOL;
	AT %I*:BOOL;
	AT %I*:BOOL;

	HomeWashing:BOOL;
	Temperature:INT;
	Water Level:INT;



END_VAR PROGRAM MAIN
VAR
	stateMain:INT;
	Notice:INT;
	txtWarn:STRING;
	PermissionTo heat:BOOL;
	Thermostat:BOOL;
	Pulso1Sec: TON;
	Standby:INT;


END_VAR (*Subprogrammes*)
SecHeat();

(*Other*)
Pulso1Sec(IN:=NOT Pulso1Sec. Q, PT:= T#1s);




CASEOF
0:((*Check conditions for start*)
	IFNOT  THEN
		:=1;
		:='Unclosed drawer';
	ELSE
		IFNOTTHEN
			:=2; (*Unclosed door*)
			:='Door unlocked';
		ELSE
			:=3;
			:='Ready to start';
			IFTHEN
				stateMain:=10;
				:=FALSE;
			
		END_IF 
	END_IF 

END_IF 10:(*Door lock*)
	:=TRUE;
	:=20;
20:(*Fill with water I*)
	:=30;
	:=21;
	Y2:=TRUE;
21:(*Fill with water II*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=20;
		:='Water filling';
	
	END_IF IF1THEN
		:=0;
		:=30;
	END_IF;
30:(*Heat water*)
	:=TRUE;
	:=40;
40:(*Wait until temperature*)
	IF60THEN
		stateMain:=50;
	
	END_IF :=40;
	:='Heating water';
50:(*Move bass drum with water, this will have a name but...*)
	:=20;
	:=51;
	:=TRUE;
51:(*Continue to move bass drum*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=50;
		:='Moving hype';
	
	END_IF IF1THEN
		:=0;
		:=60;
	END_IF;
60:(*We open soap solenoid valve I*)
	:=5;
	:=61;
	:=TRUE;
61:(*Continue to move bass drum*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=60;
		:='Introduce soap';
	
	END_IF IF1THEN
		:=0;
		:=70;
	END_IF;
70:(*We close soap*)
	Y1:=FALSE;
	:=80;
80:(*Washing*)
	:=25;
	:=81;
81:(*Continuous washing*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=60;
		:='Washing';
	
	END_IF IF1THEN
		:=0;
		:=90;
	END_IF;
90:(*Extract water*)
	:=25;
	:=91;
	:=TRUE;
91:(*Continue To extract water*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=90;
		:='Drawing water';
	
	END_IF IF1THEN
		:=0;
		:=100;
	END_IF;
100:(*Fill water  and extract*)
	:=25;
	:=101;

101:(*Continue to fill water and extract*)
	IF0AND Pulso1Sec. QTHEN
		:=-1;
		:=60;
		:='Fill water and extract';
	
	END_IF IF1THEN
		:=0;
		:=110;
	END_IF;
110:(*We stop water and extract*)
	M2:=FALSE;
	Y2:=FALSE;
	:=120;
120:(*Centrifuge, to simplify I only leave the bass drum running for a while*)
	:=25;
	:=121;

121:(*Continue spinning*)
	IF Standby > 0AND Pulso1Sec. QTHEN
		:=-1;
		:=120;
		:='Centrifuge';
	
	END_IF IF1THEN
		:=0;
		:=130;
	END_IF;
130:(*End washed*)
	M1:=FALSE;
	X1:=FALSE;
	:=0;
	:=0;


END_CASE PROGRAM Simulate
VAR
	Pulso1Sec: TON;


END_VAR Pulso1Sec(IN:=NOT Pulso1Sec. Q, PT:= T#1s);

IF Pulse1Sec. QANDTHEN
	:=+1;


END_IF IFTHEN
	:=+1;
END_IF;                

Within the program created in ST I have added an ACTION in LEADER. This allows us to make certain lines of code in another language for different reasons.

This is the program tree:
La secuencia de la lavadora web.

- Publicidad -

And this is the action:
La secuencia de la lavadora web.

The sequence is constructed with a CASE. When the plc reads the CASE statement, it reads the value of the variable that follows this keyword. It will then read only the code that is followed by this value and only that until the next scan cycle.

CASE <variable> OF
<Value>: Code
<Value>: Code
END_CASE

In the following example if Var = 1, M1 is set to true and if Var = 2, Y2 is set to FALSE. This is equivalent to doing a SET.

CASE Var OF
1:M1:=TRUE;
2:Y2:=FALSE;
END_CASE

Another thing I find interesting is the txtAviso variable. This variable of type STRING informs us of the current state of the machine, for the purpose of debugging I think it can be interesting.

Well and at the moment this is it, anything a comment. And I leave the program in the next post with the application in vb.net.

Bookmark on DeliciousDigg this postRecommend on Facebookshare via RedditShare with StumblersTweet about itSubscribe to the comments on this post
- Publicidad -

Authors: David

See original.

Free Subscription
SUBSCRIBE TO OUR NEWSLETTER
DO YOU NEED A SERVICE OR PRODUCT QUOTE?
LASTEST INTERVIEWS

Entrevista a Jaime Maldonado, Presidente de Air-Con Inc

En entrevista con ACR Latinoamérica, Jaime Maldonado, Presidente de Air-Con Inc, destacó los proyectos que tiene la compañía para este año 2024, sobre todo con la transición de los nuevos refrigerantes. Además, Air-Con estará como expositor en Refriaméricas Miami, y Jaime nos habló sobre sus expectativas con el evento y lo que darán a conocer para todos los visitantes.

Webinar: Armstrong y Energía de Distrito

Por: Rafael Behar, Gerente de Apoyo de Aplicación, Armstrong Fluid Technology Los sistemas de energía de distrito se caracterizan por una o más plantas centrales que producen agua caliente, vapor y/o agua fría, que luego fluye a través de una red de tuberías aisladas para proporcionar agua caliente, calefacción y/o aire acondicionado a los edificios cercanos. Los sistemas de energía de distrito sirven a una variedad de mercados de uso final, incluidos los centros de las ciudades (distritos comerciales centrales), campus universitarios, hospitales e instalaciones de atención médica, aeropuertos, bases militares y complejos industriales. Al combinar cargas para múltiples edificios, los sistemas de energía urbana crean economías de escala que ayudan a reducir los costos de energía y permiten el uso de tecnologías de alta eficiencia. En este seminario web vamos a introducir a Armstrong Fluid Tecnología y su dirección para la energía urbana con enfoques en plantas de calefacción. https://www.acrlatinoamerica.com/20...

Webinar: Mejores Practicas para la Optimización de Sistemas

Importancia de la correcta automatización de plantas de agua helada con el objetivo de pasar al siguiente nivel, que es la optimización de los sistemas para obtener una mayor eficiencia energética y ahorro del costo operativo y de mantenimiento. Por: Camilo Olvera Rodríguez, Gerente de Ventas - México, ARMSTRONG FLUID TECHNOLOGY https://www.acrlatinoamerica.com/20...

Webinar: Enfriando el futuro: Las nuevas tendencias en refrigerantes para supermercados y almacenes

https://www.acrlatinoamerica.com/20... Únete a nosotros en este emocionante Webinar sobre las últimas tendencias en refrigerantes para supermercados y almacenes. Descubre cómo mantener tus productos frescos de manera eficiente, mientras contribuyes a la sostenibilidad y cuidado del medio ambiente. En esta sesión, exploraremos las innovaciones más recientes en refrigerantes ambientalmente preferibles, incluyendo tecnologías avanzadas de enfriamiento. Aprenderás sobre las ventajas de adoptar estas nuevas soluciones, no solo en términos de eficiencia energética, sino también en la reducción de emisiones y el cumplimiento de regulaciones ambientales. Por: Guillermo Brandenstein, Sr Account Manager - Honeywell

Webinar: ¿Es adecuada la forma de vender en las empresas HVAC/R?

En esta presentación se tratarán puntos neurálgicos sobre cómo lograr vender sin necesidad de licitar, teniendo muy presente que el cliente no nos compre porque somos los más baratos sino porque somos su mejor opción. Por: Ing. Rolando Torrado, CEO - Rolando Torrado https://www.acrlatinoamerica.com/20...
Load more...
SITE SPONSORS










LASTEST NEWSLETTER
Ultimo Info-Boletin