YASKAWA Robot Communication Program Guide

  • This document applies to EpicPro v1.3.0 and later with YASKAWA robots.

Communication Logic

For the detailed interface communication flow and command specification, see Interface Communication Command Description.

Loading the Robot Programs

Before importing the communication programs, it is strongly recommended to make a full backup of all existing robot programs to avoid data loss.

Preparation

  1. Make sure the YASKAWA robot has the Ethernet function enabled.

  2. Make sure the YASKAWA controller has MotoPlus enabled.

  3. Download the following files:

  4. Extract JBI.rar, then copy the JBI folder and the .out files to the root directory of a USB drive.

  5. Insert the USB drive into the USB port on the back of the teach pendant.

Burning Programs

Burning OUT Files

  1. Enter maintenance mode:

    1. DX200: Power off the controller, hold the Main Menu key on the pendant, and power on to enter maintenance mode.

    2. YRC1000: From the menu, choose System Information → CPU Reset, select Maintenance Mode, then reset; the robot restarts into maintenance mode.

  2. In maintenance mode, choose System → Safety Mode → Management Mode and enter the management password (default: sixteen `9`s).

  3. From the main menu choose MotoPlus Application → Device → USB: Programming Pendant.

  4. Choose MotoPlus Application → Install (User Application).

  5. Select Transfer_yrc1000.out (or the appropriate OUT file) and press ENTER, then choose Yes to install.

  6. Before burning any OUT program, make sure there is no other user application installed; if present, back it up first.

  7. After installation, choose MotoPlus Application → File List and confirm that Transfer_yrc1000.out appears in the list, indicating successful installation.

  8. When the background program is installed, restart the controller (DX200: power switch; YRC1000: CPU Reset) to enter online mode.

Burning JBI Files

  1. In online mode, from the main menu choose System Information → Safety Mode.

  2. In the drop‑down, select Management Mode, enter the password (default: sixteen `9`s), and press ENTER.

  3. Open Settings → Teaching Conditions, and set the Language Level to Extended.

  4. Open External Memory → Device and select USB: Programming Pendant.

  5. Open External Memory → Folder, then select and enter the JBI folder.

  6. Open External Memory → Install, choose Program, and wait for the list of programs to appear.

  7. In the program list, choose Edit → Select All to select all JBI programs.

  8. Press ENTER and choose Yes in the confirmation dialog to complete installation.

  9. After installation, open Program Content → Select Program to view the list of installed programs. If all JBI programs are present, installation was successful.

Robot Interface Commands

Standard Commands

Trigger Image Capture

TF_Trigger (String CAMERA_ID)

// Example: CALL JOB:TF_Trigger("1;2")
// Parameter: CAMERA_ID - string camera ID, for example "1";
//            to trigger two cameras in the same workspace, you can pass "1;2".
// Function: Sends 110, CAMERA_ID to trigger image capture.

Switch Object in Workspace

TF_SwitchSpace (INT spaceId, INT objectId)

// Example: CALL JOB:TF_SwitchSpace(2,5)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID.
// Function: Sends 130, spaceId, objectId to switch the active object.

Robot Capture Pose (Eye-in-Hand)

TF_EIH_SetPose (String CAMERA_ID, INT ToolNum)

// Example: CALL JOB:TF_EIH_SetPose("1",2)
// Parameters: CAMERA_ID - string camera ID; ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 140, CAMERA_ID, current robot capture pose
//           under the specified tool.

Detection (No Retreat Path)

TF_Detector (INT VisionPoseNum)

// Example: CALL JOB:TF_Detector(10)
// Parameter: VisionPoseNum - required number of vision poses / grasp points.
// Function: Triggers detection and sends 120 with grasp count and 0 for retreat count.

Detection with Retreat Path

TF_RetreatDetector (INT GraspCount, INT RetreatCount)

// Example: CALL JOB:TF_RetreatDetector(10,5)
// Parameters: GraspCount  - number of grasp path points;
//             RetreatCount - number of retreat path points.
// Function: Triggers detection and sends 120 with grasp path count and retreat path count.

Restart Vision Software

TF_ResetEpicPro ()

// Example: CALL JOB:TF_ResetEpicPro
// Function: Restarts the EpicPro vision software.

Reboot IPC

TF_Reboot ()

// Example: CALL JOB:TF_Reboot
// Function: Reboots the industrial PC.

Quick Commands

Quick Detection (No Retreat Path)

TF_FastDetector (INT VisionPoseNum)

// Example: CALL JOB:TF_FastDetector(3)
// Parameter: VisionPoseNum - required number of vision poses / grasp points.
// Function: Performs capture and detection, sending 220 with grasp count and 0 for retreat count.

Quick Detection with Retreat Path

TF_FastRetreatDetector (INT GraspCount , INT RetreatCount)

// Example: CALL JOB:TF_FastRetreatDetector(4,6)
// Parameters: GraspCount  - number of grasp path points;
//             RetreatCount - number of retreat path points.
// Function: Performs capture and detection, sending 220 with grasp path count and retreat path count.

Capture + Robot Capture Pose (Eye-in-Hand)

TF_EIH_FastTrigger (String CAMERA_ID, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastTrigger("1",3)
// Parameters: CAMERA_ID - string camera ID; ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 240, CAMERA_ID, current robot capture pose
//           under the specified tool.

Capture + Robot Capture Pose + Detection (No Retreat, Eye-in-Hand)

TF_EIH_FastDetector (String CAMERA_ID, INT VisionPoseNum, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastDetector("1",6,2)
// Parameters: CAMERA_ID - string camera ID; VisionPoseNum - required number of vision poses; ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 250 to quickly trigger detection.

Capture + Robot Capture Pose + Detection with Retreat Path (Eye-in-Hand)

TF_EIH_FastRetreatDetector (String CAMERA_ID, INT GraspCount, INT RetreatCount, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastRetreatDetector("1",10,10,1)
// Parameters: CAMERA_ID - string camera ID;
//             GraspCount, RetreatCount - number of approach and retreat path points;
//             ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 250 to quickly trigger detection with approach + retreat paths.

Switch Object in Workspace + Capture

TF_FastSwitchTrigger (INT spaceId, INT objectId, String CAMERA_ID)

// Example: CALL JOB:TF_FastSwitch(2,3,"1")
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID.
// Function: Sends 310 to quickly switch object + capture.

Switch Object in Workspace + Capture + Detection (No Retreat)

TF_FastSwitchDetector (INT spaceId, INT objectId, String CAMERA_ID, INT VisionPoseNum)

// Example: CALL JOB:TF_FastSwitchDetector(2,3,"1",5)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID;
//             VisionPoseNum - required number of vision poses.
// Function: Sends 320 to quickly switch object + capture + detection.

Switch Object in Workspace + Capture + Detection with Retreat Path

TF_FastSwitchRetreatDetector (INT spaceId, INT objectId, String CAMERA_ID,
                              INT GraspCount, INT RetreatCount)

// Example: CALL JOB:TF_FastSwitchRetreatDetector(2,3,"1",5,5)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID;
//             GraspCount - number of approach path points; RetreatCount - number of retreat path points.
// Function: Sends 320 to quickly switch object + capture + detection with retreat path.

Switch Object in Workspace + Capture + Robot Capture Pose (Eye-in-Hand)

TF_EIH_FastSwitchTrigger (INT spaceId, INT objectId, String CAMERA_ID, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastSwitchTrigger(2,3,"1",1)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID;
//             ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 340 to quickly switch object + capture + robot capture pose
//           under the specified tool.

Switch Object in Workspace + Capture + Robot Capture Pose + Detection (No Retreat, Eye-in-Hand)

TF_EIH_FastSwitchDetector (INT spaceId, INT objectId, String CAMERA_ID, INT VisionPoseNum, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastSwitchDetector(3,1,"1",10,3)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID;
//             VisionPoseNum - required number of vision poses; ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 350 to quickly switch object + capture + robot capture pose + detection.

Switch Object in Workspace + Capture + Robot Capture Pose + Detection with Retreat Path (Eye-in-Hand)

TF_EIH_FastSwitchRetreatDetector (INT spaceId, INT objectId, String CAMERA_ID,
                                  INT GraspCount, INT RetreatCount, INT ToolNum)

// Example: CALL JOB:TF_EIH_FastSwitchRetreatDetector(3,1,"1",10,10,1)
// Parameters: spaceId - workspace ID; objectId - grasp configuration ID; CAMERA_ID - string camera ID;
//             GraspCount - number of approach path points; RetreatCount - number of retreat path points;
//             ToolNum - tool number.
// Function: In eye-in-hand scenarios, sends 350 to quickly switch object + capture + robot capture pose
//           with detection and retreat path.

Function API Description

Initialize Communication

TF_INT_SOCKET (String IP, INT PORT, INT TIMEOUT)

// Example: CALL JOB:TF_INT_SOCKET("192.168.33.66",5700,30)
// Parameters: IP - string IP address; PORT - port number; TIMEOUT - receive timeout.
// Function: Initializes the communication channel.

Connect

TF_CON_SOCKET()

// Function: Connects to the EpicPro vision software.

Close Connection

TF_CLOSE_SOCKET()

// Function: Disconnects from the EpicPro vision software.

Upload Calibration Pose

TF_Calibration(INT ToolNum)

// Example: CALL JOB:TF_Calibration(2)
// Parameter: ToolNum - tool number.
// Function: During calibration, uploads the current robot pose under the specified tool.

Get EpicPro Data

TF_GETPOSE(INT PNUM, INT ToolNum)

// Example: CALL JOB:TF_GETPOSE(15,3)
// Parameters: PNUM - P variable index; ToolNum - tool number.
// Function: Retrieves Cartesian coordinates output from EpicPro into the specified P variable,
//           using the given tool number.

Get EpicPro Status Code

TF_GetStatus(INT RNUM)

// Example: CALL JOB:TF_GetStatus(20)
// Parameter: RNUM - I/O (integer) variable index.
// Function: Retrieves EpicPro status code into the specified I variable.

Generic Send

TF_Send(String SendStr )

// Example: CALL JOB:TF_Send("1234567890")
// Parameter: SendStr - string payload. `;` can be used as a separator,
//           which is internally converted to `,` when sent to EpicPro.
// Function: Sends a custom string from the robot to EpicPro.

Sample Programs

Four basic usage scenarios are provided below.

Eye-to-Hand, Ordered Pick Scenario

0000    NOP
0001    CALL JOB:TF_INT_SOCKET("192.168.33.66",5700,20)     // Communication initialization
0002    PAUSE
0003    SUB P014 P014                                       // Initialize P014
0004    SETE P014 (3) 100000                                // Set 100 mm offset on Z for P014
0005    CALL JOB:TF_CON_SOCKET                              // Connect to EpicPro
0006    CALL JOB:TF_FastSwitchTrigger(1,1,"1")              // Switch space 1, object 1, trigger camera 1
0007    CALL JOB:TF_GetStatus(20)                           // Get status of previous command
0008    IF( IO20=0 ) THEN                                   // If abnormal, handle accordingly
0009        PAUSE                                           // Add error‑handling logic here, e.g. re-trigger
0010    ENDIF
0011    CALL JOB:TF_Detector(1)                             // Trigger detection; one grasp point
0012    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0013    IF( IO20=0 ) THEN                                   // If abnormal, handle accordingly
0014        PAUSE                                           // Add error‑handling logic here
0015    ENDIF
0016    CALL JOB:TF_GETPose (15,1)                          // Get pose into P015 with tool 1
0017    SFTON P014
0018    01 MOVL P015 V=10.0 PL=0                            // Offset 100 mm along tool Z using P014
0019    SFTOF
0020    01 MOVL P015 V=10.0 PL=0                            // Move to grasp pose
0021    CALL JOB:TF_CLOSE_SOCKET                            // Close communication (optional)
0022    END

Eye-to-Hand, Path Planning Scenario

0000    NOP
0001    CALL JOB:TF_INT_SOCKET("192.168.33.66",5700,20)     // Communication initialization
0002    PAUSE
0005    CALL JOB:TF_CON_SOCKET                              // Connect to EpicPro
0006    CALL JOB:TF_FastSwitch(1,1,"1")                     // Switch space 1, object 1, trigger camera 1
0007    CALL JOB:TF_GetStatus(20)                           // Get status of previous command
0008    IF(IO20=0)THEN                                      // If abnormal, handle accordingly
0009        PAUSE                                           // Add error‑handling logic here
0010    ENDIF
// Planning case 1: only plan the approach path.
0011    CALL JOB:TF_Detector(5)                             // Plan a grasp path with 5 points (5th is grasp pose)
0012    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0013    IF( I020=0 ) THEN                                   // If abnormal, handle accordingly
0014        PAUSE                                           // Add error‑handling logic here
0015    ENDIF
// Planning case 2: plan both approach and retreat paths.
0016    CALL JOB:TF_RetreatDetector (5,10)                  // Approach path: 5 points; retreat path: 10 points
0017    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0018    IF( I020=0 ) THEN                                   // If abnormal, handle accordingly
0019        PAUSE                                           // Add error‑handling logic here
0020    ENDIF
0021    CALL JOB:TF_GET_POSE (15,1)                         // Get poses into P[15...] with tool 1
// Depending on EpicPro settings, choose Cartesian or joint execution.
// Cartesian:
0022    IF( I021=0 ) THEN
0023        FOR I089 = 15 TO 18
0024 01        MOVL P[I089] V=10.0 PL=5
0025        NEXT I089
0026 01     MOVL P019 V=10.0 PL=0
0027        PAUSE                                           // Insert gripper‑close operation here
0028        FOR I089 = 20 TO 29
0029 01        MOVL P[I089] V=10.0 PL=5
0030        NEXT I089
0031    ENDIF
// Joint:
0032    IF( I021=1 ) THEN
0033        FOR I089 = 15 TO 18
0034 01         MOVJ P[I089] VJ=0.67 PL=5
0035        NEXT I089
0036 01     MOVJ P019 VJ=0.67 PL=0
0037        PAUSE                                           // Insert gripper‑close operation here
0038        FOR I089 = 20 TO 29
0039 01         MOVJ P[I089] VJ=0.67 PL=5
0040        NEXT I089
0041    ENDIF
0042    CALL JOB:TF_CLOSE_SOCKET                            // Close communication (optional)
0043    END

Eye-in-Hand, Ordered Pick Scenario

0000    NOP
0001    CALL JOB:TF_INT_SOCKET("192.168.33.66",5700,20)     // Communication initialization
0002    PAUSE
0003    SUB P014 P014                                       // Initialize P014
0004    SETE P014 (3) 100000                                // Set 100 mm offset on Z for P014
0005    CALL JOB:TF_CON_SOCKET                              // Connect to EpicPro
0006    CALL JOB:TF_EIH_FastSwitchTrigger(1,1,"1",1)        // Switch space 1, object 1, send pose (tool 1), trigger camera 1
0007    CALL JOB:TF_GetStatus(20)                           // Get status of previous command
0008    IF( IO20=0 ) THEN                                   // If abnormal, handle accordingly
0009        PAUSE                                           // Add error‑handling logic here
0010    ENDIF
0011    CALL JOB:TF_Detector(1)                             // Trigger detection; one grasp point
0012    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0013    IF( IO20=0 ) THEN                                   // If abnormal, handle accordingly
0014        PAUSE                                           // Add error‑handling logic here
0015    ENDIF
0016    CALL JOB:TF_GETPose (15,1)                          // Get pose into P015 with tool 1
0017    SFTON P014
0018    01 MOVL P015 V=10.0 PL=0                            // Offset 100 mm along tool Z using P014
0019    SFTOF
0020    01 MOVL P015 V=10.0 PL=0                            // Grasp pose
0021    CALL JOB:TF_CLOSE_SOCKET                            // Close communication (optional)
0022    END

Eye-in-Hand, Path Planning Scenario

0000    NOP
0001    CALL JOB:TF_INT_SOCKET("192.168.33.66",5700,20)     // Communication initialization
0002    PAUSE
0005    CALL JOB:TF_CON_SOCKET                              // Connect to EpicPro
0006    CALL JOB:TF_EIH_FastSwitchTrigger(1,1,"1",1)        // Switch space 1, object 1, send pose (tool 1), trigger camera 1
0007    CALL JOB:TF_GetStatus(20)                           // Get status of previous command
0008    IF(IO20=0)THEN                                      // If abnormal, handle accordingly
0009        PAUSE                                           // Add error‑handling logic here
0010    ENDIF
// Planning case 1: only plan the approach path.
0011    CALL JOB:TF_Detector(5)                             // Plan a grasp path with 5 points
0012    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0013    IF( I020=0 ) THEN                                   // If abnormal, handle accordingly
0014        PAUSE                                           // Add error‑handling logic here
0015    ENDIF
// Planning case 2: plan both approach and retreat paths.
0016    CALL JOB:TF_RetreatDetector (5,10)                  // Approach path: 5 points; retreat path: 10 points
0017    CALL JOB:TF_GetStatus (20)                          // Get status of previous command
0018    IF( I020=0 ) THEN                                   // If abnormal, handle accordingly
0019        PAUSE                                           // Add error‑handling logic here
0020    ENDIF
0021    CALL JOB:TF_GET_POSE (15,1)                         // Get poses into P[15...] with tool 1
// Depending on EpicPro settings, choose Cartesian or joint execution.
// Cartesian:
0022    IF( I021=0 ) THEN
0023        FOR I089 = 15 TO 18
0024 01        MOVL P[I089] V=10.0 PL=5
0025        NEXT I089
0026 01     MOVL P019 V=10.0 PL=0
0027        PAUSE                                           // Insert gripper‑close operation here
0028        FOR I089 = 20 TO 29
0029 01        MOVL P[I089] V=10.0 PL=5
0030        NEXT I089
0031    ENDIF
// Joint:
0032    IF( I021=1 ) THEN
0033        FOR I089 = 15 TO 18
0034 01         MOVJ P[I089] VJ=0.67 PL=5
0035        NEXT I089
0036 01     MOVJ P019 VJ=0.67 PL=0
0037        PAUSE                                           // Insert gripper‑close operation here
0038        FOR I089 = 20 TO 29
0039 01         MOVJ P[I089] VJ=0.67 PL=5
0040        NEXT I089
0041    ENDIF
0042    CALL JOB:TF_CLOSE_SOCKET                            // Close communication (optional)
0043    END

Calibration

0000    NOP
0001    CALL JOB:TF_INT_SOCKET("192.168.33.66",5800,20)     // Initialize reporting channel for calibration
0002    CALL JOB:TF_CON_SOCKET                              // Connect to EpicPro
0003    *LABEL
0004    CALL JOB:TF_Calibration(0)                          // Upload current pose under tool 0
0005    PAUSE
0006    JUMP *LABEL
0007    END