forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Bar code reader?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Dec 11, 2005 3:41 am    Post subject: Bar code reader? Reply with quote

I'm wondering if anyone has tried reading bar codes with VDS.

I know a while back Tommy wrote VDSBAR an extention that can create bar codes. I'd like to be able to read them also.

I'm sure this would require communicating with a COM port that would have the physical reader attached.

Thanks,
Aslan
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Dec 11, 2005 4:09 am    Post subject: Reply with quote

If you're looking for an inexpensive barcode reader (ex. US $5), then look
on eBay for something called the "CueCat".

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Dec 11, 2005 4:44 am    Post subject: Reply with quote

Thanks, I already have access to a scan device. I want to capture the data in VDS if possible.
Back to top
View user's profile Send private message Send e-mail
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Dec 12, 2005 1:57 am    Post subject: Reply with quote

Reading the comport is easy... Interpreting it is the challenge. I posted a freeware dll for reading comports at:
http://forum.vdsworld.com/viewtopic.php?t=3224&start=0&postdays=0&postorder=asc&highlight=
I hope it helps...

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Dec 12, 2005 2:38 am    Post subject: Reply with quote

Hey thanks Hooligan Smile

I knew someone had a dll for COM ports.

Your right interpeting the data is going to be the fun part No clue
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Dec 15, 2005 7:27 pm    Post subject: Reply with quote

Vic once used a barcode scanner in one of his projects, you might want to send him an E-mail to get any help... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Fri Dec 16, 2005 8:35 am    Post subject: Reply with quote

I was able to configure the barcode reader I used in my project to export the data like it was typed at the keyboard - it was just a matter of hooking the barcode reader between the PC and the keyboard, and the reader would simply fake the keypresses. I believe most of DataLogic's barcode readers can add "header" keystrokes before the actual barcode, and that's how I made VDS response to it. What it basically does is that it hits F11, waits for a while (by sending 3x the ctrl keypress, which doesn't do anything), sends the actual barcode and finally it "hits" the enter key.

The script itself has a hotkey event hooked up to the F11 key, which creates a simple dialog with a single input field an a (default) button, moved outside of the user's screen. It's not the best solution I could think of, but it saves you the hassle of working out how to communicate with it through the COM port and all the error checking that comes with it. The barcode reader I used didn't supported communication through COM anyway, although I must admit that I thought about returning it to the store and getting one which did supported COM communication; hidden dialog screens and all are not what I would call "professional programming".

One thing you will have to keep in mind either way is that your barcodes will need some sort of validation (at least, if your application will generate them as well). I used the following function which basically adds a check digit to the end of each barcode you pass along with it, maybe it's of any use to you:

Code:
:gen_barcode
    %i = 1
   
    %%Barcode_CheckSum = 0
   
    while @unequal(@succ(%i), @len(%1))
       %%Barcode_CheckSum = @sum(%%Barcode_CheckSum, @prod(@asc(@substr(%1, %i, %i)), 2))
       %i = @succ(%i)
       
       if @equal(@len(%1), 1)
          %i = 0
       end
    wend
   
    %%Barcode_CheckDigit = @format(@fdiv(%%Barcode_CheckSum, 100), .0)
   
    if @greater(%%Barcode_CheckDigit, 9)
        %%Barcode_CheckDigit = 0
    end
   
    exit %1%%Barcode_CheckDigit


Good luck with your project Wink

Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Dec 17, 2005 4:12 pm    Post subject: Reply with quote

Thank you very much Vic. Smile This at least gives me a starting point and some options as to which way to go with it.

Thanks again!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group