Halcon Acquisition Interface

Aus BECOM Systems Support
Zur Navigation springen Zur Suche springen

This is a preview of the BltTofApi acquisition interface plugin for Halcon.


Downloads

Only the x64 libraries are available for now.

Halcon Version Interface version Download AI
11 5.0b hAcqBltTofApi_rev5.0b.zip
13 13.0.1 hAcqBltTofApi_rev13.0.1.zip
  • Instructions:

Just copy all the contents of the zip archive into C:\Program Files\MVTec\HALCON-1x.0\bin\x64-win64 (or similar)

  • Dependencies:
    • C++ Redistributable for Visual Studio 2015
    • C++ Redistributable for Visual Studio 2010


Documentation

The documentation is not yet complete, please use this quick start guide in the meantime.

Use these parameters when opening the framegrabber (all other generic parameters are optional):

  • for Ethernet devices:
open_framegrabber ('BltTofApi', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', ['device_type=1', 'udp_data_ip_addr=224.0.0.1', 'udp_data_port=10002',
'udp_control_out_ip_addr=192.168.0.10', 'udp_control_out_port=10003', 'udp_control_in_ip_addr=192.168.0.1', 'udp_control_in_port=10004',
'tcp_device_ip_addr=192.168.0.10', 'tcp_control_port=10001', 'verbosity=5'], 'false', 'default', 'default', -1, -1, AcqHandle)
  • for USB devices:
open_framegrabber ('BltTofApi', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', ['device_type=2', 'verbosity=5'], 'false', 'default', 'default', -1, -1, AcqHandle)
  • for reading a bltstream:
open_framegrabber ('BltTofApi', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', ['device_type=15', 'bltstream_filename=c:\\dummy.bltstream', 'verbosity=5'],
'false', 'default', 'default', -1, -1, AcqHandle)

Once connected, all the camera's features are accessible through parameters.

  • Retrieve a list of parameters:
get_framegrabber_param(AcqHandle, 'available_param_names', parameter_names)  // Store list of parameters in variable parameter_names
  • Get infos about a specific parameter:
get_framegrabber_param(AcqHandle, 'global_offset_description', info)         // Get the description of parameter 'global_offset'
get_framegrabber_param(AcqHandle, 'global_offset_range', info)               // Get the value range of parameter 'global_offset'
get_framegrabber_param(AcqHandle, 'frame_mode_values', info)                 // Get the value options of parameter 'frame_mode'
get_framegrabber_param(AcqHandle, 'global_offset_access', info)              // Get the access rights of parameter 'global_offset'
  • Read a register value (consult the devices software user manual first!)
set_framegrabber_param(AcqHandle, 'register_addr', 1)        // Select address 0x0001 (Mode0)
get_framegrabber_param(AcqHandle, 'register_value', mode0)   // Read value of register Mode0 into variable mode0
  • Write a register value (consult the devices software user manual first!)
set_framegrabber_param(AcqHandle, 'register_addr', 1)        // Select address 0x0001 (Mode0)
set_framegrabber_param(AcqHandle, 'register_value', 0)       // Write 0 into register Mode0
  • Getting camera data: you can use either grab_data or grab_image:
grab_data(Image, Region, Contours, AcqHandle, Data)          // A frame from the camera is stored in the variable Image
grab_image(Image, AcqHandle)                                 // A frame from the camera is stored in the variable Image

The functions grab_data and grab_image basically deliver the same, but differently organized in images/channels, data. We recommend using the grab_data function. Please be aware of the frame mode previously configured so you are able to identify the kind of data you are retrieving.

For support, please contact Alex Falkensteiner