<< Prev        Next >>

ID : 5242

Entering Program Codes

In this step, you will create a program to move from P1 to P2. Enter the program codes listed in the table below.

Program name PRO1.pcs

'!TITLE“Pro1.pcs”'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
  • In order to run the program written above, Position Variables (P1 and P2) shall be taught beforehand.
    Regarding to the procedure of Teaching, refer to Teaching to Position Variables.
  • Command input support function is available for some commands. This function makes programming easy.
    For details, please refer to "Command Input Supporting Function" in FUNCTION GUIDE.
1

Move the cursor to the 5th line on the program edit window by using Up/Down key or jog dial.

2

Press [F5 Edit].

Keyboard appears.

3

Enter [SPEED 100] from the keyboard then press [OK].

4

The program edit window "Pro1.pcs" is displayed and "SPEED 100" is displayed in the 5th line.

5

Enter all of the program codes given on the top of this page in the same way used to enter "SPEED 100".

To add a new line, press [F1 CreateNew].

6

After completing entry of all codes, press [F6 Save & CheckSyntax].

7

Select whether to continue editing after saving the data.
Save and continue editing ---- Go to the program edit window
Save and close(Without syntax error) ----Move to the program list window
In this example, select "Save and close(Without syntax errror)" then press [OK].
If an error is detected, syntax error window appears.

(When the program is saved successfully, an asterisk at the end of program name will be erased.)

8

The display will return to the Program List window.

To execute the syntax check in program list, press [SHIFT] + [F12 Check Syntax]

ID : 5242

<< Prev        Next >>