Difference between revisions of "Bin Picking Tutorial: Setting up Photoneo Bin Picking Studio with YASKAWA robots"

From 3D scanning Knowledge base - Photoneo wiki
Jump to: navigation, search
 
(19 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Prior to setup, please ensure that your Yaskawa controller meets the following criteria:
 
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!'''
+
- '''YRC1000''' - the latest controller version. '''FS100''', '''DX100''' and '''DX200''' are not currently supported but support for these version is 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.
+
- '''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 and '''YRC1000 Controller''' with the following version:
+
The Photoneo Yaskawa Interface was originally developed using '''GP8''' manipulator and '''YRC1000 Controller''' with the following firmware version:
  
  
Line 18: Line 18:
 
=== 2.1 Maintenance & Management Mode ===
 
=== 2.1 Maintenance & Management Mode ===
  
When configuring Yaskawa controller for Photoneo Interface it is necessary to switch to the '''Maintenance Mode''' and select '''Management''' Security level. Following procedure describes the steps necessary to enter this mode.
+
Start the Robot Controller in a Maintenance Mode by holding the '''Main Menu''' button while turning the main switch on.  
  
Start the Robot Controller into a Maintenance Mode by holding 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:
+
You should hear a short beep during the boot. The Maintenance Mode screen is shown in the figure below:
  
  
Line 26: Line 26:
  
  
Switch Security Level from '''Editing''' to '''Management''' Mode. Browse to '''System''' -> '''Security''' and select Management Mode:  
+
Switch the Security Level from '''Editing''' to '''Management''' Mode. Browse to '''System''' -> '''Security''' and select '''Management Mode''':  
  
  
Line 32: Line 32:
  
  
As a password to management mode, insert '''9999999999999999'''  (16x9):
+
The password for accsessing Management Mode is '''9999999999999999'''  (16x9):
  
  
Line 38: Line 38:
  
  
Notice '''three keys''' in the top status bar - this means that Management Mode is Active
+
Nore the  '''three keys''' in the top status bar - this indicates that - '''Management Mode is Active.'''
  
 
=== 2.2 Set IP Address ===
 
=== 2.2 Set IP Address ===
  
Configure the IP address of the robot controller. In Maintenance mode, browse to '''System''' -> '''Setup''' -> '''Option Functions''':
+
Configure the IP address of the Robot Controller. In Maintenance Mode, browse to '''System''' -> '''Setup''' -> '''Option Functions''':
  
  
Line 59: Line 59:
 
[[File: 20190225075559.jpg|frame|none|alt=Alt text| Figure 2.2.3]]
 
[[File: 20190225075559.jpg|frame|none|alt=Alt text| Figure 2.2.3]]
  
 +
 +
''NOTE: It is recommended to plug the Ethernet cable into the '''LAN2 port''' and to attempt to the ping Robot Controller from a PC to validate that the network has been set correctly.'' 
  
 
=== 2.3 Enable MotoPlus Functionality ===
 
=== 2.3 Enable MotoPlus Functionality ===
  
If MotoPlus functionality has not been enabled on robot controller before, browse to '''System''' -> '''Setup''' -> '''Option Functions'''  
+
If MotoPlus functionality it not already enabled on Robot Controller, browse to '''System''' -> '''Setup''' -> '''Option Functions'''  
  
Switch '''MOTOPLUS Func''' Flag from NOT USED to USED.  
+
Switch '''MOTOPLUS Func''' State from '''NOT USED''' to '''USED'''.  
  
  
Line 70: Line 72:
  
  
'''MotoPlus APL''' icon should be now visible on the left pane. Enter the '''MotoPlus Func. Settings''' to configure MotoPlus autostart option:
+
The '''MotoPlus APL''' icon should now become visible on the left pane.  
 +
 
 +
Enter the '''MotoPlus Func. Settings''' and enable the MotoPlus autostart option:
  
  
Line 76: Line 80:
  
  
=== 2.4 Load Photoneo Yaskawa Module ===
+
=== 2.4 Load MotoPlus Application ===
 +
 
 +
The Photoneo Yaskawa Module ZIP Archive contains several JOB files and single ''PhotoneoBP_CONTROLLER_v_x_y_z.out'' file.
  
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:
+
The OUT file is a MotoPlus binary and must be loaded to the Robot Controller in Maintenance Mode. 
  
Select '''MOTOPLUS Apl.''' -> '''Load (User Application)''' and select the specific out file:
+
Select '''MOTOPLUS Apl.''' -> '''Load (User Application)''' and select the ''PhotoneoBP_CONTROLLER_v_x_y_z.out'' file.
  
  
Line 86: Line 92:
  
  
Confirm loading the application by clicking YES:  
+
Confirm the loading of the MotoPlus application by clicking '''YES''':  
  
  
Line 92: Line 98:
  
  
Maintenance Mode Configuration for Photoneo Yaskawa Module is finished now. Restart the robot controller into Normal Mode.
+
The Maintenance Mode section of the configuration process is now complete. Restart the Robot Controller into Normal Mode. If the configuration has been performed correctly, no errors should appear after the reboot.
 +
 
 +
=== 3. Photoneo Yaskawa Module Setup ===
  
=== 2.5 Copy INFORM JOBS to Robot Controller
+
=== 3.1 Copy INFORM JOBS to Robot Controller===
  
As a next step, all JOBS from INFORM Folder of Photoneo Yaskawa Module needs to be copied from USB to the robot controller.
+
As next step, copy all JOBS from INFORM Folder of the ZIP Archive to the Robot Controller. Use a USB stick or SD Card for the transfer.  
  
Browse to '''Ex. Memory''' -> '''Load'''  and select all JOBS from the INFORM Folder as shown in the figure below:
+
Browse to '''Ex. Memory''' -> '''Load'''  and select all available JOBS as is shown in the figure below:
  
  
[[File: 20190225102907.jpg|frame|none|alt=Alt text| Figure 2.5.1]]
+
[[File: 20190225102907.jpg|frame|none|alt=Alt text| Figure 3.1.1]]
  
  
Press Enter to start the transfer:
+
Hit '''Enter''' to start the transfer:
  
  
[[File: 20190225102931.jpg|frame|none|alt=Alt text| Figure 2.5.2]]
+
[[File: 20190225102931.jpg|frame|none|alt=Alt text| Figure 3.1.2]]
  
  
All JOB files are now available in Robot Controller. Before proceeding further it is important to learn which registers are occupied by Photoneo Yaskawa Module.  
+
All JOB files should now be available in the Robot Controller. Before proceeding further, it is important to understand the concept of variable mapping.  
  
=== 2.6 Occupied Variables ===
+
=== 3.2 Variable Mapping ===
  
 
Photoneo Yaskawa Module occupies following data registers:
 
Photoneo Yaskawa Module occupies following data registers:
Line 118: Line 126:
 
'''BYTE REGISTERS (FLAGS):'''  
 
'''BYTE REGISTERS (FLAGS):'''  
  
* '''B000''' - CONNECT_TO_VC - flag set by INFORM JOB to notify MotoPlus application to establish connection to VC
+
* '''B000''' - CONNECT_TO_VC - flag set by INFORM JOB to issue a request to the MotoPlus application to a establish connection to VC
 +
 
 +
* '''B001''' - CONNECTED - flag set by the MotoPlus application to notify INFORM that connection has been established
  
* '''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 the MotoPlus application that new request has been issued
  
* '''B002''' - NEW_REQ - flag set by INFORM JOB to notify MotoPlus application that new request has been issued
+
* '''B003''' - REQ_FINISHED - flag set by the MotoPlus application to notify INFORM that request has been handled
  
* '''B003''' - REQ_FINISHED - flag set by MotoPlus application to notify INFORM that request has been handled
+
* '''B004''' - DATA_READY - flag set by the MotoPlus application to notify INFORM that bin picking sequence data are ready for execution
  
* '''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 the MotoPlus application to notify INFORM that 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 the MotoPlus application that an operation has been executed
  
* '''B006''' - OPER_FINISH - flag set by INFORM JOB to notify MotoPlus application that operation has been executed
+
* '''B007''' - PICK_FINISH - flag set by the MotoPlus application to notify INFORM about the execution of the last bin picking operation
  
* '''B007''' - PICK_FINISH - flag set by MotoPlus application to notify INFORM about executing the last bin picking operation
+
* '''B008''' - PICK_IN_PROGRESS - flag set by the MotoPlus application to notify INFORM about ongoing picking operation  
  
  
Line 138: Line 148:
  
  
'''INTEGER RESIGTERS:'''
+
'''INTEGER REGISTERS:'''
  
 
* '''I000''' - VC_IP_ADDRESS_1 - First Part of Vision Controller IP Address  
 
* '''I000''' - VC_IP_ADDRESS_1 - First Part of Vision Controller IP Address  
Line 148: Line 158:
 
* '''I003''' - VC_IP_ADDRESS_4 - Fourth Part of Vision Controller IP Address  
 
* '''I003''' - VC_IP_ADDRESS_4 - Fourth Part of Vision Controller IP Address  
  
* '''I004''' - VISION_SYSTEM_ID - Set Vision System ID here
+
* '''I004''' - VISION_SYSTEM_ID - Vision System ID  
  
 
* '''I005''' - REQUEST_TYPE - Type of request which is currently being handled
 
* '''I005''' - REQUEST_TYPE - Type of request which is currently being handled
Line 154: Line 164:
 
* '''I006''' - RESPONSE_STATUS - Response status for the last request
 
* '''I006''' - RESPONSE_STATUS - Response status for the last request
  
* '''I007''' - NUM_OF_OPER - Number of executed operation of current bin picking sequence
+
* '''I007''' - NUM_OF_OPER - Number of executed operations of the current bin picking sequence
  
 
* '''I008''' - OPER_TYPE - Type of operation in execution
 
* '''I008''' - OPER_TYPE - Type of operation in execution
Line 168: Line 178:
 
* '''I013''' - GRIP_INVARIANCE - Gripping Point Invariance for current pick
 
* '''I013''' - GRIP_INVARIANCE - Gripping Point Invariance for current pick
  
* '''I014 - I023''' - INFO DATA 1-10 - Another info data received from Bin Picking Studio
+
* '''I014 - I023''' - INFO DATA 1-10 - Additional info data received from Bin Picking Studio
  
 
* '''I024''' - CUSTOMER REQUEST - Num of data for customer request
 
* '''I024''' - CUSTOMER REQUEST - Num of data for customer request
Line 174: Line 184:
 
* '''I025''' - NEXT SOLUTION ID - ID of solution that should be activated by '''PHO_CHANGE_SOL_REQ'''
 
* '''I025''' - NEXT SOLUTION ID - ID of solution that should be activated by '''PHO_CHANGE_SOL_REQ'''
  
* '''I030''' - TRAJ_CURRENT - Current trajectory speed - this is set automatically by MotoPlus application according to the content of '''I031-I040''' registers
+
* '''I030''' - TRAJ_CURRENT - Current trajectory speed - this is set automatically by the MotoPlus application according to the content of '''I031-I040''' registers
  
 
* '''I031 - I040''' - TRAJ_1_SPEED - TRAJ_10_SPEED - configuration of trajectory speed  
 
* '''I031 - I040''' - TRAJ_1_SPEED - TRAJ_10_SPEED - configuration of trajectory speed  
Line 186: Line 196:
 
* '''R000''' - CALIBRATION_ERROR (not supported in this version)
 
* '''R000''' - CALIBRATION_ERROR (not supported in this version)
  
* '''R001''' - CUSTOMER_DATA_1 - data #1 to be send as a part of customer request to the Vision Controller
+
* '''R001''' - CUSTOMER_DATA_1 - data #1 to be sent as part of a customer request to the Vision Controller
  
* '''R002''' - CUSTOMER_DATA_2 - data #2 to be send as a part of customer request to the Vision Controller
+
* '''R002''' - CUSTOMER_DATA_2 - data #2 to be sent as part of a customer request to the Vision Controller
  
* '''R003''' - CUSTOMER_DATA_3 - data #3 to be send as a part of customer request to the Vision Controller
+
* '''R003''' - CUSTOMER_DATA_3 - data #3 to be sent as part of a customer request to the Vision Controller
  
* '''R004''' - CUSTOMER_DATA_4 - data #4 to be send as a part of customer request to the Vision Controller
+
* '''R004''' - CUSTOMER_DATA_4 - data #4 to be sent as part of a customer request to the Vision Controller
  
  
Line 218: Line 228:
 
* '''P010 - P0110''' - Reserved for trajectory execution
 
* '''P010 - P0110''' - Reserved for trajectory execution
  
=== 2.7 Reteach Start and End Positions===
+
=== 3.3 Setting IP Address of Vision Controller ===
 +
 
 +
Bin Picking Client running on the Robot Controller requires information about the IP Address of the Vision Controller in order to establish a successful connection. 
 +
 
 +
Four integer registers (I000 - I003) are utilized for this purpose. Insert the current IP Address of Vision Controller here:
 +
 
 +
 
 +
[[File: Server ip adress.jpg|frame|none|alt=Alt text| Figure 3.3.1]]
 +
 
 +
 
 +
Ports utilized by Photoneo Yaskawa Module:
 +
 
 +
* - '''Bin Picking Client Port: 11003'''
 +
 
 +
* - '''State Serer Port: 11004'''
 +
 
 +
 
 +
=== 3.4 Set User Frame ===
 +
 
 +
The Cartesian origin of Yaskawa robots is different to the Cartesian origin of robot models used in the Photoneo Bin Picking Studio.
 +
 
 +
In order to ensure successful calibration, it is necessary to apply a predefined offset in the Z axis in User Frame.
 +
 
 +
Press '''Robot''' -> '''User Frame''' and select the first frame from the list. Press Display -> User Coordinates
 +
 
 +
 
 +
[[File: Yaskawa Setting Up Locator Guide User Coordinate.png|frame|none|alt=Alt text| Figure 3.4.1]]
 +
 
 +
 
 +
Set '''Z axis offset''' according to the specific robot model and write the changes.
  
A crucial step of bin picking configuration is the teaching of home, start, and end poses. The home position of the robot should be taught in such a way that the robot remains outside the scanning area. The start position should be taught in such a way that the robot gripper is approximately above the center of the bin. The end position can be similar to the start position or slightly shifted towards the placing area. Do not position the end pose too far from the bin as this might significantly affect dynamic trajectory planning, increase total planning time and cause planning errors.
 
  
Start and End positions must be stored in Position Registers, it cannot be just a local program position variable.  
+
[[File: Yaskawa Offset table May 2019.png|frame|none|alt=Alt text| Figure 3.4.2]]
  
The easiest way how to set values to Position Registers is to use '''PHO_TEACH_START_POSE''' and '''PHO_TEACH_END_POSE''' JOBS as shown in the figure below:
 
  
 +
=== 3.5 Reteach Start and End Positions===
  
[[File: 20190225103001.jpg|frame|none|alt=Alt text| Figure 2.7.1]]
+
A crucial step in bin picking configuration is the teaching of home, start, and end poses. The home position of the robot should be taught in such a way that the robot remains outside the scanning area. The start position should be taught in such a way that the robot gripper is approximately above the center of the bin. The end position can be similar to the start position or slightly shifted towards the placing area. Do not position the end pose too far from the bin as this might significantly affect dynamic trajectory planning, increase total planning time and cause planning errors.
  
 +
The Home Pose can be modified directly in the PHO_MAIN program. Start and End positions must be stored in Position Registers and cannot be taught only as a local program position variable.
  
Jog robot to the Start Pose, reteach the only MOVJ Command in the '''PHO_TEACH_START_POSE''' JOB and run the program. This procedure sets the current Joint Position to the P000 variable.
+
Yaskawa robots use PULSE notation for storing joint robot poses. The easiest way to copy these joint values to Position Registers is to use the '''PHO_TEACH_START_POSE''' and '''PHO_TEACH_END_POSE''' JOBS:
  
Repeat the same step with '''PHO_TEACH_END_POSE JOB''' to set P001 variable. If needed repeat the same procedure for other vision systems - do not forget to rewrite the P00X number in JOB in such a scenario.
 
  
== 3. INFORM LANGUAGE ==
+
[[File: 20190225103001.jpg|frame|none|alt=Alt text| Figure 3.5.1]]
  
The Photoneo Yaskawa Module was designed to be easily integrated into existing applications written as INFORM JOBS.
 
  
=== 3.1 INFORM API ===
+
Jog the robot to the Start Pose, modify the only MOVJ Command in the '''PHO_TEACH_START_POSE''' JOB using the '''MODIFY''' button and run the program. This procedure sets the current Joint Position to the P000 variable.  
  
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 PHO_MAIN program.  
+
Repeat the same step with '''PHO_TEACH_END_POSE JOB''' to set the P001 variable. If more vision systems are to be configured, repeat the same procedure with the '''updated P00X index'''. (P002 and P003 for Vision System 2 ...)
 +
 
 +
=== 4. INFORM LANGUAGE ===
 +
 
 +
The Photoneo Yaskawa Module has been designed to be easily integrated into existing applications written as INFORM JOBS.
 +
 
 +
=== 4.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 the PHO_MAIN 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_CONNECT_TO_VC''' - function to establish a connection to the Vision Controller. Blocking function; suspends the program until a proper connection is established.  
Line 250: Line 295:
 
'''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_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_INIT_REQ''' - request to initialize the 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_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_START_REQ''' - request to start current calibration for the 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_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_SET_REQ''' - request to save current calibration result to the 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_CALIB_RESET_REQ''' - request to reset current calibration and remove all previously added points '''(Not supported in this version)'''
Line 267: Line 312:
  
  
'''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 #1:''' The '''PHO_CONNECT_TO_VC''' function should always be called as the first of all Photoneo Bin Picking API procedures. It should always be followed by the '''PHO_INIT_REQ''' function. Failure to do so 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.
+
'''NOTE #2:''' The '''PHO_WAIT_FOR_SCAN''' should 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 must be finished prior to any further steps. For example - '''PHO_SCAN_REQ''' followed by '''PHO_TRAJ_REQ''' results in communication error.
  
  
  
=== 3.2 INFORM CONFIG ===
+
=== 4.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.  
 
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.  
Line 280: Line 325:
 
==== 4.2.1 ROUTINES ====
 
==== 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_PICK_OBJECT''' - standard bin picking sequence. This flexible, operation-based implementation allows 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_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_ATTACH''' - implement function for attaching object to the gripper here   
  
- '''PHO_GRIPPER_DETACH''' - implement function for detaching object from 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_1''' - implement custom user gripper command (reserved for future use)
Line 305: Line 350:
  
  
=== 3.3 INFORM ERROR HANDLING ===
+
=== 4.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 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'''.  
Line 334: Line 379:
  
  
Photoneo Yaskawa Interface by default performs basic error handling immediately after the '''PHO_TRAJ_REQ''' call.  
+
Photoneo Yaskawa Interface by default performs basic error handling after the '''PHO_INIT_REQ''' call.  
  
 
If '''NOT_INIT''' or '''SERVICE_ERR''' occurs, the whole bin picking is reinitialized.  
 
If '''NOT_INIT''' or '''SERVICE_ERR''' occurs, the whole bin picking is reinitialized.  
 +
 +
 +
Photoneo Yaskawa Interface by default performs basic error handling after the '''PHO_WAIT_FOR_SCAN''' and '''PHO_TRAJ_REQ''' calls.
 +
 +
If '''NOT_INIT''' or '''SERVICE_ERR''' occurs, the entire bin picking sequence is reinitialized.
  
 
If '''PLANNING_FAILED''' or '''NO_PART_FOUND''' occurs, scanning is repeated.  
 
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.
 
  
=== 3.4 MAIN APPLICATION ===
+
'''Users should decide whether the existing error handling facility is sufficient for a particular application or whether it needs to be expanded!'''
 +
 
 +
=== 4.4 MAIN APPLICATION ===
  
'''PHO_MAIN''' program can be considered as a basic bin picking template. The main program loop with basic error handling is implemented here. The user can amend the details to meet their application requirements.   
+
The '''PHO_MAIN''' program can be considered as a basic bin picking template. The main program loop with basic error handling is implemented here. The user can amend the details to meet their application requirements.   
  
 
     NOP
 
     NOP
Line 378: Line 429:
 
         JUMP *TRAJ
 
         JUMP *TRAJ
 
     ENDIF
 
     ENDIF
 +
    ABORT
 
      
 
      
 
     'REQUEST TRAJ
 
     'REQUEST TRAJ
Line 411: Line 463:
 
     JUMP *MAIN
 
     JUMP *MAIN
 
     END
 
     END
 +
 +
 +
=== 5. Runtime ===
 +
 +
Ensure that your solution on the Deployment page of Bin Picking Studio is running and Bin Picking Status is in the '''Waiting for a Connection''' state as is shown in the figure below:
 +
 +
 +
[[File:Yaskawa 1 .png|frame|none|alt=Alt text| Figure 4.2]]
 +
 +
 +
Using the key pendant switch, set the Robot to AUTO Mode using the icon located in the top left corner.
 +
 +
'''Browse to '''JOB''' -> '''Select Job''' and choose the '''PHO_MAIN''' JOB.
 +
 +
Turn on the motor power with the SERVO ON button and press the '''GREEN Circle button''' to start the application
 +
 +
 +
[[File: 20190225132927.jpg|frame|none|alt=Alt text| Figure 4.1]]
 +
 +
 +
If the connection between the Robot Controller and the Vision Controller has been established correctly, the robot '''should move to the Home position''' and the Bin picking status should show: '''Connected'''
 +
 +
 +
[[File:Yaskawa 2 .png|frame|none|alt=Alt text| Figure 4.4]]
 +
 +
 +
As soon as the trajectory to the first localized object is received, the robot should start executing the motion. Stop the JOB using '''WHITE Circle button'''.
 +
 +
 +
'''NOTE: Ensure that you are prepared to halt the motion execution immediately if any problem arises. It is strongly recommended to reduce the speed to 10% of maximum during initial bin picking tests.'''
 +
 +
=== 5.1 Restarting the Application ===
 +
 +
After stopping the application using the '''WHITE Circle''' or '''Emergency Button''' it is necessary to run the '''PHO_RECOVER JOB''' to ensure that the connection to the Bin Picking Studio has closed properly and that all important flags have been cleared.
 +
 +
Browse to '''JOB''' -> '''SELECT JOB''' and search for '''PHO_RECOVER''' JOB. Turn '''SERVO ON''' and start the program using the '''GREEN Circle button'''. 
 +
 +
 +
[[File:Recover select.jpg|frame|none|alt=Alt text| Figure 5.1.1]]
 +
 +
 +
When the program finishes, '''Disconnected from VC''' alarm message should appear on the pendant:
 +
 +
 +
[[File:Desirable outcome recover.jpg|frame|none|alt=Alt text| Figure 5.1.2]]
 +
 +
 +
This means that the connection to the Bin Picking Studio has been closed properly, all flags are cleared and the system is ready for a new connection.

Latest revision as of 08:41, 6 May 2019

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 not currently supported but support for these version is 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 and YRC1000 Controller with the following firmware version:


Alt text
Figure 1.0.1

2. Yaskawa Controller Setup

2.1 Maintenance & Management Mode

Start the Robot Controller in a Maintenance Mode by holding the Main Menu button while turning the main switch on.

You should hear a short beep during the boot. The Maintenance Mode screen is shown in the figure below:


Alt text
Figure 2.1.1


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


Alt text
Figure 2.1.2


The password for accsessing Management Mode is 9999999999999999 (16x9):


Alt text
Figure 2.1.3


Nore the three keys in the top status bar - this indicates that - Management Mode is Active.

2.2 Set IP Address

Configure the IP address of the Robot Controller. In Maintenance Mode, browse to System -> Setup -> Option Functions:


Alt text
Figure 2.2.1


Select LAN Interface Setting to enter the Network Configuration pane:


Alt text
Figure 2.2.2


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


Alt text
Figure 2.2.3


NOTE: It is recommended to plug the Ethernet cable into the LAN2 port and to attempt to the ping Robot Controller from a PC to validate that the network has been set correctly.

2.3 Enable MotoPlus Functionality

If MotoPlus functionality it not already enabled on Robot Controller, browse to System -> Setup -> Option Functions

Switch MOTOPLUS Func State from NOT USED to USED.


Alt text
Figure 2.3.1


The MotoPlus APL icon should now become visible on the left pane.

Enter the MotoPlus Func. Settings and enable the MotoPlus autostart option:


Alt text
Figure 2.3.2


2.4 Load MotoPlus Application

The Photoneo Yaskawa Module ZIP Archive contains several JOB files and single PhotoneoBP_CONTROLLER_v_x_y_z.out file.

The OUT file is a MotoPlus binary and must be loaded to the Robot Controller in Maintenance Mode.

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


Alt text
Figure 2.4.1


Confirm the loading of the MotoPlus application by clicking YES:


Alt text
Figure 2.4.2


The Maintenance Mode section of the configuration process is now complete. Restart the Robot Controller into Normal Mode. If the configuration has been performed correctly, no errors should appear after the reboot.

3. Photoneo Yaskawa Module Setup

3.1 Copy INFORM JOBS to Robot Controller

As next step, copy all JOBS from INFORM Folder of the ZIP Archive to the Robot Controller. Use a USB stick or SD Card for the transfer.

Browse to Ex. Memory -> Load and select all available JOBS as is shown in the figure below:


Alt text
Figure 3.1.1


Hit Enter to start the transfer:


Alt text
Figure 3.1.2


All JOB files should now be available in the Robot Controller. Before proceeding further, it is important to understand the concept of variable mapping.

3.2 Variable Mapping

Photoneo Yaskawa Module occupies following data registers:

BYTE REGISTERS (FLAGS):

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


Alt text
Figure 2.6.1


INTEGER REGISTERS:

  • I000 - VC_IP_ADDRESS_1 - First Part of Vision Controller IP Address
  • I001 - VC_IP_ADDRESS_2 - Second Part of Vision Controller IP Address
  • I002 - VC_IP_ADDRESS_3 - Third Part of Vision Controller IP Address
  • I003 - VC_IP_ADDRESS_4 - Fourth Part of Vision Controller IP Address
  • I004 - VISION_SYSTEM_ID - Vision System ID
  • I005 - REQUEST_TYPE - Type of request which is currently being handled
  • I006 - RESPONSE_STATUS - Response status for the last request
  • I007 - NUM_OF_OPER - Number of executed operations of the current bin picking sequence
  • I008 - OPER_TYPE - Type of operation in execution
  • I009 - GRIPPER_ACTION - Type of gripper action in execution
  • I010 - TRAJ_SIZE - Size of trajectory in execution
  • I011 - TOOL_INVARIANCE - Tool Invariance for current pick
  • I012 - GRIP_POINT_ID - Gripping Point ID for current pick
  • I013 - GRIP_INVARIANCE - Gripping Point Invariance for current pick
  • I014 - I023 - INFO DATA 1-10 - Additional info data received from Bin Picking Studio
  • I024 - CUSTOMER REQUEST - Num of data for customer request
  • I025 - NEXT SOLUTION ID - ID of solution that should be activated by PHO_CHANGE_SOL_REQ
  • I030 - TRAJ_CURRENT - Current trajectory speed - this is set automatically by the MotoPlus application according to the content of I031-I040 registers
  • I031 - I040 - TRAJ_1_SPEED - TRAJ_10_SPEED - configuration of trajectory speed


Alt text
Figure 2.6.2


REAL REGISTERS:

  • R000 - CALIBRATION_ERROR (not supported in this version)
  • R001 - CUSTOMER_DATA_1 - data #1 to be sent as part of a customer request to the Vision Controller
  • R002 - CUSTOMER_DATA_2 - data #2 to be sent as part of a customer request to the Vision Controller
  • R003 - CUSTOMER_DATA_3 - data #3 to be sent as part of a customer request to the Vision Controller
  • R004 - CUSTOMER_DATA_4 - data #4 to be sent as part of a customer request to the Vision Controller


Alt text
Figure 2.6.3


POSITION REGISTERS:

  • P000 - Start Pose for Vision System 1
  • P001 - End Pose for Vision System 1
  • P002 - Start Pose for Vision System 2
  • P003 - End Pose for Vision System 2
  • P004 - Start Pose for Vision System 3
  • P005 - End Pose for Vision System 3
  • P006 - Start Pose for Vision System 4
  • P007 - End Pose for Vision System 4
  • P010 - P0110 - Reserved for trajectory execution

3.3 Setting IP Address of Vision Controller

Bin Picking Client running on the Robot Controller requires information about the IP Address of the Vision Controller in order to establish a successful connection.

Four integer registers (I000 - I003) are utilized for this purpose. Insert the current IP Address of Vision Controller here:


Alt text
Figure 3.3.1


Ports utilized by Photoneo Yaskawa Module:

  • - Bin Picking Client Port: 11003
  • - State Serer Port: 11004


3.4 Set User Frame

The Cartesian origin of Yaskawa robots is different to the Cartesian origin of robot models used in the Photoneo Bin Picking Studio.

In order to ensure successful calibration, it is necessary to apply a predefined offset in the Z axis in User Frame.

Press Robot -> User Frame and select the first frame from the list. Press Display -> User Coordinates


Alt text
Figure 3.4.1


Set Z axis offset according to the specific robot model and write the changes.


Alt text
Figure 3.4.2


3.5 Reteach Start and End Positions

A crucial step in bin picking configuration is the teaching of home, start, and end poses. The home position of the robot should be taught in such a way that the robot remains outside the scanning area. The start position should be taught in such a way that the robot gripper is approximately above the center of the bin. The end position can be similar to the start position or slightly shifted towards the placing area. Do not position the end pose too far from the bin as this might significantly affect dynamic trajectory planning, increase total planning time and cause planning errors.

The Home Pose can be modified directly in the PHO_MAIN program. Start and End positions must be stored in Position Registers and cannot be taught only as a local program position variable.

Yaskawa robots use PULSE notation for storing joint robot poses. The easiest way to copy these joint values to Position Registers is to use the PHO_TEACH_START_POSE and PHO_TEACH_END_POSE JOBS:


Alt text
Figure 3.5.1


Jog the robot to the Start Pose, modify the only MOVJ Command in the PHO_TEACH_START_POSE JOB using the MODIFY button and run the program. This procedure sets the current Joint Position to the P000 variable.

Repeat the same step with PHO_TEACH_END_POSE JOB to set the P001 variable. If more vision systems are to be configured, repeat the same procedure with the updated P00X index. (P002 and P003 for Vision System 2 ...)

4. INFORM LANGUAGE

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

4.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 the PHO_MAIN 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 the 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 the 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 the 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 the first of all Photoneo Bin Picking API procedures. It should always be followed by the PHO_INIT_REQ function. Failure to do so will result in a communication error.


NOTE #2: The PHO_WAIT_FOR_SCAN should 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 must be finished prior to any further steps. For example - PHO_SCAN_REQ followed by PHO_TRAJ_REQ results in communication error.


4.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 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)


4.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 after the PHO_INIT_REQ call.

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


Photoneo Yaskawa Interface by default performs basic error handling after the PHO_WAIT_FOR_SCAN and PHO_TRAJ_REQ calls.

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

If PLANNING_FAILED or NO_PART_FOUND occurs, scanning is repeated.


Users should decide whether the existing error handling facility is sufficient for a particular application or whether it needs to be expanded!

4.4 MAIN APPLICATION

The PHO_MAIN program can be considered as a basic bin picking template. The main program loop with basic error handling is implemented here. The user can amend the details to meet their application requirements.

   NOP
   'CONNECT TO VC
   *CONNECT
   CALL JOB:PHO_CONNECT_TO_VC
   
   'SEND INITIALIZE REQUEST
   *INIT
   CALL JOB:PHO_INIT_REQ
   'CHECK RESPONSE
   IFTHENEXP I006<>0
       ABORT
   ENDIF
   
   *SCAN
   'MOVE TO HOME POSE
   MOVJ C00000 VJ=I026
   'REQUEST FIRST SCAN
   CALL JOB:PHO_SCAN_REQ
   'INITIAL WAIT
   WAIT T=10.00
   
   'MAIN LOOP
   *MAIN
   'WAIT FOR SCAN
   CALL JOB:PHO_WAIT_FOR_SCAN
   'CHECK RESPONSE
   IFTHENEXP I006=1 OREXP I006=203 OREXP I006=255
       JUMP *INIT
   ENDIF
   IFTHENEXP I006=0  
       JUMP *TRAJ
   ENDIF
   ABORT
   
   'REQUEST TRAJ
   *TRAJ
   CALL JOB:PHO_TRAJ_REQ
   'IF ERROR THEN REINIT
   IFTHENEXP I006=1 OREXP I006=203 OREXP I006=255
       JUMP *INIT
   ENDIF
   'IF NO TRAJ THEN RESCAN
   IFTHENEXP I006=201 OREXP I006=202
       JUMP *RESCAN
   ENDIF
   
   'IF OK THEN CONTINUE
   IFTHENEXP I006=0
       'MOVE TO START POSE
       MOVJ P000 VJ=I026
       'PICK OBJECT 
       CALL JOB:PHO_PICK_OBJECT 
       'TRIGGER NEXT SCAN
       CALL JOB:PHO_SCAN_REQ
       'PLACE OBJECT
       CALL JOB:PHO_PLACE_OBJECT
       'JUMP BACK TO MAIN LOOP
       JUMP *MAIN
   ENDIF
   
   'NEXT SCAN
   *RESCAN
   CALL JOB:PHO_SCAN_REQ
   'JUMP BACK TO MAIN LOOP
   JUMP *MAIN
   END


5. Runtime

Ensure that your solution on the Deployment page of Bin Picking Studio is running and Bin Picking Status is in the Waiting for a Connection state as is shown in the figure below:


Alt text
Figure 4.2


Using the key pendant switch, set the Robot to AUTO Mode using the icon located in the top left corner.

Browse to JOB -> Select Job and choose the PHO_MAIN JOB.

Turn on the motor power with the SERVO ON button and press the GREEN Circle button to start the application


Alt text
Figure 4.1


If the connection between the Robot Controller and the Vision Controller has been established correctly, the robot should move to the Home position and the Bin picking status should show: Connected


Alt text
Figure 4.4


As soon as the trajectory to the first localized object is received, the robot should start executing the motion. Stop the JOB using WHITE Circle button.


NOTE: Ensure that you are prepared to halt the motion execution immediately if any problem arises. It is strongly recommended to reduce the speed to 10% of maximum during initial bin picking tests.

5.1 Restarting the Application

After stopping the application using the WHITE Circle or Emergency Button it is necessary to run the PHO_RECOVER JOB to ensure that the connection to the Bin Picking Studio has closed properly and that all important flags have been cleared.

Browse to JOB -> SELECT JOB and search for PHO_RECOVER JOB. Turn SERVO ON and start the program using the GREEN Circle button.


Alt text
Figure 5.1.1


When the program finishes, Disconnected from VC alarm message should appear on the pendant:


Alt text
Figure 5.1.2


This means that the connection to the Bin Picking Studio has been closed properly, all flags are cleared and the system is ready for a new connection.