Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 timer problem part 2 Kategorie: Programmierung Basic (von mknaapen - 12.09.2004 17:18)


Hallo again, yep the dutch guy.
Okay this time my timerproblems in english, cos my german is not so well.

Main question is ; how to program two things at the time.

Technical specifications:
C-control I
Transport beld goes 40 meters/minute (normal speed, it's adustable to the proces)
packetlenght = 18 cm
max 140 packets per minute (Between 110...140 packets/minute depending on the proces)
no read trigger from the barcodescanner = 100ms

Question:
Transport belt, goes 40 mtr/min. size = aprox 1 meter long. The barcodescanner reads the barcodes on the produkt. If no-read,due no label or bad barcode, the barcodescanner gives a digital 100ms signal. This is the trigger to trow this package out.

I'll try to draw it a little:
                                __                                                                    o
                                |__| barcode scanner                                           \\
       _____              ___|_                 ______                                         \\
       | no    |            | no      |             |  good |                                           \\
       |code |            |code__|             |code__|                                            \\   open with no-read
  o=========================================o   o==========o
             direction ------>  40 meter/min 140 packages/min                   |
                                                                                                      |                                      
                                                                                                    |    |
                                                                                                    |__|  cilinder to open


So, with the maximum speed of 40 mtr/min = 66 cm/sec the packages are 28 cm seperated from each other. The space between the barcodescanner and the cilinder is aprox. 70 cm. So lets say that between the scanner and the cilinder 3 package can be on the belt.

I need to know how to program this problem.
example:

#begin
wait scanner = on
period = timer + speed (depending on beldspeed)

#cilinder
if period > timer then goto cilinder
cilinder = on
pause 2
cilinder = off
goto begin

In this example one package will be trow out. but if package 1,2,4,6,7 must be trow out, this little program will not work. I'll have constantly poll the barcodescanner, and add a time to this trigger. And there is my problem, when I'm waiting for the timer to activate the proces, I cannot poll my triggerinput.  

The chance that I miss the trigger or see it to late is to big.

So I dare you......
Mathy
Directly to email = mknaapen@tiscali.nl

 Antwort schreiben

Bisherige Antworten:

Re: timer problem part 2 (von Topmail - 12.09.2004 17:26)