MVTec Software GmbH
  Building Vision For Business
Follow us on YouTube  Subscribe our RSS feed
Halcon

HALCON Frame Grabber Interface for Leutron Boards

This document provides additional information about the HALCON interface HFGLeutron.dll (or HFGLeutron.so, respectively) for the Leutron PicPort, PicPortPro, and PicProdigy frame grabber boards. Registered customers can download the latest revision of this interface from the Support Area of the Leutron WWW server.


Details of acquisition mode

Asynchronous reset with shutter (exposure) control

This mode is enabled via the HALCON operator set_framegrabber_param (FGHandle, 'acquisition_mode', 'async_reset').

General description    Additional parameters    HALCON example    Example for camera settings    Camera types


General description

This acquisition mode is mainly used for fast moving objects and its behavior can be compared with a traditional consumer camera. At any time (asynchron) the user may trigger (event) a snap shot with a preset exposure time (shutter). The flash light trigger is optional but can be enabled if necessary.


On an event (either from extern or by software) the light sensitive area is illuminated until the aperture has closed (shutter period done) again. After this, the camera starts reading out the image data on the video output.

The described acquisition mode is not a standard video timing. Each camera type needs its own set of control signals on different Hirose pins. Further on the appropriate switch setting and additional modifications may be needed. For details please refer to the program camera editor or to the LV-SDS manual of Leutron Vision, chapter Camera selection guide for asynchronous reset.


Additional parameters

The acquisition mode 'async_reset' accepts additional parameter names and parameter values, separated by a ':' from the previous parameter. If you omit parameter values, default values will be used. The default values are available with a call to the HALCON operator get_framegrabber_param(FGHandle, 'acquisition_mode', ac_mode_string).

:ShutterType Mode_3 Depending on the camera type, different ranges of minimal and maximal shutter times are possible. Further on, the shutter time may be programmable or preselected by camera switches. Not every camera type offers different shutter types. If not needed, this parameter can be omitted or set :ShutterType default.
Detail information about different shutter types can be obtained in the Leutron Vision camera editor program. First select the desired camera and then activate the Async Reset dialog box.

The dialog box may offer more than one shutter type (mentioned as Mode X) of asynchronous reset. Related information like switch settings about each Mode is available by pressing the info button. 
Important: In the camera editor, the different settings are mentioned as Mode 0, Mode 1... or if you experienced some programming with Daisy you had to use the expressions ARST_Mode_1, however in Halcons set_framegrabber_param(...) you have to use the expression ShutterType Mode_X where X stays for the desired Mode number. (Other expressions like XC78500ST_HighSpeed from older scripts are still compatible, however should not be used for new projects).
:AR_ShutterTime 1000 The desired shutter time. If the camera has no programmable shutter time, this value must match the selected shutter time (by switches) of the camera. In the example above the shutter time is programmable from 90 - 1150 usec.
:AR_FlashEnable 1 0: flash output disabled.
1: flash output enabled.
:AR_CamRstDelay 1 Delay in video lines after the trigger and the camera reset.
:UpperLevel 240:LowerLevel 0 PicPort Monochrome only. If used with PicPort Color boards an error is displayed.  The two parameters define the upper and lower level of the on-board ADCs. Their values must be in the range 0 .. 255.
:Brightness PicPort Color only. If used with PicPort Monochrome boards an error is displayed.   The brightness can be adjusted in 256 steps from ~V128 to +127, corresponding to -50% to +50% of the full luma range.
:Contrast PicPort Color only. If used with PicPort Monochrome boards an error is displayed.  The contrast can be adjusted in 512 steps from 0 to 511, corresponding to 0% to 236% of the original signal.




HALCON example

HALCON code example for asynchronous reset acquisition mode and external triggering together with a camera Sony XC7500 (remark: the camera has to be modified in order to guarantee single Hirose cable operation).
 dev_close_window ()
 dev_open_window (0, 0, 640, 480, 'black', WindowHandle)
 close_all_framegrabbers ()
 open_framegrabber ('Leutron', 1, 1, 0, 0, 0, 0, 'default', 8, 'default', -1, 'true', 'Sony_XC7500_2I', 'Picport Stereo H4-D:1', 1, 1, FGHandle)
 set_framegrabber_param (FGHandle, 'acquisition_mode', 'async_reset:ShutterType Mode_3:AR_ShutterTime 1000:AR_FlashEnable 1:AR_CamRstDelay 1')
 get_framegrabber_param (FGHandle, 'acquisition_mode', ac_mode_string)
 while (1)
     dev_set_window (WindowHandle)
     grab_image (Image, FGHandle)
     dev_display (Image)
 endwhile
 close_framegrabber (FGHandle)

Example for camera settings

Example of switch settings and camera modifications for SonyXC-7500/8500 used with set_framegrabber_param('acquisition_mode','async_reset:ShutterType XC78500ST_HighSpeed'):



Camera types

When this description was written, the following camera types were available for asynchronous reset when connected over a Hirose cable to a PicPort Mono/Stereo board:

Leutron Vision 



Leutron_LV75_Slave
Leutron_LV75ext_Slave
Leutron_LV75ni_Slave
Leutron_LV75niext_Slave
Leutron_LV75ni2_Slave
Leutron_LV75ni2ext_Slave
Leutron_LV1000_Slave
Leutron_LV7500ni_Slave
Leutron_LV7500ni_PS_Slave
Leutron_LV7500_Slave
Leutron_LV7500_PS_Slave
Leutron_LV8500ni_Slave
Leutron_LV8500ni_PS_Slave
Leutron_LV8500_Slave
Leutron_LV8500_PS_Slave
 

Hitachi



Hitachi_KPF3
Hitachi_KPF3_Slave
Hitachi_KPF3ni
Hitachi_KPF3ni_Slave
Hitachi_KPF110_88
Hitachi_KPF110_10
Hitachi_KPF100
Hitachi_KPF100_Slave
Hitachi_KPF100_8
Hitachi_KPF100_10
 

JAI



JAI_M50E_Slave
JAI_M50Eni2_Slave
JAI_M1_Slave
JAI_M10E_Slave
JAI_M10Eni_Slave
JAI_M10Cni_Slave
JAI_M10C_Slave
 

NEC



NEC_TI400Ani_Slave
NEC_TI400A_Slave
NEC_TI400Ani60_Slave
NEC_TI1250A_Slave
 

Sony



Sony_XC55_1N_Slave
Sony_XC8500_2I
Sony_XC7500_2I
 

Teli



Teli_CS3910_10
Teli_CS3910ds_10
Teli_CS3910
Teli_CS3910ds
Teli_CS8530ni_Slave
Teli_CS853001ni_Slave
Teli_CS3700SC_AR
Teli_CS3700SC
 

Toshiba



Toshiba_IK542_30N_Slave
Toshiba_IK542_60N_Slave
 

© Copyright 2013, MVTec Software GmbH, corporate/legal/privacy information