Jordan Kuehn Posted November 25, 2013 Report Share Posted November 25, 2013 Yeah, there is a topic that is a few years old. Didn't want to revive it and it was marginally helpful. What is the best solution? Right now, I'm looking at TWAIN Commander and just calling it from the command line. I can justify this if it saves me some significant development time, though I don't really care to pay other people for things I can develop myself. Essentially, I just want to tell a scanner to scan and give it some parameters such as where to put the images in what format. I care about resolution and some other things, but if I can set default values in a windows interface then that is great with me. They won't change. From people who have worked with this, can I develop my own C++ code fairly quickly to accomplish what I want or am I really better off paying someone $500 for a tool? Surely there are some free .NET or ActiveX libraries around? I wouldn't mind working with those, I just haven't found them. Quote Link to comment
Jordan Kuehn Posted November 26, 2013 Author Report Share Posted November 26, 2013 To answer my own question, the software that was provided by Fujitsu, ScandALL Pro, can be called silently from the command line with a preconfigured profile. Works for me. Here's info if anyone else is interested. http://www.fujitsu.com/emea/products/scanners/faqs/48.html Quote Link to comment
Rolf Kalbermatter Posted December 2, 2013 Report Share Posted December 2, 2013 Yeah, there is a topic that is a few years old. Didn't want to revive it and it was marginally helpful. What is the best solution? Right now, I'm looking at TWAIN Commander and just calling it from the command line. I can justify this if it saves me some significant development time, though I don't really care to pay other people for things I can develop myself. Essentially, I just want to tell a scanner to scan and give it some parameters such as where to put the images in what format. I care about resolution and some other things, but if I can set default values in a windows interface then that is great with me. They won't change. From people who have worked with this, can I develop my own C++ code fairly quickly to accomplish what I want or am I really better off paying someone $500 for a tool? Surely there are some free .NET or ActiveX libraries around? I wouldn't mind working with those, I just haven't found them. To add to your original question: No the Twain API is not trivial to call from an environment like LabVIEW. It is based on a very old Windows 3.0 paradigma that communicates through the applications windows event queue with the client and this windows event queue is pretty well hidden from the normal LabVIEW level where you normally operate inside VIs. For a big part this is because each LabVIEW platform has a fundamentally different window manager interface that had to be handled in LabVIEW in a consistent manner for all platforms. So this sits deep in the guts of LabVIEW and is only with some low level Windows API magic accessible in a way that allows to handle the Twain messages properly. I developed in the past such an interface for some internal projects and it worked, but is still quite a stretch from something that could be released to the greater public without risking disappointment by many developers who would go about using it. It worked for me because I knew how to call it (and what not to try to do) and because I could go into the C code and debug the issues if any surfaced. But it was a very painful debugging experience since if you try to single step into those parts of window event handling you are generally creating all kinds of hard deadlocks and race conditions on both the standard Windows event handling level as the more specialized LabVIEW windows manager layer. Quote Link to comment
Jordan Kuehn Posted December 3, 2013 Author Report Share Posted December 3, 2013 Thanks for the input Rolf. I'm glad I don't need to develop this myself after everything I've found and hearing about your experiences. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.