When dealing with acquisition problems, you should avoid debugging it using an outdated interface. So, are you using the most recent revision of the interface? This can be verified quickly by having a look at MVTec’s download area for interfaces.
If you are using the most recent version, or if an update does not solve your problem, you can debug an acquisition problem at many different levels. The first one should always be to check for low level error messages, e.g., in the output console in HDevelop. Sometimes, however, the information contained in the low level error messages might not be sufficient and it becomes necessary to debug problems at a more basic level.
For the GigEVision2, GenICamTL, and USB3Vision interfaces, which all rely on the GenICam standard, this means debugging at the level of GenTL calls.
On Windows you will need Visual Studio or the tool DebugView, which is part of the Microsoft Sysutils, to view and save the debug messages. While debugging, this tool has to be open and running.
On Linux systems, the logging information is accessible through the STDERR channel and is therefore visible on the command line or can be piped to a file.
To enable the debugging, you will need to first set the following environment variables (Linux: export, Windows: set):
HALCON_LOG_LEVEL=99
HALCON_GENTL_LOGGING=1
After setting these environment variables, you can start HALCON or your application and reproduce your problem.
While doing so, you should see debug messages in DebugView or on the console output.
So far we have enabled debugging information on a general GenICam level. However, you can also enable more specific information for the GigEVision2 and USB3Vision interfaces by additionally setting the following environment variables:
USB3Vision:
USAN_GENTL_LOGGING=1
USAN_LIBUSB_LOGGING=1
USAN_LOG_LEVEL=99
GigEVision2:
ESEN_GENTL_LOGGING=1
ESEN_LOG_LEVEL=99
With all these different levels of debugging, please keep in mind that enabling too much logging information can significantly slow down HALCON or your application. In some cases, enabling all logging can even prevent the successful acquisition of images. So, after the image acquisition issue has been solved, do not forget to disable the logging to enjoy the full power of HALCON image acquisition.