MTS Series 793 User Manual

Page 363

Advertising
background image

Average of Two Strain Transducers

Some testers use multiple transducers to measure the same value. Some examples include multiple
extensometers to measure strain, or two clip gages transducers or deflectometer's to measure length. This
calculation simply averages two different input signals.

// calculate Average Strain from two different extensometers

"Ave Strain" = ("Strain1" + "Strain2")/2;

Pulse Digital Output when Segment Changes

Often it is important to send a digital pulse when a 1) segment is finished, or 2) a peak is found, or 3) a some
other event is detected. The calculation shown below monitors the segment counter and when it changes, it
pulses the digital output for "pulsetime" seconds from an OFF state to an ON state.

//
// This is a calculated Digital output
// It determines when the segment generator increments the segment count
// and pulses the digital output for "pulsetime" Seconds

int oldSegmentCount;
int currentSegmentCount;
real startTime;
int output;
real now;

currentSegmentCount = "Channel 1 Integer Count";
now = "Time";

// turn pulse on when we see a change in the segment count
if (currentSegmentCount != oldSegmentCount) {

output = 1;
startTime = now ;
oldSegmentCount = currentSegmentCount ;

}

// turn pulse off after startTime seconds
if (((now - startTime) > "pulseTime" ) && output)

output = 0;

"Digital Output 2" = output;

Simple Outlier Estimate

Sometimes a signal has so much noise, that you really don't want to "average" in bad points, you just want
to toss them out. One simple method is to collect three points, and compare the three points to each other.
If two of the points are "similar", but the third differs by some significant mount, then maybe it is an outlier
and can be ignored. This calculation either returns the middle of the three points (if the difference between
the first and second or the second and third is large) or returns the average of the first and third point (if the
second point is far from both the first and third).

// This calculation looks at three values at a time.
// If the rate of change between the first two points and the last two points
is large,
// then the middle point is probably an "outlier"
//
// If the middle point is an outlier, ignore it and use an average of the left
and right point.
// If the middle point is NOT an outlier, use it as result of equation.
//
// "maxChange" is a Calculation Parameter and should be set to the maximum
// allowable change in one "clock tick" i.e. in a test with 200lb amplitude,
// and 500 points in sine wave, the maxchange should be around 5 lbs. (more than

MTS Series 793 Control Software 363

Calculated Signals

Advertising