+ Reply to Thread
Results 1 to 3 of 3

Barcode reading program

  1. #1
    Registered User
    Join Date
    01-08-2008
    Posts
    15

    Barcode reading program

    I bought a barcode reader and have to decide what information I want to encode into it. I have to do some analysis of what I need and some kind of architectural design but I've programmed very much at all with Excel. At the top level I have stream of alphanumeric characters coming in but they are a readable and reasonably compact way of representing a binary string divided into fields where several bits represent a certain feature or piece of information. I imagine some kind of top level loop and a kind of C-style switch statement (like a nested if statement) - I don't know how to code that up for Excel yet and was hoping I could start to get some ideas about how to do that here. I don;t want to spell out the exact nature of what I'm doing but imagine that I have several products, each with their own distinct set of possible defects. Of the top of my head I imagine I will have to enter the date (a range of bar codes will be reserved for instructions to tell the Excel program what to do, e.g. I am entering a date, I am entering a product ID). Once entered the program will be in a data collection mode where I will enter an item ID and number of defects, then I will repeat this for several items until I exit the mode. I may then enter another product ID and then collect data on defects for that product. I imagine I will have some laminated sheets with barcode on - one for commands to the program and sheets for each product containing product specific defects (each defect will have an associated ID - the defect ID will use say, 8 bits). I don't know how easy it will be to handle the barcode string as a series of fields with certain bit lenghts, e.g field 1 (4 bits), field 2 (8 bits), field 3 (2 bits), etc. Can someone suggest some ideas about how to start coding this up? I did think about using Access and writing a custom application but I think Excel will do the job. Let me know if you see a major problem or have a better idea. Are there any free libraries or components I should look at?

    cheers
    Neil

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    That's a pretty vague question. I think you need to think through the system design (independent of implementation or language), and then ask for help with specific elements.

  3. #3
    Registered User
    Join Date
    01-08-2008
    Posts
    15
    Vague - yes and no, it's early days at the moment.

    There are some specific questions in there but I want to know more about what is possible and what might be recomended by more experienced users. I have an extensive background in programming (real-time sytems, using asm, C/C++, Win32/MFC, JScript/Javascript) but apart from a few macros in Excel have never used VB or VBA and I'm scratching around in what little time I have to try and get started with this little side project.

    I have some very basic questions. Can I make the system event driven? i.e. is an event generated that I can capture and process when the barcode scanner reads a string into cell or do you have to wait in a loop (not the way I would want to do it).

    What commands are available (or what method might you use) to unpack the binary coded information from the string? This is very straighforward and fast in C/C++, etc.

    I'm confident about designing the system - I haven't started yet, I can see the application growing quite a bit so a poor initial architecture could mean a lot of re-writing further down the line. I don't know enough about designing for this particular solution domain (Excel/VBA) - I could design something and then find that it's inelegant, inefficient or impossible to implement. In C I might think in terms of using seperate threads because I know I can run them or spawn other processes - at the moment I don't know exactly what is possible with VBA. Can I call functions in DLL's written in C or C++? If there are libraries I can use then I can redefine the boundaries to the system that I actually need to design. I just thought I'd shake the tree and see what fell out and then give it more thought - it's a side project I'll look at in my increasingly mythical spare time. In 6/7 weeks time I'll have several weeks to to devote to it but if I start reading a book on it then I doubt I'll get as far actuallyu starting the project. I thought I'd sound out the idea now as far as I can before deciding to commit my time to it - perhaps I should be looking at Access or writing a straight Win/C++ program or using XML/MySQL - I'm sure there are all kinds of possible ways of doing it but Excel is the first thing I've decided to look at.

    cheers
    Neil

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1