Omron NJ-series User Manual page 206

Machine automation controller cpu unit software
Hide thumbs Also See for NJ-series:
Table of Contents

Advertisement

Variable Designations for Functions
Value is assigned.
Input parameter
Variable assignment
itself is passed.
In-out parameter
The specifications for variables in functions are given below.
Variables
Input variables
Output variables 0 to 64
In-out variables
Internal vari-
ables
NJ-series CPU Unit Software User's Manual (W501)
Function name or instruction name
Function name or instruction name
Internal
Input
variables
variable
In-out variable
Number
0 to 64
Input variables are used as input arguments within the function. They cannot be
changed inside the function.
• When the function is executed, the input variables are set to the values of the
input parameters.
• You can specify either constants or variables for input parameters.
• Omitting Input Parameters:
Refer to information on operation when parameters are omitted in 6-2-7 Oper-
ation That Applies to Both Functions and Function Blocks.
• Unlike function blocks, you cannot specify to detect changes to TRUE or
FALSE.
• You cannot access the values of input variables from outside of the function.
• Some of the instructions provided by OMRON can have varying numbers of
input variables, but you cannot make a user-created function that has a vary-
ing number of input variables.
Output variables are used as output arguments from the function.
• The output parameters are set to the values of the output variables at the end
of function execution.
• You cannot specify a constant or a variable with constant attribute for an out-
put parameter.
• At least one BOOL output variable (including ENO and the return value) is
required.
• You can omit output parameter connections.
If you omit an output parameter, the value of the output variable is not
assigned to any parameter.
• You cannot access the values of output variables from outside of the function.
0 to 64
In-out variables are used as inputs to and outputs from the function. They can be
changed inside the function.
• In-out parameters (variable designations) are directly passed to or received
from the in-out variables.
• You cannot specify a constant or a variable with constant attribute for an in-out
parameter.
• If you change the value of an in-out variable within a function, the value of the
in-out parameter changes at that time.
• You cannot omit in-out parameters.
• You cannot access the values of in-out variables from outside of the function.
No limit
Internal variables are used for temporary storage within a function.
• The value is not retained after execution is completed.
• You cannot access the values of internal variables from outside of the function.
Value is assigned.
Return value parameter
Return value
Value is assigned.
Output parameter
Output
variable
Variable assignment
itself is passed.
In-out variable
In-out parameter
Specification
6 Programming
6
6-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents