beautypg.com

Rockwell Automation GMLC Reference Manual User Manual

Page 644

background image

Publication GMLC-5.2 - November 1999

Motion Controller Functions

607

Indirect_variable[address]

Insert a value or expression equal to the desired user address. The
argument is evaluated as an integer (floating-point values are truncated),
and must have a value from 0 to 999 for Integrated and Basic controllers,
or from 0 to 1999 for Compact and 1394 controllers.

For example, lets say user variables 900 through 909 store an array of axis
positions, to be used depending on which product is selected by an
operator. If the operator’s choice is stored in the user variable,
Product_Choice, as a value between 0 and 9, using the following
expression for the Position value in a Move Axis block which moves the
axis to position.

Indirect_variable[Product_Choice + 900]

Specifically, if the operator selects the fifth product in the list,
Product_Choice = 4, and the expression uses the position stored in user
variable 904 (4 + 900) for the move.

Indirect DH-485 Variable

Use the

Indirect_DH_variable function to let the value of a user variable,

or expression, specify the value of local DH-485 variable. This indirect
referencing lets you access the elements of the motion controller’s DH-
485 data files, by specifying the location of the element in the file rather
than the element itself.

Syntax:

Indirect_DH_variable[file type, file number, element, sub-element]

Argument

Description

File Type

The numerical value of the type of file to transfer:
Binary3
Integer7
Floating8
ASCII10
BCD11
IntFloat12