
ControlLogix Platform ♦ "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 111 of 264
March 12, 2014
Data type code (OCX_CIP_DINT, etc).
Size of a single data element (DINT=4, BOOL=1, etc).
OCX_CIP_TAG_READ_OP or OCX_CIP_TAG_WRITE_OP.
Number of elements to read or write - must be 1 if not array
Pointer to read/write data buffer. Strings are expected to be
in OCX_CIP_STRING82_TYPE format. The size of the data is
assumed to be numEle * eleSize.
Write data mask. Set to NULL to execute a non-masked
write. If a masked write is specified, numEle must be 1 and
the total amount of write data must be 8 bytes or less. Only
signed and unsigned integer types may be written with a
masked write. Only data bits with corresponding set wrMask
bits will be written. If a wrMask is supplied, it is assumed to be
the same size as the write data (eleSize * numEle).
Read/write operation result (output). Set to OCX_SUCCESS if
operation successful, else if failure. This value is not set if
the function return value is other than OCX_SUCCESS or opType
is OCX_CIP_TAG_NO_OP.
Return Value
An access error occurred. Individual access result parameters not
set.
Example
OCXHANDLE Handle;
OCXCIPTAGACCESS ta1;
OCXCIPTAGACCESS ta2;
OCXCIPTAGACCESS * pTa[2];
INT32 wrVal;
INT16 rdVal;
int rc;
ta1.tagName = "dintArr[2];
ta1.daType = OCX_CIP_DINT;
ta1.eleSize = 4;
ta1.opType = OCX_CIP_TAG_WRITE_OP;
ta1.numEle = 1;
ta1.data = (void*) &wrVal;
ta1.wrMask = NULL;
ta1.result = OCX_SUCCESS;
wrVal = 123456;
ta2.tagName = "intVal";
ta2.daType = OCX_CIP_INT;
Comentarios a estos manuales