Locator Tutorial: Setting up Locator to work with YASKAWA robots

From 3D scanning Knowledge base - Photoneo wiki
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 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 into a Maintenance Mode by holding the Main Menu button while turning the main switch on.

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

Alt text
Figure 2.1.1

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

Alt text
Figure 2.1.2

Password to management mode is 9999999999999999 (16x9):

Alt text
Figure 2.1.3

Notice three keys in the top status bar - this means - 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 Ethernet cable to the LAN2 port and try to ping Robot Controller from a PC to validate proper network configuration.

2.3 Enable MotoPlus Functionality

If MotoPlus functionality has not been enabled on robot controller before, browse to System -> Setup -> Option Functions

Switch MOTOPLUS Func State from NOT USED to USED.

Alt text
Figure 2.3.1

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

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

Alt text
Figure 2.3.2

2.4 Load MotoPlus Application

ZIP Archive of Photoneo Yaskawa Locator Module contains several JOB files and single PhotoneoLocatorModule.out file.

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

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

NOTE: If another MotoPlus application has been previously loaded to the controller, it must be deleted before loading PhotoneoLocatorModule.out file!

Alt text
Figure 2.4.1

Confirm loading the MotoPlus application by clicking YES:

Alt text
Figure 2.4.2

Maintenance mode part of the configuration is finished now. Restart the Robot Controller into Normal Mode. No error should appear after the reboot.

3. Photoneo Yaskawa Module Setup

3.1 Copy INFORM JOBS to Robot Controller

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

Browse to Ex. Memory -> Load and select all available JOBS as 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 are now available in the Robot Controller. Before proceeding further, it is important to understand variable mapping.

3.2 Variable mapping

Photoneo Yaskawa Module occupies following data registers:


  • B000 - CONNECT_TO_VC - flag set by INFORM JOB to issue 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

Alt text
Figure 6.2.1


  • 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 - LOCATOR_PORT - Locator Port as configured in Locator GUI
  • I005 - TOOL_ID - TCP ID which should be used for picking
  • I007 - LOCATOR_STATUS - The result of last trigger OK/TIMEOUT/ERROR
  • I008 - NUM_OF_REQ_TAR - Number of targets requested by Locator
  • I009 - NUM_OF_REC_TAR - Number of targets localized and transfered by Locator
  • I010 - CURRENT_PICK_ID - Used only in multiple result mode as a counter of picked objects

Alt text
Figure 6.2.2


  • P000 - Approaching offet value - this register defines the fixed approach pose offset with respect to the current target. Usually, only Z value is being used.
  • P001 - P099 - Reserved for Locator results (Cartesian Data in BASE coordinate)
  • P100 - Used for calculating approach pose for current pick (P000 + P00X)

Alt text
Figure 6.2.2

3.3 Setting IP Address of Locator

Locator Client running on the robot controller requires information about the IP Address of Vision Controller (Locator Server) in order to establish a successful connection.

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

Alt text
Figure 3.3.1

4. Calibration

Robot Camera Calibration is a crucial step in Locator configuration. Accurate calibration guarantees that object positions will be calculated directly in Robot Base coordinates.

4.1 Frame configuration =

Users are strongly recommended to use zero Tool and User Frames for calibration.

NOTE: If you are not able to change the configuration of the frames even in Management Mode, you might need to switch to Safety mode password is 5555555555555555 (16x5)

Browse to Robot -> Tool and select or set the tool with zero configuration.

Alt text
Figure 4.1.2

Please ensure that the correct Tool is selected. Press Shift + Coord to enter the Tool Selection Menu:

Alt text
Figure 4.1.3

Similar to the Tool Setting, please ensure that the currently active User Frame is set to all zeros.

Browse to Robot -> User Frames and select or set the first User Frame from the list. Hit Display -> Display User Coordinates and set all values to zero.

Yaskawa Setting Up Locator Guide User Coordinate.png

You are now ready to start the extrinsic calibration procedure.

4.2 Extrinsic calibration

Mount the Scanner firmly, ensure that the scene is properly captured from the final position and start the Photoneo Robot Camera Calibrator:

Alt text
Figure 4.1.1

Connect to the Scanner, select XYZ EXTRINSIC (Standard for YASKAWA robots), adjust the Sphere radius (21.75 mm in this case/ 20.00 mm for a standard ping-pong ball) and set the Min visible parameter to 40%:

Alt text
Figure 4.1.4

Attach a ping-pong ball to the gripper and jog the robot to the first position (usually the nearest corner of the bin/ area of interest).

To get current robot tool position, browse to Robot -> Current Position . Ensure that the correct tool number is visible in the top right corner

Alt text
Figure 4.1.5

Input the X,Y,Z [mm] and Rx, Ry, Rz [deg] values of the current position to the first line of the point list and repeat the same procedure for at least 7 more points.

The recommended procedure is to cover the four corners + four positions in the center of the scanning volume.

Change the orientation of the tool in all axes to achieve a wider range of input values. Press the Compute button once you have added the final point.

For successful calibration, the Final Error per point should not exceed 2-3 mm. (0.8379 in this example).

Alt text
Figure 4.1.6

If the final error value is too high, try adding more points or start the calibration from the beginning again. Increasing the orientation of the tool can help to reduce the final error value.

Once you are satisfied with the results, press the Set Matrix to PhoXi button to store the results to the PhoXi Scanner.

Alt text
Figure 4.1.7

Do not forget to switch the Coordinate Space in PhoXi Control after calibration has been completed successfully:

Alt text
Figure 4.1.8

In addition to the Robot - Camera transformation matrix, the calibration process also calculates a Calibration Sphere Misplacement vector which denotes the transformation between the selected Tool, and the center of the sphere (the ping-pong ball). This information can be used for calibration verification.

Set the YASKAWA Tool coordinates according to the Misplacement Vector as calculated in the calibration process.

This is done in the TOOL menu. Ensure that the ping-pong ball has not moved since

Browse to Robot -> Tool and insert misplacement vector into one of the frames, tool CALIBRATION was created for this purspose here.

Alt text
Figure 4.1.9

Save the changes, switch the tool to the newly configured one, jog the robot to the center of the scanning volume and select the Test button in the Photoneo Robot Camera Calibration Tool:

Alt text
Figure 4.1.10

Compare the position of the ball calculated in the Robot Transformation Coordinate Space with the POSITION of TOOL[1] in the WORLD frame.

Alt text
Figure 4.1.11

The values calculated by the Photoneo Robot Camera Calibration Tool, and current robot tool position, should approximately match.

4.3 Tool Calibration

The misplacement vector calculated during the robot camera calibration process determines the center of the calibration ball with respect to the Tool Frame selected during calibration. This is a convenient method for validating the calibration, but in practice, the real gripping point is usually different from the center point of the calibration ball. In order to ensure successful picking, the robot tool should also be calibrated. The most commonly used method of achieving this, is to use the built-in YASKAWA calibration tools. The following section demonstrates tool calibration using the Coord method.

Switch to Maintenance or Safety Mode if needed and select Robot -> Tool and pick a tool which you want to calibrate:

Alt text
Figure 4.2.1

Select Utility -> Calibration from top menu. A calibration screen should appear:

Alt text
Figure 4.2.2

Select TC1 Point for and Jog a robot to the first calibration pose. Press Modify + Enter to teach the first position.

Repeat the same step with all 5 TC calibration poses. Ensure that the orientation variance is sufficient.

Alt text
Figure 4.2.3

After all 5 poses have been taught, press Complete to calculate the calibration result. It should immediately appear in a tool config window.

Alt text
Figure 4.2.4

5. Runtime

5.1 Reteach Application poses

Once the Robot-Camera and Tool calibration processes have been completed, you can proceed to re-teaching the application poses.

Prior to starting this process, please ensure that you have selected the correct Robot Tool.

Following poses in JOBS listed below needs to be modified to fit user application:

  • - PHO_MAIN_SINGLE.JB - Reteach Home Position Here
  • - PHO_PICK_TARGET - Reteach Start and Out Of Scanning Poses here
  • - PHO_PLACE_TARGET - Reteach all poses here and ajdust logic if needed

Alt text
Figure 5.1.1

Avoid using P000- P100 Registers when teaching poses; these are intended to perform motion commands towards the targets received from Locator!

5.2 Set Approach Point Offset

Approach point offset is configured by P000 Register. Usually, only Z value is set.

The configuration shown in the figure below defines that the robot will approach the target in the vertical axis from 100mm:

Alt text
Figure 6.2.2

5.3 Run Locator

You are now ready to run the program. Switch to AUTO mode and select 10% speed override; this option is recommended for safety reasons.

Ensure that you are ready to stop the motion execution immediately if something goes wrong.

Select the PHO_MAIN_SINGLE/PHO_MAIN_MULTIPLE program or another program which you have prepared your own.

Alt text
Figure 5.2.1

If Locator is in the Waiting for Connection... state, press the Green Circle button to start the application:

Alt text
Figure 5.2.2

If everything is working correctly, you should see that the scan has been triggered, the result from Locator has been transmitted to the Robot Controller and the robot is approaching the object.

5.4 Restarting the application

After stopping the application by WHITE Circle or Emergency Button, or starting a new job while the old one is in progress, it is necessary to run PHO_DISCONNECT JOB to ensure that the connection to the Locator is closed properly and all important flags are cleared. Otherwise, the robot may act upon old and incorrect information from Locator.

Alt text
Figure 5.3.1

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

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

Alt text
Figure 5.3.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.


The Locator Yaskawa module is a combination of the MotoPlus background routine and several INFORM Jobs.

  • - LocatorModule_v_X_Y_Z.out - handles communication with Locator and feeds position registers with received data
  • - PHO_MAIN_SINGLE.JB - is a basic template for using Locator Yaskawa Module in the Single Result Mode - Reteach Home Position Here
  • - PHO_MAIN_MULTIPLE.JB - is a basic template for using Locator Yaskawa Module in the Multiple Result Mode - - Reteach Home Position Here
  • - PHO_GRIPPER_ATTACH.TP - users should assign commands required for attaching object to the gripper to this function
  • - PHO_GRIPPER_DETACH.TP - users should assign commands required for detaching object from gripper to this function
  • - PHO_PICK_TARGET - routine to pick a target from a position according to the value in I010 - Current Pick ID - Reteach Start and Out Of Scanning Poses here
  • - PHO_PLACE_TARGET - routine to place target to predefined position - Reteach all poses here
  • - PHO_CONNECT_TO_VC - internal routine for establishing connection to Locator Server running on Vision Controller
  • - PHO_DISCONNECT - JOB which forces MotoPlus Background routine to disconnect from Locator Server running on Vision Controller
  • - PHO_SINGLE_SCAN_REQ - internal routine to trigger a single result mode scan
  • - PHO_MULTIPLE_SCAN_REQ - internal routine to trgiire a multiple result mode scan - value from I008 is transfered to the Locator
  • - PHO_WAIT_FOR_SCAN - internal routine to wait for a result from Locator

=== 6.1 Main

The following code is the content of the PHO_MAIN_SINGLE.JBI. As can be seen in the figure below, issues a command to establish a connection with Locator Server to MotoPlus Routine running in the background. As soon as the connection has been established, a Single Result Mode Trigger is sent to Locator. Locator initializes scanning and localization and if a result is found it is sent back to the Yaskawa robot. The MotoPlus routine inputs Cartesian Data received from Locator to P001[PHO_TARGET_01] and sets I003[REQ_FINISHED] flag to ON. PHO_MAIN_SINGLE Job is waiting for I003[REQ_FINISHED]; immediately after it is set to ON it performs the motion to the received target. The offset from PR000[PHO_APPR_OFF] is applied to approaching and de-approaching points. After finalizing the placing, the scan is repeated. In Multiple Result Mode, the scan is repeated after picking all of the received targets.

   MOVJ C00000 VJ=40.00
       JUMP *PICK
       JUMP *SCAN
   SET I010 1

6.2 Communication protocol

Following figures explain Locator-YASKAWA communication protocol in both Single and Multiple Result Modes:

Locator YASKAWA Single Result Mode.png

Locator YASKAWA Multiple Result Mode.png