I have a similar application that scans boxes on a pallet wrapping
machine.
Using a mobile scanner with Windows CE, the operator scans the first
box, from the characteristics of the barcode I can determine what is
being scanned (therefore - how many boxes on a pallet).
Using this info, I create and send a web form containing a little java
applett that updates the screen every time subsequent boxes are scanned.
The screen update happens instantly ("Scan box 1 of 50", "Scan box 2 of
50" etc).
When the last box is scanned (or a "Complete Pallet" button is pressed)
the whole set of information is sent to the database, and the screen is
refreshed waiting for the next pallet to begin.
Heres the script: - HTH
procedure Script(iBoxes:Integer);
var
sBoxes:String;
Begin
sBoxes:=IntToStr(iBoxes);
putline('<script type="text/javascript">');
putline('function validbam(bam,bams)');
putline('{');
putline('if (bam.length==9)');
putline(' {ret=true}');
putline('else');
putline(' {ret=false}');
putline('if (ret==true)');
putline(' {');
putline(' exist=bams.indexOf(bam)');
putline(' if (exist>-1)');
putline(' {ret=false}');
putline(' }');
putline('return ret');
putline('}');
putline('');
putline('function displaybox(boxlist)');
putline('{');
putline('to=((boxlist.length)/9)+1');
putline('f=document.bcoder');
putline('f.adder.value="Scan Box "+to+" of '+sBoxes+'"');
putline('}');
putline('');
putline('function boxcount(boxlist)');
putline('{');
putline('to=(boxlist.length)/9');
putline('if (to=='+sBoxes+')');
putline('{return true}');
putline('else');
putline('{return false}');
putline('}');
putline('');
putline('function scanbox()');
putline('{');
putline(' f=document.bcoder');
putline(' myvar=f.barcode.value');
putline(' if (myvar=="completed")');
putline(' {');
putline(' return true');
putline(' }');
putline(' else');
putline(' {');
putline(' mytest=f.nutext.value');
putline(' if(mytest.length>0)');
putline(' {nl="\r"}');
putline(' else');
putline(' {nl=""}');
putline(' if (validbam(myvar,f.nutext.value))');
putline(' {');
putline(' opt = new Option(myvar, myvar)');
putline(' sel = f.scanned');
putline(' sel.options[sel.options.length] = opt');
putline(' ');
putline(' ');
//putline(' f.lister.value=f.lister.value+nl+myvar');
putline(' f.nutext.value=f.nutext.value+myvar');
putline(' }');
putline(' if((boxcount(f.nutext.value))==false)');
putline(' {');
putline(' f.barcode.value=""');
putline(' displaybox(f.nutext.value)');
putline(' f.barcode.focus()');
putline(' return false');
putline(' }');
putline(' else');
putline(' {');
putline(' return true');
putline(' }');
putline(' }');
putline('}');
putline('');
putline('function ccancel()');
putline('{');
putline('window.location.href = "spain.exe"');
putline('}');
putline('');
putline('function ccomplete()');
putline('{');
putline('f=document.bcoder');
putline('f.barcode.value="completed"');
putline('f.submit()');
putline('}');
putline('</script>');
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Clay Shannon
> Sent: 15 October 2007 14:46
> To: 'Borland's Delphi Discussion List'
> Subject: RE: Request for suggestions re: architecture of an
> Intranet / socketapp
>
> Rob,
>
> <<Aren't there already software packages that do that? I
> think Red Prairie has something like that. Are you writing
> this for J.C. Penney? JCP is already an RP customer.>>
>
> Yes, we are, I do believe, a partner of "Rouge de la
> Prairie." I will czech out their site to see what they have;
> yet, I find it hard to believe there would be something
> available "off the shelf" that will do the trick.
>
> <<Several times per second? Why? What are the consequences if
> notification that a package has arrived is delayed by a
> fraction of a second? What are the consequences if it's
> delayed by even 30 seconds? Is someone really going to be
> watching the screen that closely? I can only see an issue if
> the operator is standing there watching the package be
> delivered, or if the operator is on the phone with the
> delivery driver who reports that the package is in place.
> Either way, the operator no longer needs the Web page to
> report delivery anyway.>>
>
> What's going on here is an operator first starts a Batch, or
> Distribution, by scanning a barcode. This updates a label to
> say, for instance, "0 of 50"
> (0 of 50 items have been inducted). As a message comes back
> from the RealTime that the first item was seen (by the photo
> eye), this needs to change to "1 of 50", etc. The operator
> keeps an eye on this, because once it becomes "50 of 50"
> he/she will be looking for a label to scan to begin the next
> Batch/Distribution. They ARE used to seeing their display
> updated in "real-time", and this system we are creating is a
> replacement for the existing one. They will moan like hound
> dogs if the new system seemingly has LESS functionality than
> the tried and apparently not-so-true.
>
> <<How complicated are the queries? Will your database server
> be able to handle 150 of them per second (figuring 3 queries
> times 50 operators)?>>
>
> Not very; in many cases it would just be looking up the value
> for a display element, zB "Select Number_Inducted FROM
> MainFormDisply" or some such.
>
> <<Couldn't the real-time app write to the database itself?>>
>
> That was my idea, but The Powers That Be/The Deciders say
> they don't want to do it that way. Sometimes it seems to me
> they are intent on doing things as indirectly and
> unintuitively as possible.
>
> --Clay Shannon
>
>
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi