beautypg.com

How to save a signal value to a variable – MTS Multipurpose Elite User Manual

Page 170

background image

An index variable typically defines an Index (data point) value in an array variable – not an actual signal
value (that is, load value). On the left side of the following figure, the Array Index is listed alongside each
corresponding load value that was captured during data acquisition:

Corresponding Array Index and Load Values

Typical post-test analysis involves extracting or calculating values at a specified point in the test. If you
know the array index number, you can extract any signal value from any array associated with the same
data acquisition activity. Furthermore, If you have a signal value that you are interested in, you can extract
the index value and use it to extract a signal value from another array. You can also use the index value
for the [, startIndex, endIndex]) arguments that appear in many functions.

For example, if you extract the index value for a particular load, you can use that index value to extract
the strain value at that load. If you were to create a calculation to perform this operation, it would look like
the following:

ChannelIndex(searchChannel, searchValue[, startIndex, endIndex])

ArrayValueAtIndex(Array, Index)

In this calculation, the ChannelIndex function finds the index in the channel array that has a specified
array value, and the ArrayValueAtIndex function returns the value at that index.

How to Save a Signal Value to a Variable

You can use the Signal("SignalName") function in an Assign Variables activity to capture a signal value
at a specific point in the test and store the value in a variable. After you have captured the signal value at
certain time during the test run, you can use it in future calculations during the test run or during your
post-test analysis.

In the example below, consider a scenario in which you need to save the value of the load signal after a
Ramp (MPE) or Go To (TWE) activity completes. To accomplish this, create a new variable that holds the
signal value and then use the Assign Variables test activity to store the load signal into that variable.

1. On the Variables tab, click the green + sign to create a new variable.

2. In the New Variable window, enter a name for the variable, such as "LoadValueAfterGOTO."

3. In the Properties panel for the new variable, under Availability, select During-Test.

4. Add an Assign Variables activity into the test procedure at the point where you want to capture the

signal value. In this example, the Assign Variables activity will be placed after a Go To activity.

170 | MTS TestSuite

Working with Variables