Returns, Description, Valid definition examples – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 205

API Library of Routines
Appendix B
DTL_RMW_W_IDX
B-74
index
This parameter specifies the element or structure level of the data-file
item to be read and modified.
Returns
Status
Symbolic Name
Meaning
0
DTL_SUCCESS
Operation successful
15
DTL_E_R_ONLY
Data item defined as READ only
16
DTL_E_INVTYPE
Data is invalid type for operation
19
DTL_E_NOINIT
DEFINE table not initialized
20
DTL_E_BADID
Definition ID out of range
24
DTL_E_FAIL
I/O completed with errors
31
DTL_E_TOOBIG
Data item greater than maximum allowed
32
DTL_E_NODEF
No such data item defined
41
DTL_E_CNVT
DataĆconversion error, I/O not attempted
157
CC_E_NOTCONNECT
PLC is not connected or offline
Description
Use the DTL_RMW_W_IDX function to perform a read/modify/write
function on a data item. This function read a data value, modifies the data
with the AND mask and then with the OR mask, and writes the data back
to the programmable controller. This function allows you to read and
modify any element of the file using only one data definition by specifying
an index to the element.
For this function to be successful, the data definition must specify the
address to the first element of the file and the number of data items
must be 1.
You cannot use this synchronous function on multiple-element data
definitions. The element must be a word value.
Valid Definition Examples
DTL_C_DEFINE (&idl, “N34:0”)
/* specified to element 0,
default 1 item */