Omron NJ-series User Manual page 191

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

Advertisement

6 Programming
 Determine which processes to put into which POUs and design
the POUs.
Note Functions cannot contain function block instructions or function blocks.
 Determine which languages, such as ladder diagrams, inline
ST, and ST, to use to create each process.
Note Inline ST is structured text that is written as an element of a ladder diagram.
 Design the user-defined variables that you need to create.
 Separate variables into those that you use in more than one
POU (global variables) and variables that you use in only
specific POUs (local variables).
 Determine if you need to automatically generate the variable
names for the device variables that you use to access slaves
and Units or if you need to define them yourself.
 Design the attributes for the variables.
Variable Name, Data Type, AT Specification, Initial Value, Retain, Constant, and Network
Publish
Decide the data types of your variables (including array specifications, range specifications,
structures, and enumerations).
 Keep the following precautions in mind when you design
variables.
• Retention:
Set the Retain attributes to determine the values that are used for variables when the power
supply is turned ON or when the operating mode changes.
• Structures:
When a structure is used for a variable in an instruction, design the program to use the same
structure data type for the input parameter, output parameter, or in-out parameter.
Example: Communications Instructions
• Array Specifications:
When an array variable is used for the variable for an instruction, design the program to use
an array variable for the input parameter, output parameter, or in-out parameter.
Examples: Shift Instructions, Stack Instructions, and Table Instructions
• AT Specifications:
Use AT specifications for the variables used for input parameters to certain instructions.
Example: Fixed or user I/O allocations for DeviceNet Units
• Network Publishing:
Design the variables for EtherNet/IP tag data links.
6-4
POU (Program Organization Unit) Design
Variable Design
NJ-series CPU Unit Software User's Manual (W501)
Reference
6-2 POUs (Pro-
gram Organiza-
tion Units)
6-5 Program-
ming Lan-
guages
Reference
6-3-1 Variables
6-3-2 Types of
Variables
6-3-3 Types of
User-defined
Variables in
Respect to
POUs
3-3 I/O Ports
and Device
Variables
6-3-4 Attributes
of Variables
6-3-5 Data
Types
6-3-6 Deriva-
tive Data Types
6-3-4 Attributes
of Variables
6-3-5 Data
Types
6-3-6 Deriva-
tive Data Types

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents