![Omron CX-PROGRAMMER V8.1 Operation Manual Download Page 185](http://html1.mh-extra.com/html/omron/cx-programmer-v8-1/cx-programmer-v8-1_operation-manual_744203185.webp)
160
Statement Descriptions
Section 5-5
FOR n:=1; TO 50 BY 1 DO
DATA[n]:=DATA[n]+n;
IF DATA[n]>100 THEN EXIT;
END_IF;
END_FOR;
RETURN Statement
■
Summary
The function of the RETURN statement depends on the type of program in
which ST is used.
• ST program:
Forcibly ends the ST task that is being executed, and executes the next
task.
• ST used in SFC:
Forcibly ends the action program that is being executed, and executes the
next action program or transition program.
• ST used in a function block:
Forcibly ends the ST-language function block containing the RETURN
statement, returns to the place in the calling function block instance where
the call occurred, and executes the next instruction.
■
Reserved Words
RETURN
■
Statement Syntax
RETURN
■
Usage
Use the RETURN statement to forcibly end an SFC program and function
block that is executing an ST task.
Function Block Call
Statement
■
Summary
This statement calls a function block definition.
■
Reserved Words
None
■
Statement Syntax
Enter the arguments (specified variable values that are passed to the called
function block’s input variables) and return value (specified variable that
receives the function block’s output variable value) in parentheses after the
instance name (see note). The two methods (entry method 1 and entry
method 2) that can be used to enter these parameters are described in the fol-
lowing paragraphs.
Note
The data type is any of the function block’s internal variable names (when ST
is used in the function block’s instance) or global variable names (when ST is
used in an ST task or SFC action program).
■
Entry Method 1
Use this method to enter both the argument specification (called function
block definition’s variable name) and return value specification.
A(B:=C, .......... ,D=>E)
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......