Version: 2.1.0
This repository demonstrates how to use the Generic Vision Interface with wenglor Machine Vision Devices on a KUKA controller. The included .src, .dat, and .xml files form a working sample program wenglorMain.src that you can adopt and customize for your application.
NOTE
This repository focuses exclusively on KUKA Robots-specific topics. For general robot vision information, please refer to the wenglor robot vision manual.
📖 Full documentation is available in the online manual
- Prerequisites
- Installation
- Running the Sample Program
- Configuration
- Troubleshooting
- Support & Feedback
- Basic knowledge of KRL (KUKA Robot Language)
- EthernetKRL support
- KUKA Robot Controller (KRC) with KRL support
- B60 (firmware >= 1.3) or Machine Vision Controller (MVC) (firmware >= 1.0)
- A uniVision job for calibration and object detection
-
Get the files from the sources directory.
-
Copy them to the robot controller.
Sources Destination wenglorVision.xml C:\KRC\ROBOTER\Config\User\Common\EthernetKRL\.src and .dat files KRC:\R1\Program\ -
Follow the configuration steps.
-
Run the program wenglorMain.src on your robot.
- Connect to the robot controller.
- On the KUKA teach panel, load the wenglorMain.src program.
- Start execution and follow the console logs.
<EXTERNAL>
<IP>192.168.100.1</IP> <!-- IP address of the Machine Vision Device -->
<PORT>6008</PORT> <!-- Port of the robot vision server on the Machine Vision Device -->
<TYPE>Server</TYPE>
</EXTERNAL>Click to see the relevant parameter adjustments in the wenglorUserConfig.src file
;----------------------------------------
; Name of the xml file
W_CONNECTION[] = "wenglorVision"
;----------------------------------------
; Comment out the correct line depending
; on the selected camera/robot setup
W_USE_CASE[] = "camera_not_on_robot"
;W_USE_CASE[] = "camera_on_robot" <!-- If your camera is mounted on the robot, pick this case. -->
;----------------------------------------
; Comment out the correct line depending
; on the selected calibration board
W_CALIBRATION_TARGET[] = "zvzj001" <!-- Pick the calibration board you are using. -->
;W_CALIBRATION_TARGET[] = "zvzj002"
;W_CALIBRATION_TARGET[] = "zvzj003"
;W_CALIBRATION_TARGET[] = "zvzj004"
;----------------------------------------
; Define the uniVision jobs
W_CALIBRATION_JOB[] = "calibration.u3p" <!-- Update to your calibration job name. -->
W_DETECT_OBJECTS_JOB[] = "find_objects.u3p" <!-- Update to your detection job name. -->
W_DETECT_TARGET_JOB[] = "find_target.u3p"
;----------------------------------------
; Adjust validation z safety offset [mm]
W_SAFETY_OFFSET_MM = 10
;----------------------------------------
; Adjust the number of calibration poses
; you want to use. 5 poses are required
; at least.
W_NUM_CALIBRATION_POSES = 5 <!-- How many calibration poses do you want to use? Minimum is 5. -->
;----------------------------------------
; Comment out the correct line depending
; on the selected detection
W_USER_COMMAND[] = "singleDetection"
;W_USER_COMMAND[] = "multiDetection" <!-- Want to detect multiple objects with one capture? Then pick this one. -->
;W_USER_COMMAND[] = "updateReferenceFrame"
If you taught more than 5 poses remember to update the number of calibration poses
Click to see where to set the poses in the wenglorUserConfig.src file
GLOBAL DEF moveTocalibrationPose(poseNum:IN)
INT poseNum
SWITCH poseNum
CASE 1
; Add movement to calibration pose 1 here.
;
<!-- Teach pose here. -->
CASE 2
; Add movement to calibration pose 2 here.
;
<!-- Teach pose here. -->
CASE 3
; Add movement to calibration pose 3 here.
;
<!-- Teach pose here. -->
CASE 4
; Add movement to calibration pose 4 here.
;
<!-- Teach pose here. -->
CASE 5
; Add movement to calibration pose 5 here.
;
<!-- Teach pose here. -->
;------------------------------------
; Add more poses by copy "CASE #" and
; increase the pose number e.g.: CASE 6
; Make sure W_NUM_CALIBRATION_POSES
; above has the right value.
;
<!-- Teach further poses here to increase accuracy. -->
DEFAULT
; no movement
ENDSWITCH
END
GLOBAL DEF moveToDetectObjectsPose()
; Add movement to detectObjectsPose here.
;
<!-- Teach detection pose here. -->
END
GLOBAL DEF moveToSafetyPose()
; Add movement to pose here.
; use case camera not on robot
; for removing calibration board
;
<!-- Teach safety pose here. -->
END
GLOBAL DEF moveToDetectTargetPose()
; Add movement to targetPose here.
;
<!-- Teach detect target pose here (updateReferenceFrame). -->
END
GLOBAL DEF testCalibrationPoses() <!-- Call from wenglorMain.src to test your calibration pose movements -->
INT i
FOR i=1 to W_NUM_CALIBRATION_POSES
moveTocalibrationPose(i)
ENDFOR
END
- Verify IP/port in wenglorVision.xml
- Ensure the robot server on the Machine Vision Device is active
- Go to the device website → Jobs → Processing Instance → Robot Server
- Check network connectivity/firewall
- Ensure your taught number of calibration poses equals W_NUM_CALIBRATION_POSES
- Match W_CONNECTION[] with the XML filename
- Bugs: Please open a new Issue in the GitHub Issues section if needed.
- Feature Requests & Ideas: Discuss suggestions in the Discussions → Ideas category under GitHub Discussions.