PDA

View Full Version : two exposure with one trigger VB



ciaravola
June 18, 2007, 22:50:38
Compiler: VB6
Camera: DMK21bf04
Driver: IC Imaging control ("DMx 21BF04")
Serial Number: 0x1202887FF1
Driver: Device driver for The Imaging Source FireWire cameras ver. 4.0.0.86
-------------------------------------------------------------
Please note:I have tested starting with
ICImagingControl1.DeviceTrigger = False
and
ICImagingControl1.DeviceTrigger = True
---------------------------------------------------
1) In ICImagingControl1_ImageAvailable (after calling ICImagingControl1.LiveCaptureContinuous = True)
I have inserted
ICImagingControl1.LiveStop '<---- hang: cannot stop visual basic!!!
ICImagingControl1.DeviceTrigger = False
ICImagingControl1.LiveCaptureContinuous = True
ICImagingControl1.LiveStart
but the computer hang....


2) If in the ICImagingControl1_OverlayUpdate I insert the instruction
ICImagingControl1.DeviceTrigger = False
an error appear: "This function cannot be called when livemode is active"
2a) If in the ICImagingControl1_OverlayUpdate I insert the instruction
ICImagingControl1.LiveStop
the program hang (is very very slow)

Some help?

Stefan Geissler
June 19, 2007, 08:34:13
Hi,


1) In ICImagingControl1_ImageAvailable (after calling ICImagingControl1.LiveCaptureContinuous = True)
I have inserted
ICImagingControl1.LiveStop '<---- hang: cannot stop visual basic!!!

Never stop the live video in an ImageAvailble event! This can not work, because you would try to suicide the grabbing thread. That is why your application hangs. It would be a better idea to start a timer in the ImageAvailable event. In the timer sub you can stop the live video. Please refer to the "Fullscreen" sample, that does nearly the same: http://www.imagingcontrol.com/library/vb6/section/live-display/example/full-screen-video/



2) If in the ICImagingControl1_OverlayUpdate I insert the instruction
ICImagingControl1.DeviceTrigger = False
an error appear: "This function cannot be called when livemode is active"

As the error message says: The trigger can not be enabled or disabled while the live video runs. If the OverlayUpdate event has been called, the live video is definitely running. You must stop the live video before your change the state of the external trigger.


2a) If in the ICImagingControl1_OverlayUpdate I insert the instruction
ICImagingControl1.LiveStop
the program hang (is very very slow)
Same as point 1).