MVTec Software GmbH
  Building Vision For Business
Halcon

HALCON 7.0 Frame Grabber Interface for Imagenation PXR800 Boards

This page provides the documentation of the HALCON frame grabber interface HFGPxr.dll for the PXR800 frame grabber boards from CyberOptics. Registered customers can download the latest revision of this interface from the MVTec WWW server.

Revision: 2.1

System Requirements

  • Intel compatible PC with Windows NT 4.0 (Service Pack 4), Windows 2000 or Windows XP.
  • Successfully installed Imagenation pxr800.sys (or pxr800nt.sys) driver (version 1.2 or higher).
  • Imagenation DLLs pxr800.dll (version 1.2 or higher) and pxrframe.dll (version 1.1 or higher).
    These DLLs must be within your search path %PATH%. If you do not have these DLLs, please contact CyberOptics or the vendor from which you bought the frame grabber board.
  • HALCON frame grabber interface HFGPxr.dll or parHFGPxr.dll, respectively. If you have properly installed the interface, both DLLs should reside in bin\i586-nt4 within the HALCON base directory %HALCONROOT% you have chosen during the installation of HALCON.

Features

  • Multiple frame grabber boards with multiple cameras.
  • Synchronous and asynchronous grabbing.
  • External trigger.
  • Support of standard and progressive scan cameras.
  • LUTs.
  • Cropping of image parts.
  • Software control of grabbing timeout.
  • Software control of gain and video offset.
  • Software control of trigger parameters.
  • Software control of the digital input and output lines.
  • Field grabbing.
  • Support of the PXR800 real-time control engine.

Limitations

  • grab_region and grab_region_async not supported.

Description

Parameters for open_framegrabber():

Name 'PXR' The name of the HALCON frame grabber interface.
HorizontalResolution 1, width The desired image resolution. Use '1' for full resolution or the corresponding absolute value like 640 (NTSC) or 768 (PAL). Default: 1.
VerticalResolution 1, 2, height The desired image resolution. Use '1' for full resolution, '2' for half resolution (by grabbing only fields instead of frames!), or the corresponding absolute values like 484 (NTSC) or 574 (PAL). Default: 1.
ImageWidth 0, width The width of the desired image part ('0' stands for the complete image). Default: 0.
ImageHeight 0, height The height of the desired image part ('0' stands for the complete image). Default: 0.
StartRow 0, row The row coordinate of the upper left pixel within the desired image part ('0' obviously results in delivering the complete image). Default: 0.
StartColumn 0, column The column coordinate of the upper left pixel within the desired image part ('0' obviously results in delivering the complete image). Default: 0.
Field 'first', 'second', 'next', 'interlaced', 'progressive' Specify with which field to start the next grab. Use 'progressive' for progressive scan cameras only. Default: 'interlaced'.
BitsPerChannel 8 Fixed (PXR800 boards are 8 bits grayscale only!). Default: 8.
ColorSpace 'gray' Fixed (PXR800 boards are 8 bits grayscale only!). Default: 'gray'.
Gain --- Ignored. See the parameters 'gain_range' and 'fine_gain' below for setting your desired gain values.
ExternalTrigger 'true', 'false' Activate/deactivate external triggering. Default: 'false'.
CameraType 'ntsc', 'pal', 'auto' Specify the video signal: 'ntsc', 'pal', or 'auto'. The latter will do an automatic analysis of the signal. Default: 'auto'.
Device '-1', 'board' The number of the frame grabber board (passed as a string!) or '-1' for accesing the next available grabber. Default: '-1'.
Port 0, 1, 2, 3 The desired input port. Default: 0.
LineIn --- Ignored.

Parameters for set_framegrabber_param():

'continuous_grabbing' 'enable', 'disable' If the continuous mode is enabled, the frame grabber will continuously capture video data into the onboard buffer memory. In this mode you can achieve full frame rate (for more details see the PXR800 User's Guide). Default: 'disable'.
'digital_output' 0 ... 15 Change immediately the state of all four general purpose output lines (the value corresponds to the bits 3:0 of the GPI/O lines).
'drive_mode' 'disabled', 'hd_vd', 'hd_vexp0' Change the vertical and horizontal drive mode (for more details see the PXR800 User's Guide).
'external_trigger' 'true', 'false' Activate/deactivate external triggering.
'fine_gain' 0, 1, ... 255 Sets the desired fine gain value (a fine gain of 255 is approx. twice normal contrast). Default: 128.
'gain_range' 0, 1 If the gain range is 0, the input video is assumed to be normal 1 Volt peak to peak. If the gain range is 1, the input video is amplified by a factor of two before being digitized. This allows full grayscale accuracy for signals of approx. 1/2 Volt peak to peak. Default: 0.
'grab_at_vsync_start' 'true', 'false' Specify whether the grabbed image is qualified at the start of the next VSync. If this parameter is set to 'false' the image is qualified at the end of the next Vsync. Default: 'false'.
'grab_timeout' timeout Number of milliseconds (integer) after which a pending grabbing command is aborted. Note that the interface measures the time interval between the start of the grabbing command and the delivery of the image in the next grab_image or grab_image_async operator. It cannot take into account the time when an asynchronous grab was actually finished (which can be long before the image is accessed with the next grabbing command). Thus, timeout settings shorter than the time passing between consecutive grabbing calls might will lead to false timeout alarms when grabbing asynchronously. Default: 5000.
'interlace_mode' 'interlaced', 'progressive' Change the format the images will be arriving from the camera (for more details see the PXR800 User's Guide).
'nyquist_filter' 'enable', 'disable' Activate/deactivate the nyquist filter, which filters out the high-frequency component of the video signal (for more details see the PXR800 User's Guide). Default: 'enable'.
'pixel_clock' 'ntsc_square', 'ccir_square', 'ntsc_rectangle', 'ccir_rectangle', 'ext', 'ext_inverted' Change the pixel clock setting (for more details see the PXR800 User's Guide).
'rtc_start' [esEvent, reRepeat, svImageStart] Specify when the RTC sequences are to start and how often they are to be repeated. Note that this parameter requires a tuple with three integer values! For more details and the range of valid values see the PXR800 User's Guide.
'rtc_timing' [val0...val44] Specify the RTC values of the PXR800 grabber. Note that this parameter requires a tuple with 45 integer values:
val0
val1
val2
...
val9
val10
val11
val12
...
val19
val20
val21
val22
...
val29
val30
val31
val32
...
val39
val40
val41
val42
val43
val44
rt.pExposures[0].plStartLevel
rt.pExposures[0].plDefaultLevel
rt.pExposures[0].pdwTick[0]
...
rt.pExposures[0].pdwTick[7]
rt.pExposures[1].plStartLevel
rt.pExposures[1].plDefaultLevel
rt.pExposures[1].pdwTick[0]
...
rt.pExposures[1].pdwTick[7]
rt.pExposures[2].plStartLevel
rt.pExposures[2].plDefaultLevel
rt.pExposures[2].pdwTick[0]
...
rt.pExposures[2].pdwTick[7]
rt.pExposures[3].plStartLevel
rt.pExposures[3].plDefaultLevel
rt.pExposures[3].pdwTick[0]
...
rt.pExposures[3].pdwTick[7]
rt.ceCameraEvent.dwDelay
rt.ceCameraEvent.stSwitchType
rt.ceCameraEvent.icCamera
rt.ceCameraEvent.dwCameraMask
dwMask
For more details and the range of valid values see the PXR800 User's Guide.
'skip_vsyncs' num Specify the number of vertical sync pulses to skip before capturing the image (for more details see the PXR800 User's Guide). Default: 0.
'start_async_after_grab_async' 'enable', 'disable' By default, at the end of grab_image_async a new asynchronous grab command is automatically given to the frame grabber board. If the parameter 'start_async_after_grab_async' is set to 'disable' this new grab command is omitted. This might be useful especially for switching between several connected cameras. Default: 'enable'.
'switch_to_trigger' 'true', 'false' Specify whether the grabber switches to the camera that matches the trigger (for more details see the PXR800 User's Guide). Default: 'false'.
'sync_mode' 'hs_vs', 'hc_vs', 'hc_vc', 'hline' Specify the source of the video sync signals (for more details see the PXR800 User's Guide). Default: 'false'.
'sync_polarity' [poVSync, poHSync] Specify the expected polarity for incoming sync signals. Note that this parameter requires a tuple with two string values which must be either set each to 'positive' or 'negative' (for more details see the PXR800 User's Guide).
'termination' '75ohm', 'high_impedance' Specify the type of termination in use for the connected camera (for more details see the PXR800 User's Guide). Default: '75ohm'.
'transfer_mode' 'incremental', 'burst' Sets the transfer mode used to transfer the images from the onboard video buffer to system memory (for more details see the PXR800 User's Guide).
'trigger_mask' mask Specify the desired trigger lines by changing the bits 0..3 in the trigger mask (for more details see the PXR800 User's Guide). Note that the specification of the trigger mask affects all cameras that are connected to this board, i.e., all cameras with the same value for Device during open_framegrabber! Default: 15.
'trigger_signal' 'rising', 'falling', 'low', 'high' Specify the desired type of trigger event for external triggering. Note that the same trigger event is used for all connected cameras (for more details see the PXR800 User's Guide). Default: 'rising'.
'video_offset' -128 ... 127 This value changes the video offset, which is digitally added to the pixel data before fine gain is applied (for more details see the PXR800 User's Guide). Default: 0.
'volatile' 'enable', 'disable' In the volatile mode the two frame grabber interface buffers are used directly to store HALCON images. This is the fastest mode avoiding to copy raw images in memory. However, be aware that older images are overwritten again and again as a side-effect. Thus, you can only process one image while you grab another image. Older images are invalid! Default: 'disable'.
'do_reset_board' 'true' This action parameter resets the PXR800 board. Note that this parameter affects all cameras that are connected to this board, i.e., all cameras with the same value for Device during open_framegrabber!
'do_reset_rtc' 'wait', 'queued', 'now' This action parameter stops any currently executing RTC sequences (for more details see the PXR800 User's Guide).

Parameters for get_framegrabber_param():

Additional parameters supported by get_framegrabber_param only. Note that all parameters supported by set_framegrabber_param except the ones with prefix 'do_' can also be accessed by get_framegrabber_param.

'digital_input' 0 ... 15 Read the state of all four general purpose input lines (the value corresponds to the bits 7:4 of the GPI/O lines).
'pxr_revision' sw/hw/fw The revision numbers of the frame grabber hardware and driver as software/hardware/firmware.
'revision' revision The revision number of the HALCON PXR frame grabber interface.

Lookup Tables:

Lookup tables can be manipulated using the operators set_framegrabber_lut and get_framegrabber_lut. The PXR boards use 256 entries per LUT. It is possible to change only a part of a LUT with set_framegrabber_lut: To do this, entries at the beginning of the LUT that should not be changed must be set to -1.

Release Notes

  • Revision 2.1 (Jan 10, 2005):
    • New parameter 'start_async_after_grab_async'.
    • New parameter 'do_reset_board' to allow resetting the PXR800 board.
    • Clarification in the description of the parameters 'trigger_mask' and 'trigger_signal': These parameters settings affect all cameras that are connected to this specific board.
    • New parameters to allow control of the PXR800 real-time control engine.
    • The query types 'bits_per_channel', 'camera_type', 'color_space', 'device', 'external_trigger', 'field', and 'port' for info_framegrabber provide now specific value lists for the corresponding parameters in open_framegrabber.
  • Revision 2.0 (Jan 9, 2002):
    • First official release.

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