Line 134... |
Line 134... |
134 |
|
134 |
|
135 |
top_heating(); |
135 |
top_heating(); |
136 |
bottom_heating(); |
136 |
bottom_heating(); |
137 |
|
137 |
|
138 |
|
138 |
|
139 |
if (period == 200) |
139 |
if ((period == 100) || (period == 0)) |
140 |
{ |
140 |
{ |
141 |
temp=teplota(); |
141 |
temp=teplota(); |
142 |
temp_slope=(temp - temp_last) /(2*100.0*256.0/62500.0); // vypocet strmosti narustu teploty ve stupnich/s |
142 |
temp_slope=(temp - temp_last) /(100.0*256.0/62500.0); // vypocet strmosti narustu teploty ve stupnich/s |
143 |
temp_last = temp; |
143 |
temp_last = temp; |
- |
|
144 |
printf("%02u %02u %3.3f \r\n",cas.min,cas.sec,temp); //vypis pro zaznam profilu |
144 |
} |
145 |
} |
145 |
|
146 |
|
146 |
if (period < 200) period++; |
147 |
if (period < 200) period++; |
147 |
else period=0; |
148 |
else period=0; |
148 |
} |
149 |
} |
Line 219... |
Line 220... |
219 |
// ------------------- PREHEAT --------------------- |
220 |
// ------------------- PREHEAT --------------------- |
220 |
|
221 |
|
221 |
nullcas(&cas); |
222 |
nullcas(&cas); |
222 |
lcd_gotoxy(1,2); |
223 |
lcd_gotoxy(1,2); |
223 |
printf(lcd_putc,"PREHEAT"); |
224 |
printf(lcd_putc,"PREHEAT"); |
- |
|
225 |
printf("#PREHEAT\r\n"); |
224 |
|
226 |
|
225 |
do { |
227 |
do { |
226 |
slope_control(PREHEAT_SLOPE, 0); // hlida strmost predehrevu |
228 |
slope_control(PREHEAT_SLOPE, 0); // hlida strmost predehrevu |
227 |
|
229 |
|
228 |
lcd_gotoxy(1,1); |
230 |
lcd_gotoxy(1,1); |
Line 245... |
Line 247... |
245 |
process_time.sec = SOAK_TIME - process_time.min*60; |
247 |
process_time.sec = SOAK_TIME - process_time.min*60; |
246 |
|
248 |
|
247 |
lcd_clr(); |
249 |
lcd_clr(); |
248 |
lcd_gotoxy(1,2); |
250 |
lcd_gotoxy(1,2); |
249 |
printf(lcd_putc,"SOAK "); |
251 |
printf(lcd_putc,"SOAK "); |
- |
|
252 |
printf(lcd_putc,"#SOAK\r\n"); |
250 |
|
253 |
|
251 |
while (process_time.sec!=0 || process_time.min!=0) |
254 |
while (process_time.sec!=0 || process_time.min!=0) |
252 |
{ |
255 |
{ |
253 |
level_control(SOAK_TEMP); |
256 |
level_control(SOAK_TEMP); |
254 |
|
257 |
|
Line 261... |
Line 264... |
261 |
process_time.sec = (SOAK_TIME - cas.min*60 - cas.sec) - process_time.min*60; |
264 |
process_time.sec = (SOAK_TIME - cas.min*60 - cas.sec) - process_time.min*60; |
262 |
|
265 |
|
263 |
lcd_gotoxy(9,1); |
266 |
lcd_gotoxy(9,1); |
264 |
printf(lcd_putc,"%02u:%02u", process_time.min, process_time.sec); |
267 |
printf(lcd_putc,"%02u:%02u", process_time.min, process_time.sec); |
265 |
delay_ms(200); |
268 |
delay_ms(200); |
266 |
|
- |
|
267 |
} |
269 |
} |
268 |
|
270 |
|
269 |
//----------------- solder ---------------------------- |
271 |
//----------------- solder ---------------------------- |
270 |
|
272 |
|
271 |
nullcas(&cas); |
273 |
nullcas(&cas); |
272 |
lcd_clr(); |
274 |
lcd_clr(); |
273 |
lcd_gotoxy(1,2); |
275 |
lcd_gotoxy(1,2); |
274 |
printf(lcd_putc,"SOLDER"); |
276 |
printf(lcd_putc,"SOLDER"); |
- |
|
277 |
printf("#SOLDER\r\n"); |
275 |
|
278 |
|
276 |
do { |
279 |
do { |
277 |
slope_control(SOLDER_SLOPE, 10); // hlida strmost predehrevu |
280 |
slope_control(SOLDER_SLOPE, 10); // hlida strmost predehrevu |
278 |
|
281 |
|
279 |
lcd_gotoxy(1,1); |
282 |
lcd_gotoxy(1,1); |
Line 284... |
Line 287... |
284 |
|
287 |
|
285 |
lcd_gotoxy(10,2); |
288 |
lcd_gotoxy(10,2); |
286 |
printf(lcd_putc,"%1.1f\21C/s ",temp_slope); |
289 |
printf(lcd_putc,"%1.1f\21C/s ",temp_slope); |
287 |
|
290 |
|
288 |
delay_ms(200); |
291 |
delay_ms(200); |
289 |
if (cas.min>3) heat_failure(); |
292 |
if (cas.min>2) heat_failure(); |
290 |
} |
293 |
} |
291 |
while (teplota() < SOLDER_TEMP); |
294 |
while (teplota() < SOLDER_TEMP); |
292 |
|
295 |
|
293 |
// ---------------- TAO ------------------------ |
296 |
// ---------------- TAO ------------------------ |
294 |
|
297 |
|
Line 305... |
Line 308... |
305 |
process_time.min = (SOLDER_TIME - cas.min*60 - cas.sec)/60; |
308 |
process_time.min = (SOLDER_TIME - cas.min*60 - cas.sec)/60; |
306 |
process_time.sec = (SOLDER_TIME - cas.min*60 - cas.sec) - process_time.min*60; |
309 |
process_time.sec = (SOLDER_TIME - cas.min*60 - cas.sec) - process_time.min*60; |
307 |
|
310 |
|
308 |
lcd_gotoxy(9,1); |
311 |
lcd_gotoxy(9,1); |
309 |
printf(lcd_putc,"%02u:%02u", process_time.min, process_time.sec); |
312 |
printf(lcd_putc,"%02u:%02u", process_time.min, process_time.sec); |
- |
|
313 |
|
310 |
delay_ms(200); |
314 |
delay_ms(200); |
311 |
|
315 |
|
312 |
} |
316 |
} |
313 |
|
317 |
|
314 |
// ---------------- COOLING ------------------------ |
318 |
// ---------------- COOLING ------------------------ |
Line 318... |
Line 322... |
318 |
|
322 |
|
319 |
lcd_clr(); |
323 |
lcd_clr(); |
320 |
|
324 |
|
321 |
lcd_gotoxy(1,2); |
325 |
lcd_gotoxy(1,2); |
322 |
printf(lcd_putc,"REFLOW COMPLETE"); |
326 |
printf(lcd_putc,"REFLOW COMPLETE"); |
- |
|
327 |
printf("COOLING \r\n"); |
- |
|
328 |
|
323 |
|
329 |
|
324 |
while(true) |
330 |
while(true) |
325 |
{ |
331 |
{ |
326 |
lcd_gotoxy(1,1); |
332 |
lcd_gotoxy(1,1); |
327 |
printf(lcd_putc,"%3.1f\21C ",teplota()); |
333 |
printf(lcd_putc,"%3.1f\21C ",teplota()); |
328 |
|
334 |
|
329 |
lcd_gotoxy(10,1); |
335 |
lcd_gotoxy(10,1); |
330 |
printf(lcd_putc,"%1.1f\21C/s ",temp_slope); |
336 |
printf(lcd_putc,"%1.1f\21C/s ",temp_slope); |
331 |
|
- |
|
332 |
} |
337 |
} |
333 |
} |
338 |
} |
334 |
|
339 |
|
335 |
void main() // main loop |
340 |
void main() // main loop |
336 |
{ |
341 |
{ |