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

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

Advertisement

4-18
CIP Messaging API
Publication 1756-RM004B-EN-P - October 2000
service_proc
Syntax:
MVICALLBACK service_proc( MVIHANDLE objHandle,
MVICIPSERVSTRUC *sServ );
Parameters:
objHandle
handle of registered object
sServ
pointer to structure of type MVICIPSERVSTRUC
Description:
service_proc is a callback function which is passed to the CIP API in the
MVIcip_RegisterAssemblyObj call. The CIP API calls the service_proc
function when an unscheduled message is received for the registered
object specified by objHandle.
For information on how to set up the message instructions within the
5550 processor, refer to the messaging information on pages 3-14 to
3-17.
Note that the object ID, Instance Number, is overwritten by the instance
parameter of the structure below.
sServ is a pointer to a structure of type MVICIPSERVSTRUC. This
structure is shown below:
typedef struct tagMVICIPSERVSTRUC
{
DWORD reg_param;
WORD
instance;
BYTE
serviceCode;
WORD
attribute;
BYTE
**msgBuf;
WORD
offset;
WORD
*msgSize;
WORD
*extendederr;
} MVICIPSERVSTRUC;
reg_param is the value that was passed to
MVIcip_RegisterAssemblyObj. The application may use this to store an
index or pointer. It is not used by the CIP API.
instance specifies the instance of the object being accessed.
serviceCode specifies the service being requested. attribute specifies the
attribute being accessed.
msgBuf is a pointer to a pointer to a buffer containing the data from the
message. This pointer should be updated by the callback routine to
point to the buffer containing the message response upon return.
offset is the offset of the member being accessed.
// value passed via MVIcip_RegisterAssemblyObj
// instance number of object being accessed
// service being requested
// attribute being accessed
// pointer to pointer to message data
// member offset
// pointer to size in bytes of message data
// an extended error code if an error occurs

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents