Program Example - Omron NX1P Programming Manual

Machine automation controller
Table of Contents

Advertisement

2.
Select Ch1 Analog Input Value and enter "data1" in the Variable Column.
INT data from 0 to 4000 is stored in variable data1 according to the analog input value of
the Displacement Sensor (0 to 10 V).
3.
Enter "PH1" in the Variable Column of Input Bit 00 to which the Photoelectric Sensor is
connected.
Variable PH1 is changed between True (ON) and False (OFF) by changing the ON/OFF
state of the Photoelectric Sensor.
The data type is Boolean.
4-2-6

Program Example

When PH1 changes to TRUE, the MOVE (data movement) instruction stores the value of
variable data1 in the nth element of array variable All_Data and the Inc (increment) instruction
adds 1 to n (n = n + 1).
The first time PH1 changes to TRUE, Data1 (analog input value) is stored in All_Data[0]. The
next time PH1 changes to TRUE, it is stored in All_Data[1], and then All_Data[2].
78

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents