Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Communications programing
Message
From
01/06/2006 08:14:36
 
 
To
01/06/2006 06:40:27
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01123906
Message ID:
01126419
Views:
20
Without seeing your code, I'm shooting in the dark here, so I might be covering old ground.

Do your scanners emit any codes indicating start and end of the barcode? I'd make a small wager that in the case of these truncated scans that the data is sitting the controls buffer, ready to be read. With an end code, you can test for it and know you have a complete scan and process accordingly.

If not, another approach would be to use a timer to poll the port for data, say every 250 ms or so. If your app as I remember won't see anything more frequent that 25-30 seconds per scan, once your polling detects some data, start a counter and after several more timer events you may assume you have it all and process it. FWIW, my port tester in downloads uses a similar approach and is very reliable using this technique.

A slight variation of the above would be to start a timer using the ONCOMM event when the first character is received. Knowing the port baud rate and the maximum size of the barcode, the timer interval could be tweeked to ensure you have received all the scan, then read the port in the timer event.

Hope this gives you a few ideas.

>I am also trying something else. I am playing with a serial scanner connnected directly to the computer's serial port. Testing that I am getting some strange results. When I scan a short barcode (5-6 chars) it works fine I am consistently scanning the barcodes correctly but a barcode is pretty long like 25 chars I am getting all kind of bad scans: sometimes it is just two chars, somwtimes 10, and once in a while all 25. I have played with mscomm settings and port settings but could not find anything that would help. I also tried different scanners. Do you have any idea?
>
>Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform