Results 1 to 5 of 5

Thread: inevitably restart LabVIEW after unplugging the camera during a program run

  1. #1
    Join Date
    Dec 2015
    Posts
    6

    inevitably restart LabVIEW after unplugging the camera during a program run

    Hi,

    After an error due to ESD or the unplug of the camera, the camera didnt stop correctly (i.e. without using the "IC_clear.vi").
    If i reload the Vi program, it no longer works (camera not recognized + a bunch or errors, even if my Vi starts with the "IC_clear.vi"), and i have to inevitably close/restart LabVIEW, probably to reload in memory the ActiveX (or other IC driver/file ?).

    is there any way to reload this directly in my program, without close/reload LabVIEW (and all NI programs) ?
    maybe a call to a close/open activex, or something like that ?

    in advance, thx for your help !

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,861

    Re: inevitably restart LabVIEW after unplugging the camera during a program run

    Hello

    I am very sorry, but LabVIEW can not reload an ActiveX. As far as I know this. You may ask the LABView support about this.

    I suppose, you use a USB or FireWire camera.
    If a camera is unplugged, the Windows Device Manager will recognize this and send a message to the running programs. IC Imaging Control has the Device Lost event, which is fired in such a situation, so you can handle that.

    I guess a little bit more, because I do not know, what you are doing with the camera.
    The IC_Grab*.VIs use the IC.MemorySnapImage. If there was not time out set (IC.MemorySnapTimeout) this function will wait for inifinity for an image, even if the camera was disconnected. This will block your entire LabVIEW VI and you must restart LabVIEW to recover. So you may set a timeout at the beginning of your vi.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Dec 2015
    Posts
    6

    Re: inevitably restart LabVIEW after unplugging the camera during a program run

    Hi, thx for your reply.

    Yes, it is USB camera.

    The IC_Grab*.VIs use the IC.MemorySnapImage. If there was not time out set (IC.MemorySnapTimeout) this function will wait for inifinity for an image, even if the camera was disconnected. This will block your entire LabVIEW VI and you must restart LabVIEW to recover. So you may set a timeout at the beginning of your vi.
    right, this is exactly what happens. i'll take a look on this timeout, and also on the Device Lost event sent to IC Imaging Control.

    many thx.

  4. #4
    Join Date
    Dec 2015
    Posts
    6

    Re: inevitably restart LabVIEW after unplugging the camera during a program run

    Hi,

    i did a test.

    With IMAQdx (vision acquisition software of NI) :
    - i start the acquisition,
    - unplug the camera while the Vi is running,
    - wait in a loop for reinitialization until the re-plug,
    - then reinitialize the camera, and continue the acquisition without any crash/bug/force to close NI environment.


    The re-detection is almost immediate, and is working fine.
    Why is it impossible with the IC Imaging Control ??


    i'm confused

    Bye.

  5. #5
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,861

    Re: inevitably restart LabVIEW after unplugging the camera during a program run

    Yes, it is. IC fires the DeviceLost event, it a used device is disconnected. After that happens, you can setup a time and in the timer event, you can check, whether the camera came back and use it again.
    http://www.theimagingsource.com/supp...DeviceLost.htm
    Best regards
    Stefan
    IC Imaging Control Support

Similar Threads

  1. Windows error and restart
    By andrewts in forum Hardware and Driver
    Replies: 5
    Last Post: February 26, 2016, 14:34:25
  2. Exposure is changed in IC Capture after restart the PC.
    By naveen in forum IC Imaging Control C++ Class Library
    Replies: 6
    Last Post: April 22, 2015, 11:21:24
  3. Replies: 9
    Last Post: August 22, 2014, 08:45:34
  4. Slow restart on frame rate change
    By kdelong in forum IC Imaging Control C++ Class Library
    Replies: 4
    Last Post: November 16, 2011, 09:21:20
  5. DCAM camera with ActiveX in Labview
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: March 6, 2006, 14:34:03

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
  •