EasyManua.ls Logo

Omron CX-PROGRAMMER V8.1 - Page 185

Omron CX-PROGRAMMER V8.1
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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)

Table of Contents

Related product manuals