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.

c CAUTION

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

Number of programs

Number of

DI numbers to

to be selected

DI points

be used

2 or less

1

DI0

4 or less

2

DI0 to DI1

8 or less

3

DI0 to DI2

16 or less

4

DI0 to DI3

32 or less

5

DI0 to DI4

64 or less

6

DI0 to DI5

100 or less

7

DI0 to DI6

General-purpose input

 

General-purpose output

DI0

Program selection 0

 

DO0

Program selection start

DI1

Program selection 1

 

 

 

DI2

Program selection 2

 

 

 

DI3

Program selection 3

 

 

 

DI7

Confirmation of selected program

 

 

 

<<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

Input

 

 

Program selection

Confirmation of selected program

Confirmation of selected program

(DI3~DI0)

 

 

DI7

Output

DO0

Execution of selected program

Execution of selected program

8

ROBOT LANGUAGE

8-29

Page 127
Image 127
Yamaha SRCP manual Switching the program from I/O, Parameter, Program description