EasyManua.ls Logo

Rockwell Automation Allen-Bradley ControlLogix 1756-MVI - Page 70

Rockwell Automation Allen-Bradley ControlLogix 1756-MVI
145 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Publication 1756-RM004B-EN-P - October 2000
4-18 CIP Messaging API
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; // value passed via MVIcip_RegisterAssemblyObj
WORD instance; // instance number of object being accessed
BYTE serviceCode; // service being requested
WORD attribute; // attribute being accessed
BYTE **msgBuf; // pointer to pointer to message data
WORD offset; // member offset
WORD *msgSize; // pointer to size in bytes of message data
WORD *extendederr; // an extended error code if an error occurs
} 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.

Table of Contents

Other manuals for Rockwell Automation Allen-Bradley ControlLogix 1756-MVI

Related product manuals