Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual page 71

Multi-vendor interface module
Hide thumbs Also See for Allen-Bradley ControlLogix 1756-MVI:
Table of Contents

Advertisement

service_proc
msgSize points to the size in bytes of the data pointed to by msgBuf.
The application should update this with the size of the response data
before returning.
extendederr is a pointer to a word which can be set by the callback
function to an extended error code if the service request is refused.
Return Value:
The service_proc routine must return one of the following values:
MVI_SUCCESS
MVI_CIP_BAD_INSTANCE
MVI_CIP_BAD_SERVICE
MVI_CIP_BAD_ATTR
MVI_CIP_ATTR_NOT_SETTABLE
MVI_CIP_PARTIAL_DATA
MVI_CIP_BAD_ATTR_DATA
MVI_CIP_FAILURE
Example:
MVIHANDLE
Handle;
MVICALLBACK service_proc ( MVIHANDLE objHandle, MVICIPSERVSTRUC
*sServ )
{
// Select which instance is being accessed.
// The application defines how each instance is defined.
switch(sServ->instance)
{
case 1:
// Instance 1
// Check serviceCode and attribute; perform
// requested service if appropriate
break;
case 2:
// Instance 2
// Check serviceCode and attribute; perform
// requested service if appropriate
break;
default:
return(MVI_CIP_BAD_INSTANCE);
}
}
See Also:
MVIcip_RegisterAssemblyObj
CIP Messaging API
message processed successfully
invalid class instance
invalid service code
invalid attribute
attribute is not settable
data size invalid
attribute data is invalid
generic failure code
// Invalid instance
Publication 1756-RM004B-EN-P - October 2000
4-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents