EasyManua.ls Logo

Rockwell Automation Allen-Bradley ControlLogix 1756-MVI - Callback Functions

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
CIP Messaging API 4-13
Callback Functions
Note:
The functions in this section are not part of the CIP API, but must
be implemented by the application. The CIP API calls the
connect_proc
or
service_proc
functions when connection or service requests are
received for the registered object. The optional
rxdata_proc
function is
called when data is received on a connection. The optional
fatalfault_proc
function is called when the backplane device driver
detects a fatal fault condition. The optional
resetrequest_proc
function is
called when a reset request is received by the backplane device driver.
Special care must be taken when coding the callback functions, since
these functions are called directly from the backplane device driver. In
particular, no assumptions can be made about the segment registers DS
or SS. Therefore, the compiler options or directives used must disable
stack probes and reload DS. For convenience, the macro
MVICALLBACK has been defined to include the __loadds compiler
directive, which forces the data segment register to be reloaded upon
entry to the callback function.
Stack probes (or stack checking) must be disabled using compiler
command line arguments or pragmas. Stack checking is off by default
for the Borland compiler. For the Microsoft compiler, it must be
disabled either with the /Gs command line option, or with “pragma
checkstack(off)”.
In general, the callback routines should be as short as possible,
especially
rxdata_proc
. Do not call any library functions from the
rxdata_proc
callback routine. Stack size is limited, so keep stack
variables to a minimum.

Table of Contents

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

Related product manuals