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

Page 51

Advertising
background image

4–3

OCI Data Server Data Items

Publication 8520-6.6 - August 1999

Some OCI data items are accessed as arrays. The format for the
majority of these arrays can be broken down into just a few array
indexes. The array index is called out with each data item. The
following presents the format for the most common arrayed data.
This is not an inclusive list. Other less frequently used array indexes
are used and described with the data items or commands that use
them.

Array Index:

Description:

AXIS_NUM

AMP configured axis number

SPINDLE_NUM

AMP configured spindle number (1 to 3)

configured spindle number for 9/PC (1 to 2)

CNC_DIRECTORIES

1 (the main directory), 2 (the protectable directory or

3 (the PC local OCI file handler directory typically the

Pc's hard disk).

SERVO_MODULES

the servo module number on the system (1 to 3)

1

SERVO_NUM

AMP configured number of the servo on your system

M_MODAL_GROUP

the modal group of a M code

G_MODAL_GROUP

the modal group of a G code

SETUP_BUFFERS

the active number of part program setup buffers

NUM_PP_FILES

the number of part programs currently in the

directory

OFFSET_NUM

the tool offset number

1

Always = 1 on 9/PC

Many of the data items are two dimensional arrays and would thus
have two array indexes associated with them. For example the data
item TOOL_LENGTH_WEAR_OFFSETS is a two dimensional
array using the indexes OFFSET_NUM and AXIS_NUM to define
its boundaries. Making the following data request of the server:

TOOL_LENGTH_WEAR_OFFSETS,2,3

requests the tool length wear offset number 2 for axis number 3.

Unless otherwise mentioned in the argument description, most data
items allow the omission of indexes which returns all data in that
array. For items that use two or more arguments, only the right most
argument can be omitted if it is valid to omit arguments. Data
returned from an array is delaminated by Tab characters and ended
with a return/line feed character.

Array Indexes

Advertising