Version: 1.0.0
This repository demonstrates how to use the Generic Vision Interface with wenglor Machine Vision Devices on a FANUC controller. The included KAREL library (w_library.pc) and TP programs form a working sample program that you can adopt and customize for your application.
NOTE
This repository focuses exclusively on FANUC 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 (
W_LIBRARYKAREL variables) - Troubleshooting
- Support & Feedback
Tested with a FANUC R-30iB Mate Plus controller (software V9.40) and an LR Mate 200iD robot arm.
- Basic knowledge of TP and KAREL programming.
- A FANUC controller with the system variable
$KAREL_ENBset to1. - Socket Messaging (Host Comm client) configured for the Machine Vision Device.
- A B60 or Machine Vision Controller (MVC).
- A uniVision job for calibration and object detection.
- Get the files from the sources directory.
- Transfer them to the robot controller via FTP or a USB stick (target device Mem Device (MD)).
- Make sure
$KAREL_ENBis set to1. - Run
W_LIBRARYonce to initialize the KAREL variables (it returns a cam error on the first run — that is expected). - Follow the configuration steps.
- Select
W_SINGLE_DETECT,W_MULTI_DETECTorW_UPDATE_REFERENCE_FRAME. - If no calibration data is present on the device, the calibration process starts automatically. Answer the prompts under Menu → User using Deadman + SHIFT + F1/F2.
- Execute the program and monitor the messages on the teach pendant.
Adjust the variables under Data → Karel Vars after selecting the W_LIBRARY program.
- Set the robot controller IP under Menu → (6) Setup → Setup 2 → (9) Host Comm → TCP/IP (e.g.
192.168.100.11). - Configure the Host Comm client (e.g.
C1) with the device IP (default192.168.100.1) and port (default32006). - Make sure the client tag matches the
w_client_tagKAREL variable (defaultC1:).
Click to see the relevant parameter adjustments in the w_library.pc file
| Variable | Default | Note |
|---|---|---|
w_client_tag |
C1: |
Host Comm client tag. |
w_use_case |
camera_on_robot |
camera_on_robot or camera_not_on_robot. |
w_calib_target |
zvzj002 |
Calibration target (zvzj001–zvzj004). |
w_calib_job |
calibration.u3p |
uniVision calibration job. |
w_detect_pose_reg |
65 |
Detection pose register (PR). Keep in sync with the TP programs. |
See the User Configuration page for the full list.
Set up to eleven calibration poses (minimum five) in the W_CALIB_POSES array under Data → Karel Pos. Set the detection pose in PR[65] (or another PR, if you also update w_detect_pose_reg and the TP programs).
- Verify IP/port in KAREL variables
- 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
You can use more than 5 calibration poses by adding more calibration poses in the W_CALIB_POSES array under Data → Karel Pos.
Click to see where to set the poses in the w_library.pc file
Set up to eleven calibration poses (minimum five) in the W_CALIB_POSES array under Data → Karel Pos. For better accuracy, use seven to eleven poses with increased variation, especially in pose angles.
See the Troubleshooting page for more.
- 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.