5-6 switching the program from i/o, Robot language – Yamaha SRCP User Manual

Page 127

Advertising
background image

8-

29

8

ROBOT LANGUAGE

8-5 Sample Programs

8-5-6 Switching the program from I/O

The SRCP series controller does not accept dedicated command inputs for program switching. To
switch the program through the I/O, use the program selection signal as a conditional jump input as
explained below.
The following method is an example for switching among 16 kinds of programs.

Parameter
Since the number of programs to be selected is 16, set
the PRM8 (No. of conditional input points) to 4.

DI0
DI1
DI2
DI3
DI7

Program selection 0
Program selection 1
Program selection 2
Program selection 3
Confirmation of selected program

General-purpose input

2 or less
4 or less
8 or less
16 or less
32 or less
64 or less
100 or less

1
2
3
4
5
6
7

DI0
DI0 to DI1
DI0 to DI2
DI0 to DI3
DI0 to DI4
DI0 to DI5
DI0 to DI6

Number of programs

to be selected

Number of

DI points

DI numbers to

be used

DO0 Program selection start

General-purpose output

c

CAUTION

In actual programming, PRM8 must be set to
match the number of programs you use. (See
the table at the right.)

<<Program description>>
When using the JMPF statement to select a program, select the general-purpose input/output points
(DI7 and DO0 in this case) one at a time and perform the handshake. This is for synchronizing the
SRCP controller program with an external device such as a PLC. If this part is omitted, the wrong
program might be selected during program selection with the JMPF statement.
In specific operations, an external device should turn on DI7 after confirming DI3 to DI0. The SRCP
controller then turns on DO0 just after detecting that DI7 is on, and informs the external device that
the program is being selected. When the external device detects that DO0 is on, DI7 should turn off.
(DI3 to DI0 should be retained.) Then, when DO0 turns off, this means that the program selection is
complete, so it is okay to change DI3 to DI0. The program selection is now complete and actual
program operations are executed.
When each selected program has been executed, the operation returns to the top of the program (L0
in the program NO0). The operation returns to the top of the program when there is no program
matching the program selection input.

Time chart

Confirmation of selected program

Input

Output

Program selection
(DI3~DI0)

DI7

DO0

Confirmation of selected program

Execution of selected program

Execution of selected program

Advertising