A.4 program control commands – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual
Page 327
Appendices
A.4 Program Control Commands
A-6
A.4 Program Control Commands
Com-
mand
Name
Programming Format
Description
Moti
on Programs
Seq
uen
ce
Prog
rams
IF
ELSE
IEND
Branching
Commands
IF (Conditional expression) ;
(Process 1) ;
ELSE;
(Process 2) ;
IEND;
Executes process 1 if the conditional
expression is satisfied, and executes
process 2 if the conditional expres-
sion is not satisfied.
WHILE
WEND
Repeat
Commands
WHILE (Conditional expression) ;
;
WEND;
Repeatedly executes WHILE to
WEND processing for as long as the
conditional expression is satisfied.
PFORK
JOINTO
PJOINT
Parallel
Execution
Commands
PFORK Label 1, Label 2, Label 3, ;
Label 1: Process 1 ;
JOINTO Label X ;
Label 2: Process 2 ;
JOINTO Label X ;
Label 3: Process 3 ;
JOINTO Label X ;
Label X: PJOINT ;
Executes the blocks designated by the
labels in parallel. With a subroutine, a
maximum of two labels can be desig-
nated.
END and RET cannot be used during
parallel execution processing.
−
SFORK
JOINTO
SJOINT
Selective
Execution
Commands
SFORK Conditional expression 1? Label 1,
Conditional expression 2? Label 2, Condi-
tional expression 3? Label 3, Conditional ex-
pression 4? Label 4 ;
Label 1: Process 1 ;
JOINTO Label X ;
Label 2: Process 2 ;
JOINTO Label X ;
Label 3: Process 3 ;
JOINTO Label X ;
Label 4: Process 4 ;
JOINTO Label X ;
;
Label X: SJOINT;
Executes process 1 if conditional
expression 1 is satisfied, and executes
process 2 if the conditional expres-
sion 2 is satisfied.
MSEE
Motion
Subprogram
Call
MSEE MPS
;
Executes subprogram MPS
.
−
SSEE
Sequence
Subprogram
Call
SSEE SPS
;
Executes subprogram SPS
.
−
UFC
User Function
Call From
Motion Program
UFC User function name Input data, Input
address, Output data ;
Calls the user defined function from a
motion program.
−
FUNC
User Function
Call From
Sequence
Program
FUNC User function name, Input data, Input
address, Output data ;
Calls the user defined function from a
sequence program.
−
END
Program End
END;
Ends the motion program.
RET
Subroutine
Return
RET;
Ends the subroutine.