HALCON: Could Not Connect to Camera (Error Code 5312)
Symptom
The camera could not be connected in HALCON that had been installed or upgraded after August 7, 2023. The following error was displayed:
-
Error code: 5312
-
Error message: Image acquisition: device cannot be initialized
Possible Causes
This issue is caused by the following two factors together:
-
The names of the camera parameter groups include characters other than letters and numbers.
-
Version 20.11.17 of GigE Vision 2 interface released by MVTec on August 7, 2023 does not support the above characters. HALCON installed or upgraded after this date all uses this version of GigE Vision 2 interface.
Solution
Mech-Eye SDK 2.3.0 has modified the parameter group feature to circumvent this issue, in order to ensure that the camera can be connected successfully in HALCON.
Please upgrade or install Mech-Eye SDK 2.3.0 or above, and upgrade the camera firmware to 2.3.0 or above with Mech-Eye Viewer.
After the upgrade, the procedure of selecting a parameter group in HALCON changes. Please refer to the following steps to select a parameter group in HALCON:
-
Connect to the camera in Mech-Eye Viewer.
-
At the top of the Parameters tab to the right, click the Parameter Group drop-down menu, and check the order of the parameter groups.
Since Mech-Eye Viewer and HALCON cannot connect to the same camera at the same time, to ease the steps later on, you can record the order of the parameter groups with a screenshot or other methods. -
Disconnect from the camera in Mech-Eye Viewer, and then connect to the camera in HALCON with the image acquisition assistant or a program.
-
Select a parameter group in HALCON: The parameter group needs to be selected based its order in Mech-Eye Viewer.
If the needed parameter group is the first one in the Parameter Group drop-down menu if Mech-Eye Viewer, select the parameter group named UserSet0 in HALCON.
If the needed parameter group is the second one in the Parameter Group drop-down menu if Mech-Eye Viewer, select the parameter group named UserSet1 in HALCON, and so forth.