beautypg.com

Non-volatile array functions, Non-volatile array attributes, Float floatarraygetelement(long element) – Rockwell Automation 2098-IPD-xxx Ultra5000 C Programming using the Motion Library User Manual

Page 97: Long longarraygetelement(long element), Non-volatile array functions -57, Non-volatile array attributes -57

background image

Publication 2098-PM001E-EN-P — July 2002

Referencing the Motion Library

2-57

Non-Volatile Array
Functions

Non-volatile array functions store numeric values for retrieval from
non-volatile memory in the Ultra5000. The array index is zero-based
with a range of 0 through the size of the array minus one.

Non-Volatile Array Attributes

float FloatArrayGetElement(long element);

Retrieves a floating point value from the previously selected floating
point array. The element argument indicates which cell of the array to
access.

Returns 0 if successful, or -1 on an error.

long FloatArraySetElement(long element, float data);

Stores data into a previously selected floating point value array. The
element argument determines the memory cell at which the data is
stored. The data argument is the new value to be stored in the
specified element.

Returns 0 if successful, or -1 on an error.

long LongArrayGetElement(long element);

Retrieves a long integer from the previously selected long integer
array. The element argument determines the memory cell at which the
data is stored.

Returns 0 if successful, or -1 on an error.

IMPORTANT

Non-volatile arrays must be set up in Ultraware
before they may be accessed by a program.

Use these functions:

To:

Non-Volatile Array Attributes

• FloatArrayGetElement
• FloatArraySetElement
• LongArrayGetElement
• LongArraySetElement

Store and retrieve
non-volatile array values.

Non-Volatile Array Services

• FloatArraySelect
• LongArraySelect

Select array to access.