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
Size specifies the number of elements to write. If DstDat is an array, specify the number of elements to
write with Size. If DstDat is not an array, always specify 1 for Size. If the value of Size is 0, nothing is
written regardless of whether DstDat is an array or not.
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 writes the value of variable def from the local Controller to the variable abc in the
remote Controller. The number of elements to write Size is UINT#1.
LD
CIPWrite_instance
A
Execute
cip_h
Handle
'abc'
DstDat
UINT#1
Size
def
SrcDat
The value of variable SrcDat in the local Controller is assigned to variable DstDat in the remote Controller on
the CIP network specified by the handle Handle.
Size specifies the number of elements to write.
Controller that executed the instruction
SrcDat=def SINT#123
Variable def in local Controller
Writing Arrays
To write array data, pass a subscripted array element to DstDat as the parameter. Also pass a sub-
scripted array element to SrcDat as the parameter.
The following example stores the contents of array variable elements def[10] to def[13] in the four array
variable elements abc[3] to abc[6].
LD
CIPWrite_instance
A
Execute
cip_h
Handle
'abc[3]'
DstDat
UINT#4
Size
def[10]
SrcDat
2-1010
Meaning
Description
Handle
Handle
Handle
Handle
ghi
CIPWrite
Done
Busy
jkl
Error
mno
ErrorID
pqr
ErrorIDEx
stu
Written.
Size
The number of elements to write is 1.
ghi
CIPWrite
Done
Busy
jkl
Error
mno
ErrorID
pqr
ErrorIDEx
stu
Data type
_sCIP_
HANDLE
UDINT
ST
CIPWrite_instance(A, cip_h, 'abc', UINT#1, def,
Handle Handle = cip_h Controller.
DstDat=abc
UINT#1
Value of variable def in local Controller is assigned to
variable abc in remote Controller.
ST
CIPWrite_instance(A, cip_h, 'abc[3]', UINT#4, def,

NY-series Instructions Reference Manual (W560)

Valid range
Unit
Default
---
---
---
Depends on
---
---
data type.
ghi, jkl, mno, pqr, stu);
SINT#123
SINT#123
=def
ghi[10], jkl, mno, pqr, stu);

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents