ProSoft Technology MVI56E-LDM User Manual
Page 118

CIP API Functions
ControlLogix Platform ♦ "C" Programmable
Developer's Manual
Linux Application Development Module
Page 112 of 264
ProSoft Technology, Inc.
March 12, 2014
ta2.eleSize = 2;
ta2.opType = OCX_CIP_TAG_READ_OP;
ta2.numEle = 1;
ta2.data = (void *) &rdVal;
ta2.wrMask = Null;
ta2.result = OCX_SUCCESS;
pTa[0] = &ta1;
pTa[1] = &ta2;
rc= OCXcip_AccessTagData(Handle, "p:1.s:0",2500, pTa,2)
if (OCX_SUCCESS!= rc)
{
printf("OCXcip_Access_Tag_Data() error = %d\n", rc);
}
else
{
if(ta1.result!=OCX_SUCCESS)
printf("%s write error = %d\n", ta1.tagName, ta.result);
else
printf("%s write successful\n",ta1.tagName);
if (ta2.result!=OCX_SUCCESS)
printf("%s read error = %d\n", ta2.tagName, ta.result);
else
printf("%s = %d\n, ta2.tagName.rdVal);
}
See Also
OCXcip_ReadConnected