EasyManua.ls Logo

Omron NX1P User Manual

Omron NX1P
106 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 #99 background imageLoading...
Page #99 background image
99
6-1-3 Structure of ST and Example
Using general expressions, ST programming requires no special knowledge.
Remember the following two rules:
(1) Use a colon and an equals sign (:=) to assign a value to a variable.
(2) Statements must end with a semicolon (;).
Example
An example of the statement to calculate the distance between two points using Pythagoras'
theorem is shown below.
Just apply the formula.
โ–  Formula
๐‹๐ž๐ง๐ ๐ญ๐ก =
๏ฟฝ
(๐—๐Ÿ โˆ’ ๐—๐ŸŽ)
๐Ÿ
+ (๐˜๐Ÿ โˆ’ ๐˜๐ŸŽ)
๐Ÿ
โ–  ST program
Length := SQRT((X1-X0)**2+(Y1-Y0)**2);
* SQRT: Square Root
6-1-4 Operators
Operator Operation Notation example Priority
()
First priority
Value := (1+2)*(3+4); // Value is 21
1
-, + Sign +100, -100
2
NOT
Logical NOT
Value := NOT TRUE; // Value is FALSE
** Exponent Value := 2**8; // Value is 256 3
*
Multiplication
Value := 8*100; // Value is 800
4 / Division Value := 200/25; // Value is 8
MOD
Remainder
Value := 10 MOD 6; // Value is 4
+ Addition Value := 200+25; // Value is 225
5
-
Subtraction
Value := 200-25; // Value is 175
<, >, <=, >= Comparison Value := 60>10; // Value is TRUE 6
=
Matches
Value := 8=7; // Value is FALSE
7
<> Does not match Value := 8<>7; // Value is TRUE
&, AND
Logical AND
Value := 2#1001 AND 2#1100; // Value is 2#1000
8
XOR Logical exclusive OR Value := 2#1001 XOR 2#1100; // Value is 2#0101 9
OR
Logical OR
Value := 2#1001 XOR 2#1100; // Value is 2#1101
10

Table of Contents

Question and Answer IconNeed help?

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

Omron NX1P Specifications

General IconGeneral
ModelNX1P
Power Supply24 VDC
Programming SoftwareSysmac Studio
Built-in EtherNet/IP portYes
Built-in EtherCAT portYes
Built-in USB portYes
SD memory card slotYes
USB Port1
Communication PortsEtherNet/IP, EtherCAT, USB
Ethernet Ports1
Operating Temperature0 to 55 ยฐC
Weight500 g
TypeProgrammable Logic Controller (PLC)

Summary

Introduction

Terms and Conditions Agreement

Warranty, Limitations of Liability

Details Omron's warranty terms, limitations, and buyer remedies for products.

Limitation on Liability; Etc

Outlines limitations on Omron's liability for damages and indirect losses.

Application Considerations

Errors and Omissions

Programming the NX1P

Programming with Variables

Explains the concept of using user-defined variables for NX1P programming, contrasting with address-based methods.

Programming Software

Introduces Sysmac Studio as an integrated environment for configuring, programming, and maintaining controllers.

Before You Begin

Installing the Sysmac Studio

Provides step-by-step instructions and system requirements for installing Sysmac Studio.

Ladder Programming

Programming with the Sysmac Studio

Guides on creating a basic ladder program using Sysmac Studio with pushbuttons and lamps.

Assigning Variables to Terminals

Explains how to assign variable names to physical terminals for I/O mapping.

Example of a Ladder Program Using a Timer Instruction

Demonstrates using a self-holding rung and a timer instruction in a ladder program.

Creating Programs to Handle Data

Motion FB Programming

Motion FB Programming

Introduces PLCopenยฎ-defined function blocks for motion control in NX1P.

Adding a Servo Drive and Setting the Parameters

Details registering a servo drive and configuring its axis parameters for motion control.

Creating a Program

Demonstrates creating a program using motion FBs to control single-axis movement.

ST Programming

Related product manuals