Bin Picking Tutorial: Setting up Photoneo Bin Picking Studio with YASKAWA robots

From 3D scanning Knowledge base - Photoneo wiki
Revision as of 11:56, 25 February 2019 by Durovsky (talk | contribs)

Jump to: navigation, search

NOTE: Users are strongly recommended to read the general introduction to robot interfaces prior to installing specific robot modules.

1. Prerequisites

Prior to setup, please ensure that your Yaskawa controller meets the following criteria:

- YRC1000 - the latest controller version. FS100, DX100 and DX200 are currently not supported but available on demand. NX100 is deprecated.

- MotoPlus Runtime option - This option needs to be enabled on robot controller in order to get Photoneo Yaskawa interface up and running.

The Photoneo Yaskawa Interface was originally developed using GP8 manipulator with YRC1000 Controller with the following version:


20190225074354.jpg

2. Yaskawa Controller Setup

2.1 Maintenance & Management Mode

When configuring Yaskawa controller for Photoneo Interface it is necessary to work in Maintenance Mode and Management Security level. Following procedure describes the steps necessary to enter this mode.

Start Controller into a Maintenance Mode. Hold the Main Menu button while turning the main switch on. You should hear a short beep on a boot. Maintenance mode screen is shown in the figure below:


20190225075440.jpg


Switch Security Level from Editing to Management Mode. Browse to System -> Security and select Management Mode:


20190225075459.jpg


As a password to management mode, insert "9999999999999999" (16x9):


20190225075525.jpg


Notice three keys in the top status bar - this means that Management Mode is Active

2.2 Set IP Address

The first step of the process is to configure the IP address of the robot controller. In Maintenance mode browse to System -> Setup -> Option Functions:


20190225075545.jpg


Select LAN Interface Setting to enter the Network Configuration pane:


20190225075551.jpg


Select Manual Setting for LAN2 Port and amend the IP Address to meet your network requirements:


20190225075559.jpg


2.3 Enable MotoPlus Functionality

If MotoPlus functionality has not been enabled on robot controller before, browse to System -> Setup -> Option Functions and switch MOTOPLUS Func Flag from NOT USED to USED.


20190225082225.jpg


MotoPlus APL icon should be now visible on the left pane. Enter the MotoPlus Func. Settings to configure MotoPlus autostart option:


20190225082256.jpg


2.4 Load Photoneo Yaskawa Module

Photoneo Yaskawa Module consists of several JOB Files and one PhotoneoBP_CONTROLLER_v_x_y_z.out file. This OUT file needs to be loaded to the Robot Controller as follows:

Select MOTOPLUS Apl. -> Load (User Application) and select the specific out file:


20190225083827.jpg


Confirm Loading the application


20190225083835.jpg


Maintenance Mode Configuration is finished now. Restart the robot controller into Normal Mode.

=== 2.5 Copy INFORM JOBS to Robot Controller

Next, all JOBS from INFORM Folder of Photoneo Yaskawa Module needs to be copied into the robot controller.

Browse to Ex. Memory -> Load and select all JOBS from the INFORM Folder as shown in the figure below:


20190225102907.jpg


Press Enter to start the transfer


20190225102931.jpg


2.6 Occupied Variables

Photoneo Yaskawa Module occupies following data registers:

BYTE REGISTERS (FLAGS):

  • B000 - CONNECT_TO_VC - flag set by INFORM JOB to notify MotoPlus application to establish connection to VC
  • B001 - CONNECTED - flag set by MotoPlus application to notify INFORM that connection has been established
  • B002 - NEW_REQ - flag set by INFORM JOB to notify MotoPlus application that new request has been issued
  • B003 - REQ_FINISHED - flag set by MotoPlus application to notify INFORM that request has been handled
  • B004 - DATA_READY - flag set by MotoPlus application to notify INFORM that bin picking sequence data are ready for execution
  • B005 - OPER_READY - flag set by MotoPlus application to notify INFORM that data are ready for execution
  • B006 - OPER_FINISH - flag set by INFORM JOB to notify MotoPlus application that operation has been executed
  • B007 - PICK_FINISH - flag set by MotoPlus application to notify INFORM about executing the last bin picking operation


20190225104430.jpg


INTEGER RESIGTERS:

  • I000 - VC_IP_ADDRESS_1
  • I001 - VC_IP_ADDRESS_2
  • I002 - VC_IP_ADDRESS_3
  • I003 - VC_IP_ADDRESS_4
  • I004 - VISION_SYSTEM_ID
  • I005 - REQUEST_TYPE
  • I006 - RESPONSE_STATUS
  • I007 - NUM_OF_OPER
  • I008 - OPER_TYPE
  • I009 - GRIPPER_ACTION
  • I010 - TRAJ_SIZE
  • I011 - TOOL_INVARIANCE
  • I012 - GRIP_POINT_ID
  • I013 - GRIP_INVARIANCE
  • I014 - I023 - INFO DATA 1-10
  • I024 - CUSTOMER REQUEST
  • I025 - NEXT SOLUTION ID
  • I030 - TRAJ_CURRENT
  • I031 - I040 - TRAJ_1_SPEED - TRAJ_10_SPEED


REAL REGISTERS:

  • R000 - CALIBRATION_ERROR (not supported in this version)
  • R001 - CUSTOMER_DATA_1
  • R002 - CUSTOMER_DATA_2
  • R003 - CUSTOMER_DATA_3
  • R004 - CUSTOMER_DATA_4


20190225104439.jpg


3. INFORM LANGUAGE

The Photoneo Yaskawa Module was designed to be easily integrated into existing applications written as INFORM JOBS.

3.1 INFORM API

The Photoneo YASKAWA INFORM API is comprised of the following programs. These are intended for high-level level control of bin picking sequences and are usually called in PHOMAIN program.

PHO_CONNECT_TO_VC - function to establish a connection to the Vision Controller. Blocking function; suspends the program until a proper connection is established.

PHO_SCAN_REQ - request to trigger the next scan and localization. Non-blocking request; the INFORM program continues immediately at the next line.

PHO_WAIT_FOR_SCAN - function to wait for scan to be finished. This should be called after triggering the scan but does not have to be called immediately. Blocking function, waits for the response from the BP Studio.

PHO_TRAJ_REQ - request to receive requested bin picking trajectories (consisting of a sequence of trajectory and gripper operations). Blocking function; waits for motion data to be received.

PHO_INIT_REQ - request to initialize bin picking application from the Vision Controller side. Start and End Poses defined by the operator from Teach Pendant are transferred to the Vision Controller and used in the trajectory planning pipeline as start and terminus points.

PHO_CHANGE_SOL_REQ - request to change currently deployed solution.

PHO_CALIB_START_REQ - request to start current calibration for selected vision system and remove all previously added points (Not supported in this version)

PHO_CALIB_ADD_POINT_REQ - request to add calibration point - a scan is triggered and the calibration is recalculated. (Not supported in this version)

PHO_CALIB_SET_REQ - request to save current calibration result to selected Vision System (Not supported in this version)

PHO_CALIB_RESET_REQ - request to reset current calibration and remove all previously added points (Not supported in this version)

PHO_BIN_LOCATOR - request to localize bin position in the environment (Reserved for future use)

PHO_PICK_FAILED - request to notify bin picking studio that object picking has failed (Reserved for future use)


NOTE #1: The PHO_CONNECT_TO_VC function should always be called as a first of Photoneo Bin Picking API procedures. It should always be followed by PHO_INIT_REQ function. Not obeying this order will result in a communication error.


NOTE #2: The PHO_WAIT_FOR_SCAN has to be called after the PHO_SCAN_REQ. A user can perform standard robotic commands between these two calls but cannot perform any other Photoneo Bin Picking API calls. The PHO_WAIT_FOR_SCAN function has to be finished first. For example - PHO_SCAN_REQ followed by PHO_TRAJ_REQ results in communication error.



3.2 INFORM CONFIG

The following JOBS enable the user to configure several bin picking settings, to implement gripper commands and to amend the placing of the attached object.

4.2.1 ROUTINES

- PHO_PICK_OBJECT - standard bin picking sequence. This flexible, operation-based implementation allows performing bin picking sequences, which consist of various operations to be performed. Do not edit !!!

- PHO_PLACE_OBJECT - placing operation. Adapt placing sequence and poses to meet your application requirements

- PHO_GRIPPER_ATTACH - implement function for attaching object to the gripper here

- PHO_GRIPPER_DETACH - implement function for detaching object from the gripper here

- PHO_GRIPPER_USER_1 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_2 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_3 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_4 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_5 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_6 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_7 - implement custom user gripper command (reserved for future use)

- PHO_GRIPPER_USER_8 - implement custom user gripper command (reserved for future use)


3.3 INFORM ERROR HANDLING

The Photoneo YASKAWA interface provides basic error handling. If an error occurs during bin picking operations, an error code is returned in Register I006 - RESPONSE STATUS.

The following list shows the potential bin picking error codes:

OK = 0 - Service response from Bin Picking Studio is valid

SERVICE_ERR = 1 - Service response from Bin Picking Studio is invalid.

UNKNOWN_REQ = 2 - The Bin Picking Studio received an unknown request.

COMM_FAILURE = 3 - Communication failure due to socket closure.

BAD_DATA = 4 - Data validation check has failed.

TIMEOUT = 5 - Communication failure due to socket timeout.

UNKNOWN_ERR = 99 - Unspecified internal error

PLANNING_FAILED = 201 - Trajectory planning has failed

NO_PART_FOUND = 202 - No part has been localized

NOT_INIT = 203 - Bin picking application has not been properly initialized on the Bin Picking Studio side.

WRONG_BP_CONFIG = 255 - Wrong Bin Picking Configuration - Check Log Console in the Bin Picking Studio


Photoneo Yaskawa Interface by default performs basic error handling immediately after the PHO_TRAJ_REQ call.

If NOT_INIT or SERVICE_ERR occurs, the whole bin picking is reinitialized.

If PLANNING_FAILED or NO_PART_FOUND occurs, scanning is repeated.

It is up to the user to decide if existing error handling is sufficient for a particular application or if it needs to be expanded.