<< Prev        Next >>

ID : 5254

Creating a Program

Creating a Program in a Project

Create a program in the project, using the following procedure.

1

Choose Project(P) | Add Program(Ctrl+N) to display the Create new project window.

2

Select Program(*.pcs) in Type and enter the program name, then press [OK].

The program name should be a maximum of 64 alphanumeric characters beginning with an alphabet.

3

Wait for a program to be created and the program entry window to appear.

Entering and Saving Program Code

Enter the following sample code to the program entry window.
This sample code moves the end-of-arm tooling from the predetermined point P1 to P2.

1

Type the program title and program name

Fine name: PRO1.pcs

'!TITLE“Move to P2 from P1”   'Program title
Sub Main 'Declare main procedure
Takearm Keep=0 'Obtain arm semaphore
 Speed 100 'Set the internal speed at 100%
 Move P,P1 'Move to P1 position under PTP control
 Move P,P2 'Move to P2 position under PTP control
 Givearm 'Release arm semaphore
End Sub 'End of program

The program window after entering code is as below.

2

Save the program code.

Choose File | Save PRO1.pcs to save the program code.

3

Compiling the program.

Choose Project | Check Grammmer to compile the program.

4
  • When no error has occured.
    The following display appears. Check that "Error 0" is displayed.

  • If an error is showing, any program command(s) entered is wrong. In the Output window, check the error location and contents and correct the wrong command(s).

Double-clicking a line in the Output window highlights the corresponding program line in the Program window.

ID : 5254

<< Prev        Next >>