Writing your first Program

After installing the controller, robot, and Epson RC+ 8.0 software on the RC700 Robot Controller, follow these instructions to create a simple application program so that you will become more familiar with the Epson RC+ 8.0 development environment.

  1. Double-click the  [Epson RC+ 8.0] icon on the desktop to start Epson RC+ 8.0.

  2. The New command is used to create a new Epson RC+ 8.0 project.

    1. In the Epson RC+ 8.0 menu, select [Project]-[New Project]. The [New Project] dialog box will appear.

    2. Type in a name for a project in the [New Project Name] box. e.g. FirstApp

    3. Click the [OK] button to create the new project.

    When the new project is created, a program called "Main.prg" is created.

    You will see the "Main.prg" window open with a cursor flashing in the upper left corner. Now you are ready to start entering your first program.

  3. Edit the program.

    Type in the following program lines in the "Main.prg" edit window.

    Function main
      Print "This is my first program."
    Fend
    

  4. Run the program.

    1. In the Epson RC+ 8.0 menu, select [Run]-[Run Window] (F5 is the shortcut).

      The [Status] window showing the build operation status will appear.

    2. During project build, your program is compiled and linked. Then communications is established with the controller and project files are sent to the controller. If there are no errors during build, the [Run] window will appear.

    3. Click the [Start] button on the [Run] window to run the program. You will be prompted to confirm the operation. Click the [Yes] button.

    4. The following tasks will appear in the [Status] window:

      > Task main started

      > All tasks stopped

    The statement output will appear on the [Run] window.

Now let's teach some robot points and modify the program to move the robot.

  1. Teach robot points

    1. Ensure that it is safe to operate the robot.

    2. Click the  [Robot Manager] button on the toolbar to display the [Robot Manager] window.

    3. Click the [Motor: Off] button at the top of the [Robot Manager] window to turn the motor on.

    4. You will be prompted to confirm the operation. Click the [Yes] button.

    5. Click the [Jog & Teach] tab.

    6. Teach P0. Click the [Teach] button. You will be prompted to enter a point label and comment.

    7. Click the [+Y] button to incrementally jog the robot in the +Y direction. Hold the button down to continue jogging. Let go when the robot is about half way out in the work envelope.

    8. Click the [-Z] button to jog the robot down the robot’s Z-axis.

    9. In the [Point] box, select “P1”.

    10. Click the [Teach] button. You will see a confirmation message to teach the point.

    11. Click the [Yes] button. The current point is set to P1.

    12. Click the [+X] button to incrementally jog the robot in the +X direction.

    13. In the [Point] box, select “P2”.

    14. Click the [Teach] button. You will see a confirmation message to teach the point.

    15. Click the [Yes] button. The current point is set to P2.

    16. Click the  [Save all files] button on the toolbar to save the changes.

  2. Modify the program to include robot motion commands

    1. Insert three new Go statements into the Main.prg program as shown below:

      Function main
        Print "This is my first program."
        Motor On
        Go P1
        Go P2
        Go P0
      Fend
      
    2. Press F5 to display the [Run] window.

    3. Click on the [Start] button to run the program.

      The robot should move to each of the points you taught.

  3. Modify the program to change speed of robot motion commands

    1. Insert the Power, Speed, and Accel commands as shown in the program below:

      Function main
        Print "This is my first program."
        Motor On
        Power High
        Speed 20
        Accel 20, 20
        Go P1
        Go P2
        Go P0
      Fend
      
    2. Press F5 to display the [Run] window.

    3. Click on the [Start] button to run the program.

      The robot should go to each of the points you taught at 20% speed, acceleration, and deceleration. The Power High statement enables your program to run the robot at high (normal) power, which in turn allows the robot speed and acceleration to be increased.

  4. Backup the project and system configuration

    Even though this is only a sample project, we will backup the project and controller configuration. This is easy to do with Epson RC+ 8.0. It is important that you keep regular backups of your applications on an external media such as a USB memory key.

    Follow these steps to backup the project and system configuration:

    1. In the Epson RC+ 8.0 menu, select [Project] - [Copy Project].

    2. On the [Copy Project] dialog - [Project Save Destination] box, select the file destination.

      By clicking on the [...] button to the right, you can add a project save destination.

    3. Click the [OK] button.

      Project backup files will be copied to external media.

    4. From the [Tools] menu, select [Controller].

    5. Click on the [Backup Controller] button.

    6. In the [Browse For Folder] window, select a drive.

    7. Click the [OK] button. The system configuration will be backed up on the external media.

You have now written your first program. For details on basic application design, see below.

Designing Simple Applications