EasyManuals Logo
Home>Omron>Controller>NJ Series

Omron NJ Series User Manual

Omron NJ Series
668 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
Page #215 background imageLoading...
Page #215 background image
6 Programming
6-28
NJ-series CPU Unit Software User’s Manual (W501)
There are six types of user-defined variables as defined according to their function in a POU.
Note You can define global variables as external variables to access the global variables through the external vari-
ables.
Local variables can be read and written only in the POU (program, function, or function block) in which
it is defined. Local variables are the same as internal variables if the POU is a program. If the POU is a
function block or a function, “local variable” is a collective term for internal variables, input variables,
output variables, in-out variables, and external variables.
Internal Variables
A local variable can be used only within one POU. An internal variable is declared in the local vari-
able table for the POU. You cannot access the values of internal variables from outside of the POU.
You can declare internal variables with the same names in different POUs. Each of those variables
is assigned to a different memory area.
Input Variables
When a POU is called, the input variables are assigned to the values of the input parameters from
the calling POU. An input variable is declared in the local variable table of the POU.
Output Variables
Before processing a POU is completed, the output parameters returned to the calling POU are
assigned to the output variables. An output variable is declared in the local variable table of the
POU.
In-Out Variables
When a POU is called, the in-out variables are assigned to the in-out parameters themselves (vari-
able designations) from the calling POU. If you change the value of an in-out variable within a POU,
the value of the in-out parameter changes at that time. An in-out variable is declared in the local vari-
able table of the POU.
External Variables
External variables are used to access data outside of a POU. You can access global variables from
POUs.
6-3-3 Types of User-defined Variables in Respect to POUs
Type of user-defined variable
POU type
Programs FB FUN
Local variables
Internal variables Supported. Supported. Supported.
Input variables Not supported. Supported. Supported.
Output variables Not supported. Supported. Supported.
In-out variables Not supported. Supported. Supported.
Global variables Supported (see note). Supported (see note). Supported (see note).
External variables Supported. Supported. Supported.
Local Variables

Table of Contents

Other manuals for Omron NJ Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ Series and is the answer not in the manual?

Omron NJ Series Specifications

General IconGeneral
BrandOmron
ModelNJ Series
CategoryController
LanguageEnglish

Related product manuals