Issue on connecting to the Image Acquisition Device using HALCON

3.3k Views Asked by At

My setup includes a POE camera connected directly to my computer on which I have HDevelop. From the past few days I am running into a problem wherein the first attempt to connect to the camera using HDevelop fails.

  1. When using Connect from the Image Acquisition GUI, I get an error stating "HALCON ERROR. Image acquisition: device cannot be initialized"

  2. When using the open_framegrabber() method from the Program Console, I get a the same error as well, with the addition of the HALCON error code:5312

After I get this error, attempting the connection again, it succeeds. This is the workaround I have at the moment, but its annoying as it keeps repeating quite frequently and I am not sure what is the cause for this issue. I tried pinging my camera from the command prompt which did not show any ping losses. And using the camera from VIMBA viewer I do not get such connection issues.

I know this is not a support site where I should be asking such questions, but if anyone can give me some inputs on solving this, it would be of great help.

Regards,

Sanjay

1

There are 1 best solutions below

0
On

To solve your question is important to understand the HALCON Framegrabber communication object, I assume that you are coding in HDev code structure.

To create a communication channel with the camera on the proper way, avoiding to reject the connection (due to parameter miss-configuration), you have to specify the camera device ID on the framegrabber creation, and avoid to use default options.

In order to consult, according to your communication protocol, the available devices conected to your board, use:

info_framegrabber('GigEVision2', 'info_boards', Information, ValueList)

where,

The first parameter is the communication protocol and ValueList will throw all the information of the connected devices with a token:param splitted by '|'

i.e

| device:ac4ffc00d5db_SVSVISTEKGmbH_eco274MVGE67 | unique_name:ac4ffc00d5db_SVSVISTEKGmbH_eco274MVGE67 | interface:Esen_ITF_78d004253353c0a80364ffffff00 | producer:Esen | vendor:SVS-VISTEK GmbH | model:eco274MVGE67 | tl_type:GEV | device_ip:192.168.3.101/24 | interface_ip:192.168.3.100/24 | status:busy | device:ac4ffc009cae_SVSVISTEKGmbH_eco274MVGE67 | unique_name:ac4ffc009cae_SVSVISTEKGmbH_eco274MVGE67 | interface:Esen_ITF_78d004253354c0a80264ffffff00 | producer:Esen | vendor:SVS-VISTEK GmbH | model:eco274MVGE67 | tl_type:GEV | device_ip:192.168.2.101/24 | interface_ip:192.168.2.100/24 | status:busy | device:ac4ffc009dc6_SVSVISTEKGmbH_eco274MVGE67 | unique_name:ac4ffc009dc6_SVSVISTEKGmbH_eco274MV

......... and going

In this way you can cast the device ID (device:) automatically, and put this parameter on your framegrabber creation.

open_framegrabber ('GigEVision2', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', -1, 'false', 'here piut the device ID', '', -1, -1, AcqHandle)

At the end you will be able to do a direct connection or create a automatically re-connection routine.

I hope this information helps you.