Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

Function
The CIPRead instruction reads the value of the network variable specified with source variable name
SrcDat from another Controller on a CIP network. The other Controller is specified with Handle.
The read data value is stored in DstDat.
Size specifies the number of elements to read. If SrcDat is an array, specify the number of elements to
read with Size. If SrcDat is not an array, always specify 1 for Size. If the value of Size is 0, nothing is
read regardless of whether SrcDat is an array or not.
When the read operation is completed, the number of bytes of the data that was read is assigned to
read data size RcvSize. You can read a maximum of 1,988 bytes of data.
The data type of Handle is structure _sCIP_HANDLE. The specifications are as follows:
Name
Handle
Handle
If the value of ErrorID is WORD#16#1C00, the CIP message error code is stored in ErrorIDEx.
The following example reads the value of variable abc. The read data is stored in variable def and the
value of variable vwx changes to UINT#1.
LD
CIPRead_instance
A
Execute
cip_h
Handle
'abc'
SrcDat
UINT#1
Size
DstDat
def
Reading Arrays
To read array data, pass a subscripted array element to ScrDat as the parameter. Also pass a sub-
scripted array element to DstDat as the parameter. The following example reads the four array variable
elements abc[3] to abc[6] and stores the results in array variable elements def[10] to def[13]. The value
of variable vwx will be UINT#4.
LD
CIPRead_instance
A
Execute
cip_h
Handle
'abc[3]'
SrcDat
UINT#4
Size
DstDat
def[10]

NJ-series Instructions Reference Manual (W502)

Meaning
Description
Handle
Handle
Handle
Handle
CIPRead
ghi
Done
Busy
jkl
Error
mno
ErrorID
pqr
def
ErrorIDEx
stu
RcvSize
vwx
ghi
CIPRead
Done
Busy
jkl
Error
mno
ErrorID
pqr
def[10]
ErrorIDEx
stu
RcvSize
vwx
2 Instruction Descriptions
Data type
Valid range
_sCIP_
---
HANDLE
UDINT
Depends on
data type.
ST
CIPRead_instance(A, cip_h, 'abc', UINT#1,
def, ghi, jkl, mno, pqr,
stu, vwx);
ST
CIPRead_instance(A, cip_h, 'abc[3]', UINT#4,
def[10], ghi, jkl, mno, pqr,
stu, vwx);
2
Unit
Default
---
---
---
---
2-693

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents