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 #104 background imageLoading...
Page #104 background image
3-15
3 I/O Ports, Slave Configuration, and Unit Configuration
NJ-series CPU Unit Software User’s Manual (W501)
3-4 Allocating Variables to Units
3
3-4-2 Using Variables Assigned to Units
You can specify members of the variables that you assign to Units to specify some of the Unit attributes.
Example: Executing an Instruction with the Unit Number of an NX Unit
The following programming example reads a data object from an NX Unit if the NX Unit number of the
NX Unit to which the NX1 variable is assigned is 2. The NX1.UnitNo member gives the NX Unit number.
IF (NX1.UnitNo = UINT#2) THEN
NX_ReadObj_instance(Execute:=TRUE, UnitProxy:=NX1, Obj:=S_Obj, ReadDat:=Rdat);
END_IF;
To designate more than one Unit, you can specify the elements of an array of the variables that are
assigned to the Units. This allows you to use loop processing to perform the same process for more
than one Unit.
Example: The following programming example changes multiple NX Units to the mode that enables
writing data.
NX0, NX1, and NX2 are the variables that were assigned to the NX Units. The variables are assigned to
the elements of the NXTable[0..2] and then the NX_ChangeWriteMode instruction is executed in order
for each.
FOR i:= 0 TO 2 DO
NX_ChangeWriteMode_instance[i](Execute:=FALSE);
END_FOR;
NXTable[0] := NX0;
NXTable[1] := NX1;
NXTable[2] := NX2;
FOR i:= 0 TO 2 DO
NX_ChangeWriteMode_instance[i](Execute:=TRUE, UnitProxy:=NXTable[i]);
END_FOR;
Designating Unit Attributes
Designating More Than One Unit

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