Locator Tutorial: Setting up Locator to work with KUKA robots
It is highly recommended that users read Locator Tutorial: Introduction prior to installation of specific robot interface
1. Prerequisities
Photoneo KUKA module prerequisities:
- - KRC4 system v.8.3 or higher
- - Ethernet KRL Interface v.2.1 or higher installed
In order to check if Ethernet KRL is available on the robot controller, switch to Expert Mode and browse to Menu -> Startup -> Additional Software:
2. KUKA Controller setup
The following tutorial gives a step by step guide of how to configure your KUKA KRC4 controller and install all the necessary files you will need to get the robot interface for Locator up and running.
This tutorial was originally written using the latest KRC4 system version 8.3 and KUKA AGILUS KR6 R900 sixx robot.
2.1 Network configuration
The Locator KUKA Module utilizes TCP/IP communication for transferring data between KRC4 Robot Controller and Vision Controller.
As a first step in commissioning, ensure that the IP address of the KRC4 controller meets your network configuration requirements
Switch to Expert Mode, open the Menu screen and select the Startup-> Network Configuration option:
Amend the network configuration to meet your requirements:
KRC4 Control PC needs to be rebooted in order to apply the new network configuration.
Open the Menu Screen and select the Shutdown -> Reboot control PC option:
3. Photoneo KUKA Module Setup
The first step in the installation of Locator KUKA Module is to copy the files from the Locator KUKA Module Archive to the Robot Controller.
The Locator KUKA Module consists of the following files:
- Photoneo EthernetKRL Config Folder
- - locator_client.xml
- Photoneo Folder
- - locator_communication.src
- - locator_communication.dat
- Program Folder
- - locator_basic_template.src
- - locator_basic_template.dat
3.1 Ethernet KRL config
EthernetKRL Config folder contains one XML files - locator_client.xml.
Copy this configuration files from the USB stick to C:\System\KRC\Roboter\Config\User\Common\EthernetKRL\ as is shown in the figure below:
XML files hold the configuration of EKI communication interface. The only entry that need to be changed is the IP address tag.
Enter the IP address of the Vision Controller to External IP tag in locator_client.xml as is shown in the figure below:
Save the changes and reboot the control PC again to apply the new EthernetKRL interface configuration.
Ports utilized by Photoneo KUKA Module:
- - Locator Client Port: 54602
Flags occupied by EthernetKRL functions:
- - $FLAG[101] - Locator Connection Alive
- - $FLAG[102] - New Data Received
NOTE: Do NOT use these flags and ports in the rest of your application!!!
3.2 Copy Photoneo & Program files
The Photoneo folder contains internal communication sources that should not be edited by user.
Copy the entire content of Photoneo folder from the USB Stick to the R1/Photoneo/ folder/ (Compilation errors can be ignored for now - just copy the files):
It is highly recommended to hide the Photoneo folder from the Operator's reach.
Switch to Expert Mode, and set the System flag in the Properties of the Photoneo folder:
The program folder contains files which should be adapted by the user in order to meet application requirements.
Do not replace the whole program folder, only copy three files from the Locator_KUKA_Module archive to R1/Program Folder:
NOTE: Compilation errors should disappear after copying all files to the robot controller.
3.3 Robot - Camera Calibration
ToDo
3.4 Tool Calibration
ToDo
3.5 Reteach Start and End poses
When Robot-Camera and Tool calibration has been finished you can proceed to re-teaching application poses. Ensure that you select the right Base and Tool Frame.
Switch to Expert Mode and select locator_basic_template.src program as shown in the figure below:
Press Block Selection button to move program pointer to the current line. Jog robot to the new pose and select Touch Up Button to reteach position:
Select Yes to confirm new position. Repeat the same procedure also for START, END and placing positions:
NOTE: START and END position should be of PTP Motion type
3.6 Run Locator
You are now ready to run the program. Switch to AUT mode and select 10% speed; this option is recommended for safety reasons.
Make sure that you are ready to stop the motion execution immediately if something goes wrong.
Press PLAY button and keep it pressed until robot moves to Start Pose. Release PLAY button and press it again to continue program forward.
If everything has been configured and calibrated properly, the robot should trigger a first scan, wait for the result and move towards the first localized object.
4. KRL
The Locator KUKA module is a set of KRL procedures which handle socket communication with the Locator and provides basic examples of how to navigate the robot to specific targets.
4.2 Communication API
KRL procedures necessary for communication with Locator are available in the locator_communication.src and locator_communication.dat files.
PHO_ConnectToVC() - procedure to establish a connection with the Locator.
PHO_TrigLocator(mode:IN, requested_targets:IN) - procedure to trigger the next localization
- mode - two modes are available - SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE.
- requested_targets - optional parameter used in MULTIPLE_RESULT_MODE - defines the number of results requested by the user.
PHO_waitForLocatorRes() - procedure to wait for a localization result to be received