Jump to content

Phillip Brooks

Members
  • Posts

    899
  • Joined

  • Last visited

  • Days Won

    50

Posts posted by Phillip Brooks

  1. I think it is because you have the option "create table" set to true.

     

    On the first pass of the loop, it creates the table. On the second pass, the table exists and can't be overwritten.

     

    I'm guessing you've been deleting the table between runs, or are creating a new DB each time.

     

    If you need to create the table, then compare the loop iterator to zero, and use that as the input to create table.

    • Like 1
  2. I just noticed an issue with my code (see image attached) that could be related. I forgot to use a shift register to keep track of the "SQLite Connection" which keeps track of the db handle. Glancing at your code this could be a problem if the db handle changes in a 'Prepare Statement' but then isn't used on the next iteration of my loop.

     

    Is it possible that the db handle could change during a singe SQLite session? From a quick read on the sqlite website it doesn't appear to be the case. If it did change I could believe this might trickle down to errors later, but I'd assume the error would original at the library call in 'SQLite Prepare' and not the pointer to C string.

     

    I ran into a problem like this once with the NI DB Toolkit. 

     

    The false assumption is that the handle shouldn't change between iterations, so a shift register is not required, correct? WRONG!

     

    See: http://lavag.org/topic/15180-you-know-its-gonna-be-a-long-day-when/

  3. Sorry, no. I was trying to separate the HTML content of spam posts from the IP.Board content (my empty post). I was looking for any kind of clue as to how the spammers are working.

     

    Some of the spam posts are edited after submission. If the topic IDs are sequential (autonumbering), they may be able to use some form of SQL injection to stuff the database via an edited post.

    • Like 1
  4. I recall this code from the NI forums.

     

    https://decibel.ni.com/content/docs/DOC-19720

     

    I downloaded the example and noticed that the DLL call includes the path to the file user32.dll

     

    post-949-0-24604100-1378476780.png

     

    Check the locations of the shared library in your VI. It may incorrectly include the path...

     

     

     

    From the NI help: ( http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/locations_for_shared_libraries/ )

     

    To specify the location of a shared library, you can enter the name or path in the Library name or path text box of the Call Library Function dialog box. You can also wire the name or path to the path in input of the Call Library Function Node.

    caution.gifCaution Do not specify the location of a system shared library, such as kernel32.dll, by path. Because LabVIEW automatically includes by-path shared libraries in build specifications, you might distribute a system shared library to another computer inadvertently. Redistributing some shared libraries, such as kernel32.dll, might cause the target computer to crash. Therefore, always specify system shared libraries by name.

    • Like 1
  5. It looks like you are learning quickly about barcodes. I'm no expert, just a lot of (bad) experiences with 2D scanners and printers.

     

    I downloaded the .NET zxing because I was curious, and happen to like .NET solutions to LV problems. This one worked with very little effort, and I may even look at replacing some of my 2d scanners with webcams on my next test setup.

     

    It looks like the zbar lib uses a bunch of other libs to run under Windows, not sure that I would want to have all those dependancies/version problems in the future.

     

    As far as the image with insufficient quiet zone, I see that as a failure of the provider of the code to follow standards. If I was "hacking" or needed to compensate for a case that I new I would have to continue supporting (supplier/vendor wouldn't fix the barcode) then I might dig in more and look for parameters for tweaking the quiet area, but I don't need to  :P 

  6. There appears to be very little label after the barcode (left side in your image).

     

    There are quiet zone specifications for all barcodes; maybe this one does not meet spec.

     

    I opened the first image first using MS Office picture manager where I increased the contrast. I then opened it in ms-paint and deleted the dark region at the left (surface label was placed on). This effectively created a larger quiet zone and then zxing decoded the barcode...

     

    I didn't have to flip the image once I increased the quiet zone.

     

    post-949-0-42318400-1374578154.png

    • Like 1
  7. The Bitmap constructor is part of .net, not the zxing lib; look for System.Drawing.Bitmap

     

    If your webcam exports an image, you would have to convert that to a bitmap or look through the zxing API for a method that accepts an image.

     

    I played around with rotating my 1D barcodes and found that if you cannot draw a horizontal or vertical line that passes through all of the elements of the barcode, you will fail to decode. 2D QR codes worked without a problem.

     

    The decode method returns a Result object; use the properties to retrieve the result points and metadata. You might need to iterate over the metadata object to get the key/value pairs.

     

    I've attached the VI with the all of the .NET closes as pointed out in the thread. I still work in LV 8.6 and that is limited to .NET 2.0 so that's what I've posted here.

     

    Place it in the same folder as the zxing .net 2.0 DLL and it should 'just work'.

     

     

     

     

    zxing.net Read Barcode.vi

    • Like 1
  8. USB drivers can be very finicky. I purchased a USB 3.0 gigabit enet adapter and had to poke around to find the correct driver from the chip maker to get the thing to work properly.

     

    The Maplin link has a reviews section that included a link to the chip supplier. There are firmware and Windows drivers on that site. I would compare what you have for revs and try updating if you are out of date/rev.

     

    http://www.elitesilicon.com/Support.html

  9. Abstractions are like peanut butter; a layer or two is fine, but once you’re down five or six layers and nothing has fucking happened yet you’re in definite “even if I could get my mouth open to scream now, that would just let in the evil stuff

     

    Just remembered this Randall Munroe (XKCD) comic.

     

    the_general_problem.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.