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

Page 61

Advertising
background image

4–13

OCI Data Server Data Items

Publication 8520-6.6 - August 1999

All data items are monitored in the controls background unless
otherwise indicated in the text describing the data item. Foreground
and Background speed is related to the system scan time. The
system scan time for the control is set in AMP. You can set the
system scan time in increments of 2 ms from 6 to 30 ms.
Foreground tasks occur during each system scan time. Data items
are hard coded in the processor as foreground or background. Only
the following data items are foreground items:

ESTOP_STATE

Select PAL/Logic system flags (ones that are foreground only)

The rate at which the CNC tests and reports data changes for OCI
watchlists is configured in AMP. Refer to your AMP Reference
Manual for details.

Background tasks are executed whenever there is excess time
available during a system scan time. The execution continues only
as long as there is excess time. When the excess time is used up, the
current background task is marked and foreground PAL/Logic
execution begins. Background execution resumes at the marked
position when there is excess time available again during future
coarse iterations.

Important: Since background tasks may be updated at various

intervals of the control cycle, it is necessary to
coordinate I/O or other PAL/Logic variables with
system timing. For the 9/PC, no I/O variables exist and
the only access is through system flags. For the
9/Series only, any values that change in foreground and
are accessed by the OCI (at a later time time in a
background scan) should be saved to a global variable
before the I/O value changes due to another change of
the variable in foreground. Failing to do this can cause
foreground events to be missed by the OCI data server.

When the OCI data server creates watch lists on the CNC, it creates
two different watchlists; one for foreground data items, and one for
background data items. If multiple OCI data servers connect to the
same 9/Series CNC, each OCI data server creates a separate
foreground and background watch list.

Important: Release 1 of the 9/PC can support only one data server.

Background/Foreground

Advertising