Acquire images with labview via firewire and TWAIN

Hi,
I have a camera from optronics. This camera is plugged to my computer
via a FireWire IEEE-1394 connection. The company optronics offers a
TWAIN driver for this camera: some files like TWAIN.dll and
TWAIN_32.dll. I would like to acquire images with labview and
communicate with the camera but I have no idea on how I should get
started.
The 3 main things I'd like to do are: 1) change the exposure time 2) snap images 3) see the images in labview.
I will really appreciate if someone could give me some ideas to get started...
Michael

AESulzer wrote:
Michael, From a
more general standpoint, what you'll need to do is use a Call
Library Function Node (located in the All Functions>>Advanced
palette) to call the necessary functions out of those DLLs. Before you
can do this, you'll need to know some specifics about what functions
are available in those DLLs and what parameters/outputs are associated
with them. This information is typically available in the product
manual or perhaps someone else with experience with your specific
device can speak to that. Once you know the functions necessary to
execute the desired operations, you simply configure a Call Library
Function Node for each of them and place them in your LabVIEW code.
Just
saw this and want to clarify on this. This is a total no-go! The Twain
interface is a very old technology from the days when Windows was a
cooperative multitasking environment without real tasks or threads. In
order for Twain to allow for some sort of multitasked integration into
an application it requires you to integrate the Twain handling into the
message loop of your application. As you do not have direct control
over the source code LabVIEW is written from, this is a very tedious
operation, with Windows message hooks and such, lots and lots of
semaphore protection to avoid race conditions etc. etc.
There is simply no way that you can do anything even remotely workable
just by using the Call Library Node. You will need a (rather complex)
external shared library that goes in between Twain and LabVIEW and
takes care of all the subtleties. I know for sure because I wrote such
a beast in the past.
Now there is a Toolkit from the French Alliance member Alliance Vision http://www.alliancevision.com/us/index.html that
does this. If you need Twain I would definitely go for this. My own
library is only to the point of what I had needed for a particular
project, (meaning it supports two specific scanners without issues) and
without any documentation for external users and I couldn't give it
away for free either.
Just want to warn you but there is a good chance that the Alliance
Vision Twain Toolkit does not really give you full programmatic control
of all the parameters of non-scanner devices and you won't be able to
avoid letting the Twain driver show the device specific configuration
dialog to manipulate specific settings.
In my own library I have low level functions to directly manipulate
Twain attributes but in order to be able to use that you would need a
through knowledge of the Twain specifications down to the API. That
together with the difficulties to support other devices I don't have
available, made us decide to not try to sell this Toolkit yet.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Printing labels (barcode, datamatrix code, ...) with LabView via Codesoft

    Hello together,
    could anyone post a sample vi which enables printing labels (barcodes, datamatrix code, ...) with LabView
    via the Teklynx Codesoft Runtime Software? There are no sample programs from Teklynx for LabView.
    Many Thanks for your help, Thomas.
    Message Edited by maximint on 01-04-2007 10:04 AM

    maximint wrote:
    Hi JLS,
    thanks for the answer. I agree with you that closing the references is the best und most stable solution. But it is really slow. I made an exe but this is also slow.
    But apart from this, the VI is running well, even with a handing over of variables. I guess this is one of the first VIs in the net which combines LV with
    Codesoft from Teklynx.
    Thanks, Thomas.
    PS: I made a wrong click on the rating of your last post. Sorry. I guess I rated it too bad.
    Well, this is easily solved with an intelligent global buffer VI or as they are also often called a LabVIEw 2 style global. I use them quite often for all kinds of reasons including to avoid globals in my programs almost 100% but this is one of the cases where they are also very handy.
    Basically you write a VI that has a while loop, and a case structure inside. The while loop normally only executes once. One or more uninitialized shift registers store different values that can be reused on each call to that VI. The case selector is wired to an enum (I make them always strict typedefed) on the front panel and that one is connected to the connector pane of the VI.
    Make the enum have init, print, close items and in the respective case frame do the opening of the refnum in the init case and anything else you need to do once at initialization time storing the refnum to the right shift register terminal. In the close case do everything to close done the software and then close the refnum coming from the right shift register terminal itself passing a Not A Refnum to the right shift register terminal. The print case uses the refnum from the right shift register terminal too, does all that is necessary to do printing and then stores the refnum back to the right shift register terminal. You now have an intelligent manager function for your interface to the printing software.
    The init case is called somewhere during initialization of your application while the close case is called somwehre when you close your application. A variant is to combine the init and print case but forst test for the refnum to be Not A Refnum (comparison palette) and in that case do the initialization first, otherwise just do the printing. The advantage with this is that the Codesoft interface is only initialized if you really need it.
    There is one caveat for this if you use dynamic top level VIs to implement for instance test steps or deamon like operation. LabVIEW remembers the top level VI under whom a refnum was opened and automatically closes refnums when that top level VI goes idle (stops running). So you would need to make sure that the initialization is done in the main hierarchy that is guaranteed to run for the entire time that your interface is required.
    I have included a small archive containing an API for Codesoft 7 that also supports variable query and substitution in templates. It is an older version of something I'm currently using and not very well tested as is, but the newer version is a lot more involved and complicated and not suited to be put here. I also included another archive showing a version of such an intelligent manager buffer function using that API.
    Rolf Kalbermatter

  • I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How can I access files that I moved from an older MacBook Pro to a newer one via Firewire and Migration assistant.  The files show up on the new MacBook but cannot be opened.  Thanks!

    How can I access files that I moved from an older MacBook Pro to a newer one via Firewire and Migration assistant?  The files show up on the new MacBook but cannot be opened.  Thanks!

    Get info then check permissions then add your curent user name (it was probably different on old Mac) and give your username full read/write permissions.

  • Can i back up one G5 via firewire and another via USB to the same drive

    I have an ibook and a G5., I have a 500 gb lacie external drive.
    Can i back up both via time machine simultaneously, one via firewire and one via USB?

    Ross Dehovitz1 wrote:
    I have an ibook and a G5., I have a 500 gb lacie external drive.
    Can i back up both via time machine simultaneously, one via firewire and one via USB?
    No, you can not directly attach one drive to two computers at the same time, period. In particular, you can't use it for Time machine this way.

  • Problems with LabVIEW 7.1 and lock-in amplifier Stanford SR530?

    Does has anybody had problems with LabVIEW 7.1 and the instrument driver for the lock-in amplifier Stanford SR530?
    With LabVIEW 6 there are no problems at all, but with LabVIEW 7.1 it is impossible to communicate with the instrument.

    amr_attia wrote: (Private message, no need to private message)
     My problem is to get the data out from the divice x and y readings . Can you help me
    Here is the code and snippet. I had it from before. It reads Channel 1 and Channel 2 from the SR530, that is whatever the display is for Channel 1 & 2. You set the display manually or programmatically, I let you figure that part out.
    Cheers,
    mcduff

  • How can I blur a image with two variables : degree and radius?

    how can I blur a image with two variables : degree and radius?
    a lot of thanks !

    What are the values of these variables supposed to represent?

  • Displaying fullscreen images from camera via firewire

    I have clients that want to be able to see the image I take with my camera instantly after I take it. So I hook my camera to my MacBook Pro via firewire, take the shot at the camera and then I WANT the image to appear full screen or close to full screen size on my laptop. I had one poster on another forum say that Aperture can do this. I can't figure out how. Any ideas?

    You can absolutely do this - although depending on your camera it might more likely be via USB. What you're describing is tethered shooting. I do it all the time with my D300 and it works perfectly. You can set yourself up in fullscreen mode and watch your pictures come up within a few seconds of shooting.
    If your camera is supported you simply plug it in (via usb or firewire - usually usb), select File>Tether>Start Session and you're ready.
    When I'm shooting still life, I like to fire a shot or two, do a few quick adjustments to get the look I'm after and stamp the keepers as I go along and refine the setup. It's a great way to get a real feel for what you're attempting.
    There's a list of supported cameras on the Aperture site- I don't have the link handy though.
    Good luck!

  • How to acquire images with a Sony dsc

    Hi, I would like to know if there is a method to interface or connect a consumer digital camera (Sony dsc- s650) to labview, what I'm trying to do is control the camera in order to acquire images whit it, I have read some stuff about .icd files but i havent been able to find more information about it, this is a school project i need to build a machien vision app but i'm very limited with hardware so fas this is the only camera i have, thanks.

    Hello mjasso,
    If you cannot buy NI hardware to
    interface with a camera, you have three options: firewire, GigE or USB
    cameras. From a datasheet I found on the web, the Sony dsc-s650 has a
    USB interface. The following knowledgebase article explains which USB
    cameras are supported:
    http://digital.ni.com/public.nsf/allkb/89E33B77CFE244E986256F8E004E0F13
    . You will need the NI-IMAQ for USB driver if the camera has a
    DirectShow filter. You will probably have to contact Sony to verify
    this information.  
     Please refer to the following webpage
    to see the requirements for the IMAQ for USB driver:
    http://sine.ni.com/devzone/cda/epd/p/id/5030 . I hope this helps. 
    Vivek Nath
    National Instruments
    Applications Engineer
    Machine Vision

  • How to acquire images on labview 6.0 using matrox meteor card acquisition?

    i've a matrox meteor card acquisition , i want to display images on labview interface.

    Abdel,
    You can use third-party data acquisition boards with LabVIEW; you just cannot configure such boards using MAX. MAX support is just one of the integration advantages that you get when you use NI hardware and software in conjunction.
    LabVIEW can communicate with 3rd party hardware using the Call Library function found in the Advanced palette under the Functions Palette. If your hardware is provided with a driver-level DLL then LabVIEW can communicate with the hardware. However, you will need complete documentation of the DLL in order for you to create your own interface for the 3rd party hardware.
    Another option would be if the manufacturer of the hardware provided LabVIEW VIs that controls their hardware. You will not be able to use the National Inst
    ruments Data Acquisition (DAQ) VIs because those VIs use the NI-DAQ DLL, which is our driver-level software for our DAQ boards. Other companies use their own driver-level software to control their own hardware. Only National Instruments hardware uses the NI-DAQ driver which allows you to use the LabVIEW DAQ VIs.
    Zvezdana S.
    National Instruments

  • Acquire Image with two light sources

    Hello
    I am using a NI 1772 camera with Vision Builder AI. I have an acquire image function which has an external trigger. The lighting fixture is to an advanced illumination pulsar 320 strobe control and I have two different lighting sources; Axial Diffuse Illuminator DL37100 and DL097. My final goal is to acquire crisp images of caps. The caps are coloured from white to black, where the DL37100 picks out the Dark colour caps and the DL097 can pick out the white caps. I have a program that automatically adjusts the exposure time based on the colour.
    Is there a way I can trigger the acquire image, and have the inspection take two images of a cap and determine which lighting source to use?

    Instead of a dedicated circuit/hardware for this you could try using the on-board pulse generation functionality to do this. You could do something where one pulse generator is triggered by your outside source, and it generates a continuous pulse train of your frame rate. You'd then pass that output to an input that is triggering another pulse generator with a re-armed pulse with a delay of 1 edge count. The output of this would then effectively be for every other image. You'd then combine this with a single-shot, 2-image acquisition that is triggered off that intermediate pulse train. You'd have to make sure you stop the pulse train between each single-shot acquisition. Keep in mind that loop-back between output and input requires a pull-up resistor.
    Note: I haven't tried this Rube Goldberg mechanism described above myself, but it seems like it could work
    Eric

  • Save Image to Disk via CWIMAQ and CWIMAQVision in VB

    Hi, I use NI 1428 CameraLink framegrabber and notice
    a bug with saving image to disk via CWIMAQ object. It
    adds 8 columns black pixels to the end of each image.
    Savimg image to disk via CWIMAQVision is fine.
    Has anybody experienced the same thing ?
    Also, are the CWIMAQ buffers thread safe ?
    I use them as a ring buffer, so multiple
    threads may access the same image buffer at the
    same time. I have used my own mutex to safe guard
    each access. But I wonder if the thread safe is
    built in.

    I have never experienced the 8 black pixels using CWIMAQ save. However, I would use the CWIMAQVision.Write function anyway - this way you also get the vision information.
    Here is a document that discusses multi-threading in IMAQ:
    http://digital.ni.com/public.nsf/websearch/07550C5783B42B16862567DF0076EBF3
    General Multi-threading info:
    http://digital.ni.com/public.nsf/websearch/6eccbaa87476eb22862568950071ccd6
    Hope this helps-
    Julie S.

  • Simultaneous import of video via firewire and audio via in-line audio port

    I have a converter that takes the S-video and audio input from my DVR then converts both to DV format, and then outputs via firewire. I hook the firewire up to my G5, open iMovieHD, and the application recognizes that as a camera and imports wonderfully.
    Well, the audio comes through with a MAJOR buzz or hum. It's probably the converter, but the buzz/hum is not enjoyable.
    So, I removed the audio from the converter, and the video converts wonderfully in iMovie without the audio. I have the audio coming in through my audio line-in.
    I start to import my video, and iMovie starts recording the video. But I want to record the line-in audio at the same time. But when I switch to audio to turn on the input from the line-in, the video stops capturing.
    When I start to capture audio first, then switch to capture video, then the audio stops capturing.
    Is there any way that I can capture the video via firewire for one "track", and my line-in audio for the other "track", and have them play simultaneously in iMovie during capture??
    Any help would be appreciated. thanks Adam

    hey there badkitty 42,
    i don't think you can do that. it sounds like your issue is electrical. try turning the plug around on each piece of gear in the chain & listen for the buzz. if it's not heard you've found the cause of your ground loop. you can also pick up some of the 3-prong orange or grey electrical adapters from Lowe's or Home Depot to see if you can "lift the ground" to get rid of the buzz. i'd try one on the convertor 1st. one last thing, do you have any flourescent lights in use on the same circuit or in proximity to where you're doing your transcoding? these are notorious for inducing 60Hz hum in audio & video gear.
    good luck.

  • External HDs not showing up on computer via firewire and usb

    All external hds do not show up on the computer via firewire or usb. I must have perfomed some updates with my hardware plugged in. Does anybody know how to get this fixed?

    Thought you could use this info about getting FireWire to work!
    First, you should always Repair Permissions in Disk Utility before and after any update; I would do that now. If you installed your update with FireWire plugged in, your Mac may not recognize it anymore.
    Try resetting your FireWire ports by disconnecting all FW devices, shut down your Mac and unplug it from AC power (wall socket) for 30 minutes. plug it back in and try FW.
    If that did'nt work, download the combo update from this site (yours may be corrupt), not Software Update, disconnect all firewire + USB devices except keyboard + mouse, Repair Permissions, re-install update, Repair Permissions again + try. Yours is the 10.3.9 Combo update. Others reading, download the Combo that applies to your system.
    If that still did'nt get it Zap the PRAM. While restarting Mac hold down the following key combo Command-Option-P-R. Keep holding those keys down till you hear the second start-up chime, then release.
    For those of you with Macs that are not PowerBooks or iBooks, a bad internal battery can cause FireWire to not be recognized, so make sure it's good!
    Good Luck!
    Cheers!
    DALE

  • Windows 7 with labview 8.5 and NI-8451

    Hello,
    I am using LabVIEW 8.5 with NI-8451 device on Windows 7. I installed 1.1 driver for NI-8451, but I am unnable to access any subVI connected with NI-8451.  Can you advise?
    Thank you.

    Hi miso2562,
    The issue is most likely compatibility between the drivers, LabVIEW, and the OS. LabVIEW 8.5 is not supported on Windows 7 (only up to Vista), and NI-845X 1.1 is not supported on Windows 7 either (only up to XP). Also, NI-845X 1.1 does not support LabVIEW 8.5 either (only up to 8.2).
    Ideally, if you use Windows 7 you should have LabVIEW 2009 SP1 or newer and NI-845X 2.1 or newer (1.1.4 could work as well). If you can move to XP, LabVIEW 8.5 and NI-845X 1.1.1 should work.
    References for compatibility:
    http://digital.ni.com/public.nsf/allkb/B972242574D4BB99862575A7007520CB 
    http://download.ni.com/support/softlib//i2c_spi/ni-845x/1.1/readme.htm
    As for your main question "unable to access any subVI connected with NI-8451", do you mean they do not show on the function pallete?
    - FCTesting

Maybe you are looking for