Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
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.
The maximum size of the data that you can read depends on the instruction that established the con-
nection and the data type of the data that is read as shown in the following table.
Instruction that estab-
lished the connection
CIPOpen
CIPOpenWithDataSize
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.
In the following example, the value of variable abc in the remote Controller is read and stored in the
variable def in the local Controller. The number of elements to read Size is UINT#1. The data type of
abc and def is SINT. The size of SINT data is one byte, so the value of the read data size vwx is
UINT#1.
LD
CIPRead_instance
A
Execute
cip_h
Handle
'abc'
SrcDat
UINT#1
Size
DstDat
def
2-1004
Data type of read
data
Structure
STRING
Other data type
Structure
STRING
Other data type
Meaning
Description
Handle
Handle
Handle
Handle
ghi
CIPRead
Done
Busy
jkl
Error
mno
ErrorID
pqr
def
ErrorIDEx
stu
RcvSize
vwx
Maximum size of data that you can read [bytes]
1984
1986
1988
DataSize in CIPOpenWithDataSize instruction − 10
DataSize in CIPOpenWithDataSize instruction − 8
DataSize in CIPOpenWithDataSize instruction − 6
Data type
_sCIP_
HANDLE
UDINT
ST
CIPRead_instance(A, cip_h, 'abc', UINT#1,

NY-series Instructions Reference Manual (W560)

Valid range
Unit
Default
---
---
---
Depends on
---
---
data type.
def, ghi, jkl, mno, pqr,
stu, vwx);

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents