Rockwell Automation 8520-9API 9/Series OCI API Developer's Guide User Manual

Page 17

Advertising
background image

1–8

Open Control Interface (OCI) Overview

Publication 8520-6.6 - August 1999

JBoxDestroyInactiveParts
When an item is requested of the OCI data server using the RSdata
JBox control it is added to the watchlist on the specified control.
Because of the nature of more typical JBox applications when the
request for this data from the application no longer exists JBox does
not normally terminate the request for this item. Since watchlist
space on the CNC is limited even a small application will quickly
run out of watchlist space. To prevent this scenario we used an
undocumented attribute of JBox called JBoxDestroyInactiveParts.
This attribute will remove any inactive automatic links from the data
server which than removes it from the CNC watchlist.

Since JBoxDestroyInactiveParts is not a documented feature of JBox
you will not find it in any property sheet or attribute of a JBox
control. We used this feature by first making the declaration:

Declare Sub JBoxDestroyInactiveParts Lib “RSJBOX32.dll” (bDestroyInactive as Long)

Than calling the function in the mainMDI form Load routine:

JBoxDestroyInactiveParts (True)

Important: This function call must be made only after the first

RSData link data item is placed as an Automatic Item in
the watch list.

OCI Basic Display Set Source Code Routines

The OCI basic display set source code contains many useful
subroutines that will make data retrieval, command requests, and
data formatting simpler. Refer to page 3–1 for details on this source
code and its subroutines. Printing functions and debugging routines
are also available in this source code.

Advertising