beautypg.com

Array variable uses, How to extract data from array variables – MTS Multipurpose Elite User Manual

Page 169

background image

a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]

In the preceding example, a[4] refers to the fifth element of the array a.

An array variable in MTS TestSuite holds multiple values of the same data type. The available types of
array variables include:

Array of Boolean

Array of Numbers

Array of Text

The elements of an array can be individually referenced or assigned; that is, each element of an array is
a variable of its own, and can be modified independently of other elements in the array.

Array Variable Uses

Array variables are useful for the following activities and applications:

Cycle + DAQ activity

Custom Waveform + DAQ activity

DAQ activity

Fatigue data analysis

Fracture data analysis

Point-by-Point calculations

Variables that store changing uncalculated values that are not part of a data acquisition activity

Variables that store recurring calculations

Example: Arrays for DAQ

For example, array variables are used for cyclic data acquisition (Cycle + DAQ and Custom Waveform +
DAQ). Every time a data acquisition activity is triggered, array variables assigned to the activity are
repopulated with data. Data from the previous data acquisition is replaced.

You can also use arrays to perform calculations on a series of values. For example, you can use array
data to calculate the minimum, maximum, and mean of cycle data.

System performance for DAQ and arrays

Populating an array with a large amount of data may result in decreased system performance. For example,
populating an array with acquired data may slow your system. The amount of data required to decrease
system performance varies from system to system. In general, it is a best practice to avoid populating
arrays with long-running data acquisitions, especially when data is acquired at high frequency.

How to Extract Data from Array Variables

A regular variable (such as Boolean, Number, or Text )stores a single piece of data. Array variables,
however, can store multiple pieces of data. Additionally, each piece of data in an array variable is given a
numeric index that is used to identify it.

MTS TestSuite | 169

Working with Variables