![Omron NX-EC0112 User Manual Download Page 194](http://html1.mh-extra.com/html/omron/nx-ec0112/nx-ec0112_user-manual_742777194.webp)
6 Incremental Encoder Input Units
6 - 68
NX-series Position Interface Units User’s Manual (W524)
This section provides two ladder diagram examples. One does not assign the pulse rate value to a
PDO and reads the value from the Unit every time. The other assigns the pulse rate value to a PDO.
Reading the Pulse Rate Value from the Unit Each Time
Use the following procedure.
1
Starting and Reading the Pulse Rate Value
Change the read execution condition to TRUE and use the Read NX Unit Object instruction to
read the pulse rate value from the target Unit.
2
Processing the Data
When the read is completed (i.e., Done in the Read NX Unit Object instruction), calculate the
data from the pulse rate value that was read in step 1.
In this example, we will calculate the frequency.
In this example, the time window set value (unit: ms) in the Incremental Encoder Input Unit is used
as it is in the frequency calculation. The unit of the calculated frequency is therefore kHz.
The value that is automatically set for the target Unit when the variable is assigned in the Sysmac
Studio is used for the Specified Unit input variable to the Read NX Unit Object instruction
(NX_ReadObj).
The Object Parameter (Obj) is a structure with the following data type.
To read the pulse rate of the Incremental Encoder Input Unit, set the index to UINT#16#6003 and
set the subindex to USINT#1 for the pulse rate for channel 1 and to USINT#2 for the pulse rate for
channel 2.
Sample Programming
Variable
Name
Description
Data type
Valid range
Unit
Default
Obj
Object Parameter Object parameters. _sNXOBJ_ACCESS
---
---
---
Index
Index
Index.
UINT
Depends on
data type.
---
0
Subindex
Subindex
Subindex.
USINT
Read completed
In1
In2
DIV
EN
EN0
UnitProxy
ErrorID
ReadDat
ErrorIDEx
NX_ReadObj_Instance
Error
NX_ReadObj
Execute
Done
Busy
Obj
TimeOut
ReadDat
Read NX object from Unit.
Read execution
condition
Frequency calculation
completed
Specified Unit
Object Parameter
Timeout Time
Pulse Rate Read Data
Pulse Rate Read Data
Time Window Set Value (ms)
Pulse Rate Read Data
Process the data.
Read completed
Frequency (kHz)
Frequency calculation
completed
Summary of Contents for NX-EC0112
Page 13: ...11 Manual Structure NX series Position Interface Units User s Manual W524...
Page 34: ...Revision History 32 NX series Position Interface Units User s Manual W524...
Page 36: ...Sections in this Manual 34 NX series Position Interface Units User s Manual W524...
Page 78: ...3 Part Names and Functions 3 8 NX series Position Interface Units User s Manual W524...
Page 108: ...4 Installation and Wiring 4 30 NX series Position Interface Units User s Manual W524 Unit...
Page 114: ...4 Installation and Wiring 4 36 NX series Position Interface Units User s Manual W524...
Page 126: ...5 I O Refreshing Methods 5 12 NX series Position Interface Units User s Manual W524...
Page 340: ...8 Pulse Output Units 8 76 NX series Position Interface Units User s Manual W524...
Page 462: ...Appendices A 74 NX series Position Interface Units User s Manual W524...
Page 463: ...I 1 I NX series Position Interface Units User s Manual W524 Index...
Page 466: ...I 4 NX series Position Interface Units User s Manual W524 Index...