![Omron NX1P Скачать руководство пользователя страница 78](http://html1.mh-extra.com/html/omron/nx1p/nx1p_programming-manual_742781078.webp)
78
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
n
th 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]
.