EasyManuals Logo

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 #266 background imageLoading...
Page #266 background image
6-79
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-5 Programming Languages
6
6-5-3 Structured Text Language
ST code consists of one or more statements. One statement is the equivalent of one process. State-
ments are executed from top to bottom, one line at a time, until the process is completed. Statements
are made up of keywords and expressions. A keyword is a symbol or string that expresses assignment
or execution control. An expression is a code that calculates a value from variables, constants, function
return values, and/or a combination of those, along with various operators. A statement represents a
process that completes by itself. Expressions form a statement by using a combination of values and
keywords.
Example of an Assignment Statement:
Example of an IF Construct:
Statement Separators
Statements must end with a single-byte semicolon (;). Statements are not considered complete
with only a carriage return at the end. This allows you to write long statements across multiple
lines.
One statement must end with one single-byte semicolon (;). In the following example, the IF con-
struct contains a single assignment statement. Each statement must be ended with a single-byte
semicolon (;).
Comment
You can write comments in your program to make the code easier to understand.
Statements written as comments are not executed.
Structure of ST
ST Language Expressions
A:= B + 100 * ABC (10, 20) ; (*Assign A to B + 100 * ABC (10, 20)*)
Assignment
keyword
Expression
Operators
Variables
Constant
Return value of function
Comment
IF D = E + 100 * DEF(10,20) THEN
G := H ;
END_IF ;
IF keyword
IF keyword
Statement
IF keyword
Expression
(*TRUE if D and E+100*DEF(10,20) are equal, otherwise FALSE*)
IF A=B THEN
C := D;
END_IF;
IF construct
Assignment
statement

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
Program CapacityUp to 128 MB
SD Card SlotYes
Power Supply Voltage24 VDC
Motion ControlYes
USB Ports1
Operating Temperature0°C to 55°C
Communication InterfacesEthernet/IP, EtherCAT, USB
Safety FunctionOptional
Storage Temperature-20°C to 75°C
Communication PortsUSB
DimensionsVaries by model
WeightVaries by model

Related product manuals