Bin Picking Tutorial: Setting up Photoneo Bin Picking Studio with KAWASAKI robots
Contents
1. Prerequisities
Photoneo KAWASAKI Interface is compatible with E series controllers.
2. KAWASAKI Controller setup
The following tutorial gives a step by step guide of how to configure your KAWASAKI E-series controller and install all necessary .pg files you will need to get the robot interface for Photoneo Binpicking Studio up and running.
2.1 Network configuration
Turn on the E series Controller, wait for the system to boot, open the Menu screen and select the Aux Function option:
In Aux function menu select System option:
Select Network Settings:
Configure network settings of Port 1 and confirm by clicking Enter Button. Port 1 will be utilized for communication with Binpicking Studio:
In case you want to use KRTerm for transferring programs between PC and Robot controller you also need to configure Port 2. Click Next Page configure network settings and confirm by Enter button.
2.2 Enable Autostart
Photoneo KAWASAKI interface consists of two tasks - Binpicking Client task and State server. While Binpicking Client is "Cycle Started" State server runs in the background.
In order to enable State server to run from the first boot, it is necessary to enable AUTOSTART.PC system switch.
On pendant click Menu -> Advanced Settings
In Advanced Settings menu select System Switch
You should see a list of system switches. AUTOSTART.PC switch is on the second page. Turn it ON in order to enable State Server to run on boot
Restart robot controller to apply network settings.
3. KRTerm
Photoneo KAWASAKI interface consists of three .pg files
- photoneo_common.pg
- customer_definitions.pg
- main_application.pg
3.1 Transfering .pg files to robot controller
The first step in the installation of Photoneo KAWASAKI Interface is to copy .pg files from Photoneo KAWASAKI Module Archive which you received with Photoneo BP Studio to the Robot Controller.
You can copy the files directly from the USB stick using the Pendant, however the most convenient method to transfer the .pg files is to use the KRTerm tool.
Make sure that Port 2 is configured for communication with your PC and they are connected to the same subnet.
Open KRTerm and select COM -> Options to add new robot controller:
Type IP address of Port 2 as configured in the pendant in previous step:
Click File -> Set Current Folder and set path to the folder where you keep .pg files
We are now ready to connect to the robot. Make sure that you are able to ping robot controller from your PC and click on Connect button. If connection was established properly you should see login prompt as shown in the figure below:
Use password as to log in. Now your are able to issue commands directly to robot controller. In order to load .pg files to robot controller use LOAD command as shown in the figure below:
Use LOAD command to upload all three .pg files of Photoneo KAWASAKI interface.
At this point your Robot Controller is configured to work with Photoneo Binpicking Studio. However your AS code must be adopted to meet your application requirements - you need to reteach HOME, START and END poses, update part placing, application logic, etc. The following section of the tutorial provides basic examples of how this can be programmed as well as a detailed explanation of Photoneo AS API.
4. AS Language
Photoneo KAWASAKI interface was designed to be easily integrated into existing application written in AS code. It provides two means which influence the final robot behavior:
- AS API - set of AS requests (or procedures) used to control the bin picking sequence. Requests are defined in photoneo_common.pg module and used within main_application.pg
- AS CONFIG - customer_definitions.pg holds an application specific settings such as gripper commands, motion execution settings and object placing definitions.
4.1 AS API
The following API describes the functionality of requests provided by Photoneo KAWASAKI Interface. These requests are intended for high level control of bin picking sequences and are usually called in main_application.pg
- connect_to_vc(.ret_val_conn) - function to establish a connection to the Vision Controller. Blocking function; suspends the program until a proper connection is established.
- scan_req(.ret_val_scan) - request to trigger the next scan and localization. Non-blocking request; the AS program continues immediately at the next line.
- wait_for_scan(.ret_val_wait) - function to wait for scan to be finished. This should be called after triggering the scan, but not immediately
- traj_req(.ret_val_traj) - request to start trajectory planning for current goal. Non-blocking function; the AS program continues immediately at the next line.
- traj_recv(.ret_val_traj) - function to receive requested bin picking trajectories (consisting of a sequence of trajectory and gripper operations). This is usually called inside pho_bin_picking() function by default. Blocking function; waits for motion data to be received.
- init_req(.ret_val_init) - request to initialize bin picking application from the Vision Controller side. Start and End Poses defined by the operator from the AS side are transferred to the Vision Controller and used in the trajectory planning pipeline as start and terminus points.
- calib_add_req(.ret_val_add) - request to add calibration point - a scan is triggered and the calibration is recalculated. Blocking request; the program will not continue until the calibration result is recalculated and has been received by the Robot Controller.
- calib_set_req(.ret_val_set) - request to set current calibration result to the PhoXi Scanner
- calib_reset_req(.ret_val_reset) - request to reset current calibration and remove all previously added points
- pick_part() - request to execute bin picking operation. Blocking function; the program does not continue until the whole sequence is finished. Always make sure that the robot is in pho_start_bin_picking_pose before calling this function.